powered by Jive Software

How to implement sent,delivered,read reciept using openfire and strophejs

Hi I am using openfire and strophejs library, and I am trying to implement whatsapp like feature which is message receipts for message received by openfire, message delivered to client, message read by client. So, while searching I found we need to use XEP-0184 which is a client implementation for message delivery and for message read by client we can use XEP-0333.But I am not clear which XEP standard/protocol should be used and also for history messages how to fetch the message receipts.

SO, using strophejs and openfire how to implement the above functionality. I am not getting any resource with above implementation or pseudo code available.

I think that you’re roughly on the right path with the XEPs that you mention. For message archives (which may include message markers, but I’m not sure, you should look at XEP-0313. Openfire implements this through its Monitoring plugin.

I’m not sure if they are an exact match with your functional requirements. It is possible that there is not such an exact match.

As for the implementation: that is highly specific to the library that you’re using (in your case: Strophejs). The specifications describe what the XMPP stanzas that are exchanged should look like. Openfire will behave accordingly, but how your client library generates those stanzas is a question for the community of those client libraries.

@guus: currently chatmarkers will not be saved by the monitoring plugin, but there is a PR for this: https://github.com/igniterealtime/openfire-monitoring-plugin/pull/179

Thanks for the response!!, what is the difference between XEP-0313 and XEP-0184, how we can use for the implementation roughly do you have any idea. (delivery reciepts are : message delivered to opernfir server, message sent to client, message read by user).

And while fetching the chat message history how we can show the delivery reciepts for the history messages.

I’m not sure what you’re asking. Both XEPs are wildly different. If you read them, you’ll see the differences. That will also tell you how to apply this in an implementation.

I was asking which XEP’s need to be used for the respective implementation. I have gone through the usecase, but not getting how to implement for history message read receiept

I think you need them both, but will also need the PR that @totzkotz mentioned to be merged. Until that happens, markers are not stored in the message archive (so you won’t be able to see them in those archives).

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.

I have gone through the usecase, but not getting how to implement for history message read receiept..

@guus @nbaever3 @totzkotz does openfire supports XEP-0430 inbox query which can be used for fetching the unread messages and count . As delivery reciepts can be impemented using XEP-0333.