0xAX
0xAX

Reputation: 21837

Create muc room programmatically

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.

Upvotes: 2

Views: 1295

Answers (1)

user324312
user324312

Reputation:

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.

Upvotes: 2

Related Questions