0

Is it possible to add a user instatnly to the MUC? I created room, granted the new user membership and role but then the added user still doesn't exist in the room.

He appears in the users list only if he accepts an invitation / or joins to this room by his own.

Any ideas? Is it possible?

Thanks

  • A MUC room is like a physical meeting room: you can add a user name to the list of people allowed to enter the room... but only when that person actually enters the room, he will get updates on what happens in the room. This means that the user should login to his account using a XMPP client, and then join the room. That way, that client will receive all the room stuff. – Badlop May 18 '22 at 14:40
  • On the other hand, if you want a XMPP client to receive messages from a muc room even if that client didn't join the room, that user can use muc/sub to "subscribe" to the room. Take a look at https://docs.ejabberd.im/developer/xmpp-clients-bots/extensions/muc-sub/ – Badlop May 18 '22 at 14:41
  • @Badlop Can I mange this, like As I user1 I want to add subscription to user2 that means he can recieive messages even if he didn't know about this room? Or it's the same that he needs first join and subscribe by himself? – michalgrzegorczyk-dev May 18 '22 at 14:49
  • Looking at the documentation, using XMPP only a client can subscribe itself, nobody else can do it. But a server admin can use ejabberd API commands to subscribe any account: https://docs.ejabberd.im/developer/ejabberd-api/admin-api/#subscribe-room – Badlop May 19 '22 at 11:07

0 Answers0