Question

XMPP and libstrophe...

would like to:

  1. query current active members from the contact list (e.g., green ones in Google account)
  2. keep updated with the change

sample code appreciated, thank you so much for the help

Was it helpful?

Solution

Your server will push to you presence information from your contacts: Presence available -> user went online. Presence unavailable -> user went offline.

When you first connect and starts a session, the server will sent you all presence for your online contacts. From then on, you will receive presence whenever one of your contacts change its state. So you are always updated. It's the client responsibility (that's you) to keep the current state of your contact list based on that.

imho, there is no standard way to query the server for the active members of your roster. Maybe some servers implement that functionality, don't know.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top