mirror of
https://github.com/matrix-org/mjolnir.git
synced 2024-10-01 01:36:06 -04:00
Move ban message to INFO
Fixes https://github.com/matrix-org/mjolnir/issues/19
This commit is contained in:
parent
5b4c253002
commit
8e5f8c19af
@ -65,7 +65,7 @@ export async function applyUserBans(lists: BanList[], roomIds: string[], mjolnir
|
||||
// User needs to be banned
|
||||
|
||||
// We specifically use sendNotice to avoid having to escape HTML
|
||||
await logMessage(LogLevel.DEBUG, "ApplyBan", `Banning ${member.userId} in ${roomId} for: ${userRule.reason}`);
|
||||
await logMessage(LogLevel.INFO, "ApplyBan", `Banning ${member.userId} in ${roomId} for: ${userRule.reason}`);
|
||||
|
||||
if (!config.noop) {
|
||||
// Always prioritize redactions above bans
|
||||
@ -96,16 +96,5 @@ export async function applyUserBans(lists: BanList[], roomIds: string[], mjolnir
|
||||
}
|
||||
}
|
||||
|
||||
if (bansApplied > 0) {
|
||||
const html = `<font color="#00cc00"><b>Banned ${bansApplied} people</b></font>`;
|
||||
const text = `Banned ${bansApplied} people`;
|
||||
await mjolnir.client.sendMessage(config.managementRoom, {
|
||||
msgtype: "m.notice",
|
||||
body: text,
|
||||
format: "org.matrix.custom.html",
|
||||
formatted_body: html,
|
||||
});
|
||||
}
|
||||
|
||||
return errors;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user