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
|
@ -140,7 +140,9 @@ std::list<Network::WifiPacket> GetReceivedBeacons(const MacAddress& sender) {
|
|||
/// Sends a WifiPacket to the room we're currently connected to.
|
||||
void SendPacket(Network::WifiPacket& packet) {
|
||||
if (auto room_member = Network::GetRoomMember().lock()) {
|
||||
if (room_member->GetState() == Network::RoomMember::State::Joined) {
|
||||
if (room_member->GetState() == Network::RoomMember::State::Joined ||
|
||||
room_member->GetState() == Network::RoomMember::State::Moderator) {
|
||||
|
||||
packet.transmitter_address = room_member->GetMacAddress();
|
||||
room_member->SendWifiPacket(packet);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue