Skip to content

Commit

Permalink
use correct file when logging
Browse files Browse the repository at this point in the history
  • Loading branch information
H-Shay committed Oct 9, 2024
1 parent 8fc5d05 commit 2265011
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/protections/FirstMessageIsImage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export class FirstMessageIsImage extends Protection {
await mjolnir.managementRoomOutput.logMessage(LogLevel.WARN, "FirstMessageIsImage", `Banning ${event['sender']} for posting an image as the first thing after joining in ${roomId}.`);
if (!mjolnir.config.noop) {
if (mjolnir.moderators.includes(event["sender"])) {
await mjolnir.managementRoomOutput.logMessage(LogLevel.WARN, "BasicFlooding", `Attempting to ban ${event["sender"]} but they are member of moderation room, aborting.`);
await mjolnir.managementRoomOutput.logMessage(LogLevel.WARN, "FirstMessageIsImage", `Attempting to ban ${event["sender"]} but they are member of moderation room, aborting.`);
return;
}
await mjolnir.client.banUser(event['sender'], roomId, "spam");
Expand Down

0 comments on commit 2265011

Please sign in to comment.