r712m
r712m

Reputation: 349

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.

Upvotes: 0

Views: 189

Answers (1)

Mickaël Rémond
Mickaël Rémond

Reputation: 9055

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:

  • To display the most available resource of the three.
  • To display the most recent one.
  • To display the one with the highest priority.

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.

Upvotes: 2

Related Questions