sstrigler / JSJaC

JavaScript Jabber Client Library
Other
295 stars 86 forks source link

get roster presence #67

Closed SET001 closed 10 years ago

SET001 commented 10 years ago

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?

rraptorr commented 10 years ago

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.

SET001 commented 10 years ago

Thanx.