From 1c42e1ef7a93388e4e818d9e551489741bed5035 Mon Sep 17 00:00:00 2001 From: gnuxie Date: Mon, 31 Oct 2022 17:28:20 +0000 Subject: [PATCH] Warn about room level bans when using unban https://github.com/matrix-org/mjolnir/issues/394 --- src/commands/UnbanBanCommand.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/commands/UnbanBanCommand.ts b/src/commands/UnbanBanCommand.ts index ad7d7c7..9fa061f 100644 --- a/src/commands/UnbanBanCommand.ts +++ b/src/commands/UnbanBanCommand.ts @@ -157,6 +157,8 @@ export async function execUnbanCommand(roomId: string, event: any, mjolnir: Mjol await mjolnir.managementRoomOutput.logMessage(LogLevel.DEBUG, "UnbanBanCommand", `Syncing lists to ensure no users were accidentally unbanned`); await mjolnir.protectedRoomsTracker.syncLists(mjolnir.config.verboseLogging); } + } else if (USER_RULE_TYPES.includes(bits.ruleType!) && bits.reason === 'false') { + await mjolnir.managementRoomOutput.logMessage(LogLevel.WARN, "UnbanBanCommand", "Running unban without `unban true` will not override existing room level bans"); } await mjolnir.client.unstableApis.addReactionToEvent(roomId, event['event_id'], '✅');