Skip to content

Commit

Permalink
Stop ProtectedRoomsSet verifying permissions for unprotected rooms.
Browse files Browse the repository at this point in the history
  • Loading branch information
Gnuxie committed Oct 18, 2022
1 parent 7f0486a commit ad89eb6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/ProtectedRoomsSet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,9 @@ export class ProtectedRoomsSet {
if (event['sender'] === this.clientUserId) {
throw new TypeError("`ProtectedRooms::handleEvent` should not be used to inform about events sent by mjolnir.");
}
if (!this.protectedRooms.has(roomId)) {
return; // We're not protecting this room.
}
this.protectedRoomActivityTracker.handleEvent(roomId, event);
if (event['type'] === 'm.room.power_levels' && event['state_key'] === '') {
// power levels were updated - recheck permissions
Expand Down

0 comments on commit ad89eb6

Please sign in to comment.