简体   繁体   中英

re-invite outcast user from room

Is there a way via the API to re-invite a user to a room who has previously been outcast?

  • Created a room
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"
    }
}
  • Invited a user
POST /send_direct_invitation
{
  "name": "testroompersistent",
  "service": "foo",
  "password": "",
  "reason": "Check this out!",
  "users": "user@companyDomain.co.uk"
}
  • User joins room
  • Admin sets user affiliation to "outcast"
POST /set_room_affiliation
{
   "name": "testroompersistent",
    "service": "foo",
    "jid": "userJid",
    "affiliation": "outcast"
}
  • Invited a user again
POST /send_direct_invitation
{
  "name": "testroompersistent",
  "service": "foo",
  "password": "",
  "reason": "Check this out!",
  "users": "user@companyDomain.co.uk"
}
  • Set affiliation to "member"
POST /set_room_affiliation
{
   "name": "testroompersistent",
    "service": "foo",
    "jid": "userJid",
    "affiliation": "member"
}

I've tried to set the affiliation before and after the invite but to no avail.

I was using the jid I got back from /get_room_occupants to set the affiliation this jid had "/[numbers]" after it and I assume it wasn't setting the affiliation correctly. I was getting 0=success back but it must not have been working correctly.

I have changed the jid to exclude the random numbers I got back from /get_room_occupants. Thanks @badlop for taking the time to respond.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM