2
votes

I need to create multi user chat room from my module. I try to use mod_muc:create/5 -

mod_muc:create_room("conference.localhost", "testroom", "testuser@localhost", "testuser", default).

But when i run client and login, nothing happens. The room doesn't create.

How can i correctly create muc room from my module code? And where i can find in ejabberd mod_muc source code where create_room/5 executes?

Thank you.

1
Where exactly you're putting that code ?ElementalStorm
@0xAX did you manage to solve this issue?abhishek ranjan

1 Answers

2
votes

The ejabberd mod_muc source is under src/mod_muc in the ejabberd source code, see: https://github.com/processone/ejabberd/tree/master/src/mod_muc. Nothing looks wrong with your example code, you may also need to call mod_muc_room:start/7 after creation.

I would recommend using ejabberdctl debug on a developemnt ejabberd server & try these functions directly.