如何在 ejabberd 中将 set_room_affiliation 换成 mod_muc?

How to set_room_affiliation for mod_muc in ejabberd?

您好,我正在为我的聊天应用程序使用 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 并显示错误..!失败..!!!

Ejabberd.yml mod_rest

的文件配置
 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 请...!!!

我找到了答案,我用错误的服务创建了 muc,这是 issue.Instead 使用我以其他方式创建的以下服务创建 muc 的方法..!!!

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