如何在ejabberd中为mod_muc设置set_room_affiliation?

时间:2016-07-20 19:30:54

标签: ejabberd ejabberd-module ejabberd-api

您正在使用ejabberd版本16.04进行我的聊天应用程序,并使用mod_rest创建一个muc房间和发送房间邀请,现在我需要的是set_room_affiliation为特定的mod_muc,但它说错误可能有人帮助我请... !!!

下面是每个相应的ejabberd命令传递的参数

创建团队

{"key": "secret","command": "create_room","args": ["kandan_team","conference","kandan.com"]}

团队已创建。通过... !!!

向用户1发送会议室邀请

{"key": "secret","command": "send_direct_invitation","args": ["kandan_team","conference","none", "team_inviataion", "user1@kandan.com"]}

邀请成功发送.. !!!通过.. !!!

向用户2发送会议室邀请

{"key": "secret","command": "send_direct_invitation","args": ["kandan_team","conference","none", "team_inviataion", "user2@kandan.com"]}

邀请成功发送.. !!!通过.. !!!

从团队中删除user1

{"key":"secret","command":"set_room_affiliation","args":["kandan_team", "conference", "user1@kandan.com", "outcast"]}

无法删除user1并说错误..!失败.. !!!

mod_rest

的Ejabberd.yml文件配置
 mod_restful:
 api:
  - path: ["admin"]
    module: mod_restful_admin
    params:
      key: "secret"
      allowed_commands: [register, unregister,status, add_rosteritem, create_room, send_direct_invitation, set_room_affiliation]
  - path: ["register"]
    module: mod_restful_register
    params:
      key: "secret"

所以有人可以帮我解决如何设置set_room_affiliation ... !!!

1 个答案:

答案 0 :(得分:0)

我找到了答案,我用错误的服务创建了muc是问题。而不是用以下服务创建muc我以其他方式创建.. !!!

{"key": "secret","command": "create_room","args": ["kandan_team","conference.kandan.com","kandan.com"]}