Reputation: 51
I am currently developing chat system for our application using ejabberd API.
I am having a problem on how to retrieve a list of subscribed group by username.
I only can retrieve a list of groups that user occupied, but not subscribed using get_room_users API.
My reference: https://docs.ejabberd.im/developer/ejabberd-api/admin-api/
My question:
How to retrieve list of subscribed group by username?
Do I need to register all subscribers to the group to make use of get_room_users API?
Upvotes: 3
Views: 484
Reputation: 4120
- How to retrieve list of subscribed group by username?
There is no command to obtain that information.
- Do I need to register all subscribers to the group to make use of get_room_users API?
I guess you mean get_room_occupants. Well, if you make the room subscribers also members of the room, then you can use get_room_affiliations, for example:
$ ejabberdctl get_room_affiliations room1 conference.localhost
user2 localhost member
user1 localhost owner
Upvotes: 2