xmppejabberdnode-xmppprosody-im

How to share Presence among Resources?


I'm developing a cross-platform application and which incoorperates XMPP (ejabberd). How can I share presence among resources?

Please consider the following scenario:

User A is logged onto three devices: PC, Android and iOS. User A, using Android, sets his presence to 'away'. How can I set (synchronise) the other resources to 'away' (and send out presence stanzas)?

I'm looking to solve this problem using the XMPP protocol / ejabberd server; not by adding logic to the clients.


Solution

  • You do not really need to synchronise presence among your resource. What you need is a display rules from your other clients.

    For example, if a user has three different resources you may decide:

    So, you do not net to synchronize them as you will lose precision. Simply define your presence display rules, based on the goal of your client application.