re-invite outcast user from room

92 views Asked by At

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": "[email protected]"
}
  • 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": "[email protected]"
}
  • 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.

1

There are 1 answers

0
FullStack On BEST ANSWER

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.