Push Notifications for 1:1 and MUC Offline Users

Justin Soong
Added about 4 years ago


Looking at Push Notifications for offline users for both 1:1 and MUC chat

There doesn't seem to be alot of documentation for this use case, there seems to be arrows pointing towards AMP, but after reading the docs it doesn't seem to have an out of the box way to forward offline messages to a gateway/push service, the only thing pretty clear is offline storage of messsages for delivery later.

Has any one tried implementing Push for offline users, it seems that a postprocessing plugin would be best option?



Replies (5)

Added by Wojciech Kapcia TigaseTeam about 4 years ago

First of all - I don't think that there is much of a use case in terms of offline users vs MUC - that is, if the user is offline it's not an occupant of the room therefore no messages are being send to that user and thus nothing is saved to offline store.

As for the push for offline user -- could you briefly discribe what do you mean? How would it work? If you are implying something like GMS/APNS then you would need to create a separate plugin which would handle desired packets (be that messages) and then call the push service with the notification. It can run along regular set of plugins (for example amp or offline messages) that would perform regular operations (i.e. store offline messages) and your plugin will simply be used to push notifications to the service when given packet is received.

Added by Justin Soong about 4 years ago

Ok thanks, then does that mean that a user's membership of a room is not persisted, if the user logs out and logs back in, the user will not be automatically joined back to the room, and if any important discussions occur in that room the user will miss it.

Yes it will be used for APN. The use case is that, every message whether 1:1 or in a room that a user joins is important, and should be notified via something like APN.

Added by Ganesh Krishnan about 4 years ago

For MUC there is an option to set number of previous messages to receive once he logs back in. But yes, the user is removed from room when he "logs out" or his presence is changed to unavailable.

For push notification that really depends on the implementation that you want.

Both these problems I have solved in my fork of Tigase (MUC I modified XMPP to add user to room on invite receive and to never kick the user out of room, for push I have implemented Google Cloud Messaging). I plan to open source them in a couple of weeks. If you want to keep up you can subscribe to my community:

Added by raj vasani about 4 years ago

Hi Ganesh,

Are you open sourced your fork ??

Added by Ganesh Krishnan about 4 years ago

Not yet. We are yet to close all bugs and create a public git repo. Possibly within June we should have put it on public repo.