Reputation: 1149
I am trying to implement a messaging application like WhatsApp that supports multi-devices and platforms such as android ios web and electron app. User A can log in from any of this platform at any point in time such as can be online on multiple devices same time
A can be online in web and mobile app together
with XMPP carbon able to sync messages when all devices are online. in one platform message is delivered and the user a not viewed that message. after that a checking message on the second device how to identify the state of a message that was read or not
Tried with XMPP message markers not able to solve these issue message makers are not part of MAM archived messages
XMPP server used is ejabberd
Upvotes: 0
Views: 308
Reputation: 2064
For that exact reason XEP-0333: Chat Markers were created:
Abstract: This specification describes a solution of marking the last received, displayed and acknowledged message in a chat.
And later on, from the same specification:
The concept of delivery and read receipts has been popularised by other messaging services such as iMessage, Google Hangouts and Blackberry Messenger. These services provide a visual indication of when a message has been delivered to any of the recipients resources and (optionally) when it has been read. These visual indications (referred to herein as "Chat Markers") are synced between all of the sender's and recipient's resources automatically, so the state of a chat is always consistent. If one or more of the resources is not connected, it can fetch Chat Markers from the Message Archive upon reconnecting.
It should be supported by any MAM-supporting server, so this should include ejabberd.
Upvotes: 0