Only audit takedown when capabilities are not simulated.

This commit is contained in:
gnuxie
2025-03-21 16:19:09 +00:00
parent 003410d41a
commit 4fdb142ac2
+4 -2
View File
@@ -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);
}
}