0

I am using openfire as xmpp server and strophejs in client, is there any way we can implement features like message seen,message delivered, message not delivered,message sending failed list. is there any plugin for implementing this as I couldn't able to find any plugin.

rahul
  • 406
  • 1
  • 5
  • 14

1 Answers1

0

XEP-0184 is what you need for this use case.

In Strophe's Github repository, there is plugin: strophejs-plugin-receipts which is an implementation of XEP-0184.

I haven't used this plugin so you will have to add this plugin to your project and test. Also, in case of any missing functionality, you should be able to add/implement based on the specifications of XEP.

  • but using XEP-0184 doesn't specify read unread feature right? – rahul Jun 15 '21 at 06:17
  • It defines a protocol that enables a sender to ask the recipient to acknowledge receipt of a content message by returning an ack message. – Shoaib Ahmad Gondal Jun 15 '21 at 06:51
  • if I load the message from history for every message do I need to send receipt request for the message id? – rahul Jun 15 '21 at 07:20
  • That will be implementation dependent. Client A sent 5 messages to Client B and received SEEN receipt of message 5 only (may be some network issue). So logically message 5 receipt means all 5 messages have been seen by Client B, So Client A will mark all sent messages as seen in chat window. Hope it clarifies your question. – Shoaib Ahmad Gondal Jun 15 '21 at 07:47
  • But what if user A has sent 5 messages and user B is offline. After sometime userB is online but userA is offline and userB has read all messages. So, if user A comes online again how he should recieve the old messages with receiept? – rahul Jun 15 '21 at 11:13
  • XEP-0184 is client side protocol, so Client B will send received receipt to Client A, if Client A is offline, XMPP Server will store it as an offline message and once Client A is online he will receive all those messages. Message Receipts inside tag and messages are stored in offline storage. – Shoaib Ahmad Gondal Jun 15 '21 at 11:57
  • but according to this link we cannot achieve message seen functionality using XEP-0184 https://stackoverflow.com/a/32340822/13353721 – rahul Jun 15 '21 at 13:00
  • That depends on client implementation, if client will send receipt when user actually opens that chat (user has seen the message) then sender can show the message as seen. However, message delivered can't be determined in this case. Only Sent, Seen/Delivered – Shoaib Ahmad Gondal Jun 15 '21 at 13:27
  • SO, how can we implement message delivered to server, message delivered to client, message read by user(seen) functionality? – rahul Jun 18 '21 at 14:47