Skip to content

Commit

Permalink
Don't send the banned word in the ban reason
Browse files Browse the repository at this point in the history
Signed-off-by: nexy7574 <[email protected]>
  • Loading branch information
nexy7574 committed Jan 11, 2025
1 parent c0d4627 commit 03a080f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/protections/WordList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,12 +193,16 @@ export class WordListProtection

const match = this.badWords.exec(message);
if (match) {
const reason = `bad word: ${match[0]}`;
const reason = `Said a bad word. Moderators, consult the management room for more information.`;
await this.userConsequences.consequenceForUserInRoom(
roomID,
event.sender,
reason
);
await this.draupnir.client.sendMessage(this.draupnir.managementRoomID, {
msgtype: "m.notice",
body: `Banned ${event.sender} in ${roomID} for saying '${match[0]}'.`,
});
await this.eventConsequences.consequenceForEvent(
roomID,
event.event_id,
Expand Down

0 comments on commit 03a080f

Please sign in to comment.