[ejabberd] Offline message hook for groups

Karel Sedláček k at ksdlck.com
Mon Mar 19 18:40:42 MSK 2012

We are using ejabberd as the backend for an iOS application that supports
both direct and group messaging.  Because clients are frequently
disconnected (whenever the app is not in foreground) we make heavy use of
mod_offline, and use offline_message_hook to initiate push notifications
via APNS (Apple Push Notification Service).  The issue we're facing is that
offline_message_hook doesn't seem to have the semantics we were hoping for
when using MUCs.  What we need is for messages sent to an MUC to also push
via APNS to any users in the room that are offline.  A few questions that
come to mind:

- Can we still use offline_message_hook, and should offline_message_hook be
fired for offline users in a MUC?
- Are we better off doing MUC pushes by hooking MUC messages and then
scanning the room to find offline users?
- Is there an optimal strategy for getting this list of users from the data
already in ejabberd about a room, e.g. subtracting the list of online users
from the union of admins and invitees?

Any thoughts on the best approach are welcome and appreciated.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.jabber.ru/pipermail/ejabberd/attachments/20120319/928101f9/attachment.html>

More information about the ejabberd mailing list