iosxmpp

Read receipt in iOS XMPP chat application


I want to implement "read message feature" like Facebook, iMessage, WhatsApp etc. If receiver has read the message, sender will get a notification that the other person has read message.

Is there any protocol in xMPP for this feature?

If sender sends the message and if it is successfully delivered there is a xmpp protocol. Got it from link: How to get the message delivary status using XMPP framework

Following is the code to get delivery report:

XMPPMessageDeliveryReceipts* xmppMessageDeliveryRecipts = [[XMPPMessageDeliveryReceipts alloc] initWithDispatchQueue:dispatch_get_main_queue()];
xmppMessageDeliveryRecipts.autoSendMessageDeliveryReceipts = YES;
xmppMessageDeliveryRecipts.autoSendMessageDeliveryRequests = YES;
[xmppMessageDeliveryRecipts activate:self.xmppStream];

How can I receive a read receipt?


Solution

  • XEP-0085 "active" chatstate basically used as "read receipt"