sstrigler / JSJaC

JavaScript Jabber Client Library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

get roster presence

SET001 opened this issue · comments

On connect I receive roster but it does not contain information about whether user is online now or not. How can I get this information?

Roster is just your contact list in XMPP. It does not contain information about who is online and that's the way XMPP works. Information about your contacts is sent by the server in 'presence' packets as soon as you connect and make yourself online (which means you must send at least one presence first). Simply subscribe to presences before connecting (using registerHandler() method). You can find example in simpleclient.html in examples directory.

This has nothing to do with JSJaC, this is simply how XMPP works.