I want to create a hook which is called whenever an offline message is created. Example: user-a(online) send a message to user-b(offline). Then as per ejabberd the message is stored and sent when user-b comes online. But in this situation, I want to call a local server POST URL with the data. How to create such a hook?
This hook is created so that I can from the local server send a push notification. Thus whenever a user comes online he/she will get the offline message as the push notification.
There is no step by step implementation for this. If anyone knows this it will be of great help.