0
votes

I'm developing a chat app that use XMPPFramework and Openfire Server. Is there any way to detect if a message is read or unread? I'm heard about XEP-0184, but it's only the message delivery (received or not).

2
No, it's impossible: "read" a message means that an human it's reading a line, basically only an human can confirm that. Whatsapp double checks are gray when recived by server and blue when the message it's recived on destination device.MrPk
Oh, it is "Seen", like facebook or Skype, I want to check if user saw it (or it's displayed on screen)maphongba008
You need a custom XMPP extension to support this.Mickaël Rémond
Of course I agree with @MickaëlRémond: custom XMPP extension that notify when it's displayed on screen and this depends on implementationMrPk
issue resolved?Bista

2 Answers

0
votes

How I achieved this by sending a special message when user opens the Unread chat.

And when the user receives that special message, it will get to know that the message has been read by other user.

Special Message should be unique: so that you can put a check on if it is received then it means message has been read.

0
votes

XEP-0184 (Delivery Receipt) used to ensure that message reached to the end user (user is online). For display notification you can use XEP-0085 (ChatStateEvent) or XEP-0022 (MessageEvent). Though XEP-0022 is deprecated and XEP-0085 is recommended.