mirror of
https://github.com/matrix-org/mjolnir.git
synced 2024-10-01 01:36:06 -04:00
redact/ban reasons
This commit is contained in:
parent
4cdae192b5
commit
1eebbc77cf
@ -70,11 +70,11 @@ export class TrustedReporters extends Protection {
|
||||
}
|
||||
if (reporters.size === this.settings.redactThreshold.value) {
|
||||
met.push("redact");
|
||||
await mjolnir.client.redactEvent(roomId, event.id);
|
||||
await mjolnir.client.redactEvent(roomId, event.id, "abuse detected");
|
||||
}
|
||||
if (reporters.size === this.settings.banThreshold.value) {
|
||||
met.push("ban");
|
||||
await mjolnir.client.banUser(event.userId, roomId);
|
||||
await mjolnir.client.banUser(event.userId, roomId, "abuse detected");
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user