[jdev] Syncing a user's status across many clients

Kevin Smith kevin at kismith.co.uk
Tue Mar 4 21:09:38 UTC 2014


On Tue, Mar 4, 2014 at 8:17 PM, Thompson, David
<dthompson2 at worcester.edu> wrote:
> Hello all,
>
> This may be a bit unconventional for XMPP, but is there a reasonable
> way to synchronize a user's status across all clients?  When one
> client changes their status from 'chat' to 'dnd', the other client's
> should change to 'dnd', too.  Additionally, when the user logs in from
> yet another location, it should also pick the 'dnd' status.
>
> I wrote a quick hack to sync the status for clients that are already
> connected, but I'm struggling to choose the right status when a new
> client connects.  I thought that I could just send a presence probe
> but the request was not authorized because users are not in their own
> roster.  Would simply adding the user to their own roster and using
> the presence probe be an acceptable solution?
>
> Are there any other options available?  Am I completely crazy? :P

You could connect, send initial presence and immediately send a new
one once you get told what your other resources are doing.

[Not pretty]

/K


More information about the JDev mailing list