mirror of
https://github.com/the-draupnir-project/Draupnir.git
synced 2026-09-16 23:54:19 +00:00
fix spurious error log line regarding room takedowns when the room ha… (#995)
* fix spurious error log line regarding room takedowns when the room has already been taken down. This is normal, and while generally the bot shouldn't attempt to take down the same rooms which succeeded in the past, there's no way of knowing that the room hasn't been unblocked by the synapse admin API while draupnir was offline. Because there's no endpoint to get only the blocked rooms, we have to attempt to block them all again, but what we can do is lower that from critical severity to debug, since it's not actually a fatal error at all. * prettier --------- Co-authored-by: esoteric_programmer <nomail@no.email>
This commit is contained in:
co-authored by
esoteric_programmer
parent
0c448ab85e
commit
8def00c2ed
@@ -14,7 +14,7 @@ import {
|
||||
Recommendation,
|
||||
} from "matrix-protection-suite";
|
||||
import { RoomAuditLog } from "./RoomAuditLog";
|
||||
import { isError, Ok, Result, ResultError } from "@gnuxie/typescript-result";
|
||||
import { isError, Ok, Result } from "@gnuxie/typescript-result";
|
||||
import { RoomTakedownCapability } from "../../capabilities/RoomTakedownCapability";
|
||||
|
||||
const log = new Logger("RoomTakedown");
|
||||
@@ -58,9 +58,10 @@ export class StandardRoomTakedown implements RoomTakedownService {
|
||||
return isRoomTakendownResult;
|
||||
}
|
||||
if (isRoomTakendownResult.ok) {
|
||||
return ResultError.Result(
|
||||
`The room ${roomID} has already been takendown according to your homeserver`
|
||||
log.debug(
|
||||
`The room ${roomID} has already been taken down according to your homeserver`
|
||||
);
|
||||
return Ok(undefined);
|
||||
}
|
||||
const detailsResult = await this.takedownCapability.getRoomDetails(roomID);
|
||||
const takedownResult = await this.takedownCapability.takedownRoom(roomID);
|
||||
|
||||
Reference in New Issue
Block a user