0

有没有办法通过 API 重新邀请用户到以前被抛弃的房间?

  • 创建了一个房间
POST /create_room_with_opts
{
    "name": "testroompersistent", 
    "service": "foo", 
    "host": "bar" ,
    "options": {
                "title": "Super important meeting",
                "description": "This meeting is super important",
                "persistent": "true",
                "allow_user_invites": "true"
    }
}
  • 邀请了一个用户
POST /send_direct_invitation
{
  "name": "testroompersistent",
  "service": "foo",
  "password": "",
  "reason": "Check this out!",
  "users": "user@companyDomain.co.uk"
}
  • 用户加入房间
  • 管理员将用户隶属关系设置为“弃儿”
POST /set_room_affiliation
{
   "name": "testroompersistent",
    "service": "foo",
    "jid": "userJid",
    "affiliation": "outcast"
}
  • 再次邀请用户
POST /send_direct_invitation
{
  "name": "testroompersistent",
  "service": "foo",
  "password": "",
  "reason": "Check this out!",
  "users": "user@companyDomain.co.uk"
}
  • 将隶属关系设置为“成员”
POST /set_room_affiliation
{
   "name": "testroompersistent",
    "service": "foo",
    "jid": "userJid",
    "affiliation": "member"
}

我尝试在邀请之前和之后设置从属关系,但无济于事。

4

1 回答 1

0

我正在使用从 /get_room_occupants 返回的 jid 来设置这个 jid 后面有“/[numbers]”的隶属关系,我认为它没有正确设置隶属关系。我得到了 0=success,但它一定不能正常工作。

我已更改 jid 以排除从 /get_room_occupants 返回的随机数。感谢@badlop 花时间回复。

于 2020-10-28T09:14:16.380 回答