mirror of
https://github.com/matrix-org/mjolnir.git
synced 2024-10-01 01:36:06 -04:00
Compare commits
2 Commits
5f4178ff30
...
d3f8c033b1
Author | SHA1 | Date | |
---|---|---|---|
|
d3f8c033b1 | ||
|
4f73da38b8 |
@ -60,10 +60,9 @@ export class NsfwProtection extends Protection {
|
||||
if (prediction["probability"] > mjolnir.config.nsfwSensitivity) {
|
||||
await mjolnir.managementRoomOutput.logMessage(LogLevel.INFO, "NSFWProtection", `Redacting ${event["event_id"]} for inappropriate content.`);
|
||||
try {
|
||||
mjolnir.client.redactEvent(roomId, event["event_id"])
|
||||
await mjolnir.client.redactEvent(roomId, event["event_id"]);
|
||||
} catch (err) {
|
||||
await mjolnir.managementRoomOutput.logMessage(LogLevel.ERROR, "NSFWProtection", `There was an error redacting ${event["event_id"]}: ${err}`);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user