3

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:

  1. How to retrieve list of subscribed group by username?

  2. Do I need to register all subscribers to the group to make use of get_room_users API?

1 Answers1

2
  1. How to retrieve list of subscribed group by username?

There is no command to obtain that information.

  1. 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
Badlop
  • 3,840
  • 1
  • 8
  • 9
  • Hi Badlop, thank you for your reply. I can retrieve all subscribers if I know the room name, but I need to retrieve by username only. But I already solved this problem few days after posted in here with different approach. – Mohamad Raziman Md Dom Jul 07 '18 at 09:37
  • 1
    @MohamadRazimanMdDom can you share the approach you made? Im also have the same requirement – vvavepacket Jul 10 '20 at 19:33