[jdev] Self Status
kevin at kismith.co.uk
Mon Dec 3 08:24:22 UTC 2012
On Mon, Dec 3, 2012 at 8:20 AM, andy nes <andynes83 at gmail.com> wrote:
> When a user changes their status in the client, how can app know for sure
> that the status is changes at the server? Does xmpp server(ejabberd in my
> case) send any acknowledgement for a successful change in the status?
Yes, you'll receive a copy when your status is set.
> Also, at any time, what if the user (client lib) wants to find out his
> status (available, busy etc)
It can remember it.
> I know that the client can know the status as he can capture it when the
> user changes it, but that might not always be true. What if the client sends
> a status change, but due to some unforeseen reasons, the server doesn't
> change that. Now the client and server are out of sync.
This will only happen if the connection from the client to the server
has dropped, in which case you'll find out because you stop getting
replies from the server and eventually your socket will close (you can
use XEP-0198 acks to know what the last acked stanza was), in which
case being able to poll the server wouldn't help because your session
is already dead.
> So, is there a way to find out my own status asking the server?
More information about the JDev