发送直接邀请不适用于 MUC [ejabberd mod muc admin]

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

我创建 MUC 房间没问题。但是当我想添加参与者并使用以下命令时:

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

它 return 我的错误是这样的 :

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}]}]

我不知道我的命令有什么问题..那么有什么方法可以使用这个命令吗?

我发现您命令的前两个参数存在问题。第一个参数应该是不带@hostname 的房间名称,第二个参数应该是 muc 服务的名称,例如muc.localhost(你可以在配置文件中查看) 所以试试下面:

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