From 4f73da38b893065382cf08438a8687daa570ed7d Mon Sep 17 00:00:00 2001 From: Will Hunt Date: Thu, 19 Sep 2024 22:41:51 +0100 Subject: [PATCH] await redact in nsfw protection --- src/protections/NsfwProtection.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/protections/NsfwProtection.ts b/src/protections/NsfwProtection.ts index 040bf1c..6be229a 100644 --- a/src/protections/NsfwProtection.ts +++ b/src/protections/NsfwProtection.ts @@ -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}`); - } } }