1
votes

Everyone....!!

Greetings..!!

I am working on XMPP based Chat app . I have used XMPPFramework by Robbie Hanson https://github.com/robbiehanson/XMPPFramework

i have used OpenFire as XMPP Server

I am facing problem to get Push Notification for Group Chat when user is offline.

Currently I am able to get Push Notification for One to One Chat when user is offline . (For this I have created a PHP WebService which fetches the information from ofOffline Table every 60 sec)

But As there are no Offline messages Tables for Group Chat.

Can anyone suggest me How can I get push notification to group when user is offline in group

I need to manage this from Both Android n iOS Chat App

for Android i am using

https://github.com/siacs/Conversations

3

3 Answers

0
votes

The best example would be AMP implementation in the Tigase. It is based on a MessageAmp plugin and AMP component. The MessageAmp plugin intercepts messages. If it detects that the user is not logged in, it forwards the message to AMP component to store it in an offline storage. In your case, you could have your own Message plugin which, if it detects that the user is offline, could forward the message to your Push component (iOS push or Android push, SMS push or something else). And all the logic responsible for actual pushing notification to the device should be implemented in that component.

0
votes

Try checking this MUC - Light and use the mod_zeropush module to modify a bit to handle single and group push from the muc-light.

Its more like whats app , although you may not achieve 100% results as you expect but less complex than the tradition XEP-0045.

0
votes

Look into ejabberd_mod_offline_post

  1. First config the Room must be a Member-Only room, and add all users as members right after you created it, so that be able to get a total.
  2. Add above model into ejabberd models.
  3. Implement a Callback Service to handle the callback post.

The idea is when User go offline

  • In one-to-one case, offline_message_hook will be raised
  • In MUC case, muc_filter_message will be raised, and any one not Presence-Available is offline.