redact/ban reasons

This commit is contained in:
jesopo 2022-02-07 23:17:53 +00:00
parent 4cdae192b5
commit 1eebbc77cf

View File

@ -70,11 +70,11 @@ export class TrustedReporters extends Protection {
} }
if (reporters.size === this.settings.redactThreshold.value) { if (reporters.size === this.settings.redactThreshold.value) {
met.push("redact"); 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) { if (reporters.size === this.settings.banThreshold.value) {
met.push("ban"); met.push("ban");
await mjolnir.client.banUser(event.userId, roomId); await mjolnir.client.banUser(event.userId, roomId, "abuse detected");
} }