Strophe.js: Fetch group wise users from roster instead of fetching all together and local filter

38 views Asked by At

I want to list a particular groups user only in UI because in my case each user can not list all user.

In my case, user will have list of only those connections whose parent entities are connected.

1

There are 1 answers

3
Badlop On

Do you want to write a XMPP client that logins to a XMPP server, and gets only some contacts from its roster, based in a filter?

That filtering feature is not defined in the protocol, see 2.2. Retrieving the Roster on Login

When the client asks for its roster, it asks for ALL the roster items, it cannot be filtered by group. The client gets ALL the roster items, and later shows or hides or groups them when presenting them to the user.

If you are worried that your users have many contacts in their roster, and client login consumes a lot of bandwidth. In that case, take a look at Roster Versioning. It was initially described in XEP-0237, and the latest protocol description can nowadays be found in 2.6. Roster Versioning.