From 4fdb142ac25148e623d0390663bb3da1d8af2cf7 Mon Sep 17 00:00:00 2001 From: gnuxie Date: Mon, 17 Mar 2025 13:01:49 +0000 Subject: [PATCH] Only audit takedown when capabilities are not simulated. --- src/protections/RoomTakedown/RoomTakedown.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/protections/RoomTakedown/RoomTakedown.ts b/src/protections/RoomTakedown/RoomTakedown.ts index b29bf7f7..db4fb3a3 100644 --- a/src/protections/RoomTakedown/RoomTakedown.ts +++ b/src/protections/RoomTakedown/RoomTakedown.ts @@ -70,9 +70,11 @@ export class StandardRoomTakedown implements RoomTakedownService { const takedownResult = await this.takedownCapability.takedownRoom(roomID); if (isError(takedownResult)) { return takedownResult; + } + // Only audit the takedown if the capability is not simulated. + if (this.takedownCapability.isSimulated) { + return Ok(undefined); } else { - // FIXME: we should probably audit as simulated if the capability is simulated. - // or not audit at all because the protection preview might show things otherwise. return await this.auditLog.takedownRoom(rule); } }