how to get current active members from contact list?

439 views Asked by At

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

1

There are 1 answers

0
ppolv On BEST ANSWER

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.