1
votes

Hi I am developing a chat application using XMPP. Consider the situation in the chat application, When User A send messages to User B and if the User B is offline at that time XMPP will store the sms as offline message and it will send that messages to User B when it comes online. This is working here. But I want to send this offline messages from XMPP as push to User B. I have done lots of searching and I came in a conclusion that we need to send the offline messages from XMPP server to our backend server and from there we need to send that message as push. But how to do this, please help me

1
You mean you need to send the push notification when user B has offline messages? By the way which is the backend you are using?Yashwanth Babu
exactly and i am using Java as backend servicepranavjayadev

1 Answers

2
votes

It is possible to write a custom module to do that with ejabberd API.

What you need is to use mod_offline_hook (see ejabberd Events and Hooks) to be called when the server wants to store a message in offline store.

You can read mod_offline module for inspiration.