processone / ejabberd

Robust, Ubiquitous and Massively Scalable Messaging Platform (XMPP, MQTT, SIP Server)
https://www.process-one.net/en/ejabberd/
Other
6.01k stars 1.5k forks source link

Question about push notification? #4120

Open taqveemahsan opened 7 months ago

taqveemahsan commented 7 months ago

Hello,

I am looking to push notifications to offline users in ejabberd. I've read that I need to add an external component to ejabberd to receive a notification when the user is offline. Afterward, I plan to use a backend service to retrieve the user's token from the database and send them a Firebase Cloud Messaging (FCM) notification.

I have explored open-source options for this external component, but many seem outdated. Could you please recommend an updated and reliable external component for ejabberd that supports this functionality?

Additionally, if there are any specific steps or examples for integrating OneSignal with ejabberd, I would greatly appreciate the guidance.

Thank you!

licaon-kter commented 7 months ago

If you use clients that are already in Play or AppStore (like Conversations or Siskin or Monal) all you need to do is:

modules:
  ...
  mod_push: {}
  mod_push_keepalive:
    wake_on_start: true
licaon-kter commented 7 months ago

If you'll deploy your own app on Play or AppStore, then you need a component like https://github.com/inputmice/p2 or https://github.com/monal-im/fpush

taqveemahsan commented 7 months ago

https://github.com/nobreak/mod_onesignal Can i use this one?

taqveemahsan commented 7 months ago

Because I am using 3rd party one signal to push notifications can you suggest one signal is better or I have to go with these https://github.com/inputmice/p2 or https://github.com/monal-im/fpush,?

licaon-kter commented 7 months ago

Can i use this one?

...for ejabberd 2 from 201x? No

You need to setup notifications to Google and Apple, not to OneSignal or some third party that's NOT a system push provider on users devices.

Test them both and choose one of those two (p2 as used by Conversations for Play or fpush as used by Monal for AppStore; but either should work fine)

taqveemahsan commented 7 months ago

Can you please tell me how it works if i am configure it with ejabberd server and front end in react native?