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:
parent
94be4050bc
commit
9d062d63da
15 changed files with 73 additions and 27 deletions
|
@ -72,9 +72,12 @@ void ClientRoomWindow::OnRoomUpdate(const Network::RoomInformation& info) {
|
|||
}
|
||||
|
||||
void ClientRoomWindow::OnStateChange(const Network::RoomMember::State& state) {
|
||||
if (state == Network::RoomMember::State::Joined) {
|
||||
if (state == Network::RoomMember::State::Joined ||
|
||||
state == Network::RoomMember::State::Moderator) {
|
||||
|
||||
ui->chat->Clear();
|
||||
ui->chat->AppendStatusMessage(tr("Connected"));
|
||||
SetModPerms(state == Network::RoomMember::State::Moderator);
|
||||
}
|
||||
UpdateView();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue