network, citra_qt: Give moderation permission to community mods

Based on the `roles` payload in the JWT, the rooms will now give mod permission to Citra Community Moderators. To notify the client of its permissions, a new response, IdJoinSuccessAsMod is added, and there's now a new RoomMember::State called Moderator.
This commit is contained in:
zhupengfei 2018-12-15 17:13:46 +08:00
parent 94be4050bc
commit 9d062d63da
No known key found for this signature in database
GPG key ID: DD129E108BD09378
15 changed files with 73 additions and 27 deletions

View file

@ -109,7 +109,7 @@ void Lobby::OnJoinRoom(const QModelIndex& source) {
// Prevent the user from trying to join a room while they are already joining.
if (member->GetState() == Network::RoomMember::State::Joining) {
return;
} else if (member->GetState() == Network::RoomMember::State::Joined) {
} else if (member->IsConnected()) {
// And ask if they want to leave the room if they are already in one.
if (!NetworkMessage::WarnDisconnect()) {
return;