mirror of
https://github.com/matrix-org/mjolnir.git
synced 2024-07-07 11:51:56 +00:00
Don't mention updates for rooms we don't protect
This commit is contained in:
parent
aecc6e4882
commit
9056634124
|
@ -222,7 +222,9 @@ export class Mjolnir {
|
||||||
}
|
}
|
||||||
|
|
||||||
private async handleEvent(roomId: string, event: any) {
|
private async handleEvent(roomId: string, event: any) {
|
||||||
if (event['type'] === 'm.room.power_levels' && event['state_key'] === '' && Object.keys(this.protectedRooms).includes(roomId)) {
|
if (!Object.keys(this.protectedRooms).includes(roomId)) return;
|
||||||
|
|
||||||
|
if (event['type'] === 'm.room.power_levels' && event['state_key'] === '') {
|
||||||
// power levels were updated - recheck permissions
|
// power levels were updated - recheck permissions
|
||||||
const url = this.protectedRooms[roomId];
|
const url = this.protectedRooms[roomId];
|
||||||
const html = `Power levels changed in <a href="${url}">${roomId}</a> - checking permissions...`;
|
const html = `Power levels changed in <a href="${url}">${roomId}</a> - checking permissions...`;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user