Delivered and Seen Receipts
Overview
This guide covers delivered and seen receipts within a conversation.
Before you begin, make sure you added the SDK to your app and you are able to create a conversation.
NOTE: A step-by-step tutorial to build a chat application is available here.
This guide will make use of the following concepts:
Conversation Events:
message:deliveredevents that fire on a Conversation, after you are a Membermessage:seenevents that fire on a Conversation, after you are a Member
Set Message Status to Delivered
There is a method that will set a Message status to delivered. The following code snippet will set a messages's status to delivered once a message event happens in the conversation.
Message Delivered Receipt
Given a conversation you are already a member of, message:delivered events will be received when Message events are set to delivered in the context of the current conversation:
Add NXMConversationDelegate as an extension to a ViewController or similar, and implement conversation(_ conversation: NXMConversation, didReceive event: NXMMessageStatusEvent):
Note: The first method below is required when implementing NXMConversationDelegate:
Have a ViewController, or similar, conform to NXMConversationDelegate and implement conversation:didReceiveMessageStatusEvent::
Note: The first method below is required when implementing NXMConversationDelegate:
Set Message Status to Seen
There is a method that will set a Message status to seen. The following code snippet will set a messages's status to seen once a message event happens in the conversation.
Message Seen Receipt
Given a conversation you are already a member of, message:seen events will be received when Message events are set to seen in the context of the current conversation:
Add NXMConversationDelegate as an extension to a ViewController or similar, and implement conversation(_ conversation: NXMConversation, didReceive event: NXMMessageStatusEvent):
Note: The first method below is required when implementing NXMConversationDelegate:
Have a ViewController, or similar, conform to NXMConversationDelegate and implement conversation:didReceiveMessageStatusEvent::
Note: The first method below is required when implementing NXMConversationDelegate: