0

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.

Pinank Lakhani
  • 1,109
  • 2
  • 11
  • 31

1 Answers1

0

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.

Badlop
  • 3,840
  • 1
  • 8
  • 9
  • Roster versioning can be a way. but in backend ejabberd api or in ejabberdctl there is not documentation of how can i assign roster version to a contact. I have enabled api module and calling apis for registering users on roster when any user signups on my platform – Pinank Lakhani Mar 03 '23 at 06:23
  • Available strophe plugin supports XEP-0237. Its is marked as Obsolete but the author and updated with https://datatracker.ietf.org/doc/html/rfc6121 As the current roster plugin for strophe.js is using Obsolete version is it preferable to use it in production? – Pinank Lakhani Mar 03 '23 at 07:34
  • mod_roster in ejabberd says it implements XEP-0237 version 1.3. Probably it will work with Strophe. It's worth trying, maybe you are lucky and it works. – Badlop Mar 03 '23 at 14:42