0
votes

I have integrated ejabberd for chat functionality. Apps backend is in python-django and frontend is in IOS. current flow is as follows :

  1. When user signup into my app, A record has been created for that user in ejabberd server. This thing is handled in backend. unique id for that user is the combination of primary key and name ( e.g - [email protected] )

  2. To chat on frontend , IOS is using these id's. When both users are online , they can chat successfully.

Problem - When a user gets offline or a user kills the application, Then backend has to send notifications to device. I have checked ejjaberd's documentation. According to them I have to use mod_zeropush to send notifications. I have checked some articles, but I am not sure how to send notification to users. Can someone explain it in detail.

1

1 Answers

0
votes

As far as I can see ZeroPush mod leverages a ZeroPush server, I might be wrong about this as I just glanced through their pages.

What you need to do is to create your own mod which hooks into events that are occurring in ejabberd. This Q&A sums it up: How to develop custom functions on top of Ejabberd?

Basically you need to find out which event is fired when a user disconnects and hook into that event so your mod would be executed.