Search code examples
ejabberdmultiuserchat

send direct invitation not working on MUC [ejabberd mod muc admin]


i have no problem to create MUC room. But when i want to add participant and use below command :

ejabberdctl send_direct_invitation testRoom@localhost localhost "" "hi" msg_test1@localhost

it return me error like this :

Problem 'error function_clause' occurred executing the command.

Stacktrace: [{jid,to_string,[error],[{file,"src/jid.erl"},{line,134}]},
             {mod_muc_admin,send_direct_invitation,5,
                            [{file,"src/mod_muc_admin.erl"},{line,695}]},
             {ejabberd_commands,execute_command2,2,
                                [{file,"src/ejabberd_commands.erl"},
                                 {line,407}]},
             {ejabberd_ctl,call_command,3,
                           [{file,"src/ejabberd_ctl.erl"},{line,295}]},
             {ejabberd_ctl,try_call_command,3,
                           [{file,"src/ejabberd_ctl.erl"},{line,271}]},
             {ejabberd_ctl,process2,3,
                           [{file,"src/ejabberd_ctl.erl"},{line,220}]},
             {ejabberd_ctl,process,1,
                           [{file,"src/ejabberd_ctl.erl"},{line,205}]},
             {rpc,'-handle_call_call/6-fun-0-',5,
                  [{file,"rpc.erl"},{line,206}]}]

i dont know what is wrong with my command .. so is it any way to use the command?


Solution

  • I can see issue with the first two parameters of your command. first parameter should be room name without @hostname and second paramater should be the name of muc service e.g. muc.localhost (you can check this in config file) So try below:

    ejabberdctl send_direct_invitation testRoom muc.localhost "" "hi" msg_test1@localhost