add redact PL check

This commit is contained in:
Henry Hiles 2026-04-05 22:00:34 -04:00
commit b80bd557dd
Signed by: Henry-Hiles
SSH key fingerprint: SHA256:VKQUdS31Q90KvX7EkKMHMBpUspcmItAh86a+v7PGiIs
3 changed files with 16 additions and 3 deletions

View file

@ -50,6 +50,10 @@ class PowerLevelController extends Notifier<bool> {
};
}
if (config.eventType == "m.room.redaction") {
return userLevel >= (event.content["redact"] as int? ?? 50);
}
final requiredLevel = events.containsKey(config.eventType)
? (events[config.eventType] as int)
: (config.isStateEvent