Closed Bug 1107743 Opened 10 years ago Closed 10 years ago

Set 'moderator' role when the room owner joins a room

Categories

(Hello (Loop) :: Server, defect, P1)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mikedeboer, Assigned: alexis+bugs)

References

Details

Attachments

(1 file)

Right now the role is set to 'publisher' by default, so we can't forceDisconnect() the other connections when the owner deletes a room.
Alexis, do you have enough information here to work on a solution?
Flags: needinfo?(alexis+bugs)
I think I do, yes. This was next on my list, so I'm now on it :)
Flags: needinfo?(alexis+bugs)
Ah, sorry, I was actually confusing this with bug 1107536 which should be out before that, so this will take some more time.
Okay, so as specified at https://wiki.mozilla.org/Loop/Architecture/Rooms#Removing_Participants_from_a_Room, 

> When the server generates a session participant token, it can also select a participant role. When creating a token for the room owner, the server must include a "role" of "moderator," which will allow the room owner to remove participants from rooms.
> 
> To remove a user from a room, the owner then uses the forceDisconnect method on the Sessionto remove a user from the room. Upon receiving a disconnection event for their own connection with a reason of "forceDisconnect," the removed client will remove himself from the session by calling POST /rooms/{token}. 

If I understand that properly, on the loop-server side, we just need to issue a token with a different role in the case we're creating the participant token of the room owner.
Assignee: nobody → alexis+bugs
This should be the fix you want.
Attachment #8533757 - Flags: review?(tarek)
Attachment #8533757 - Flags: feedback?(mdeboer)
Comment on attachment 8533757 [details] [diff] [review]
Set 'moderator' role when the room owner joins a room

https://github.com/mozilla-services/loop-server/commit/0aed2e89fd92fb11e132343bb9d60a60e23a61ce
Attachment #8533757 - Flags: review?(tarek) → review+
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
I'd sure like to test this... is it on the dev server tomorrow? Thanks for fixing this!
Flags: needinfo?(alexis+bugs)
Yes, I updated the dev-server to actually serve what's in 0.14.1.
Flags: needinfo?(alexis+bugs)
Comment on attachment 8533757 [details] [diff] [review]
Set 'moderator' role when the room owner joins a room

While working with the dev server, I've seen this working as expected. Thanks Alexis!
Attachment #8533757 - Flags: feedback?(mdeboer) → feedback+
Blocks: 1092954
Depends on: 1118246
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: