mirror of
https://github.com/matrix-org/mjolnir.git
synced 2024-10-01 01:36:06 -04:00
fix typo
This commit is contained in:
parent
ec0c8b7484
commit
0c375992ea
@ -72,7 +72,7 @@ export class MentionSpam extends Protection {
|
|||||||
public async handleEvent(mjolnir: Mjolnir, roomId: string, event: any): Promise<any> {
|
public async handleEvent(mjolnir: Mjolnir, roomId: string, event: any): Promise<any> {
|
||||||
if (event['type'] === 'm.room.message') {
|
if (event['type'] === 'm.room.message') {
|
||||||
let content = event['content'] || {};
|
let content = event['content'] || {};
|
||||||
const explicitMentions = content["m.mentions"]?.["m.user_ids"];
|
const explicitMentions = content["m.mentions"]?.user_ids;
|
||||||
const hitLimit = this.checkMentions(content.body, content.formatted_body, explicitMentions);
|
const hitLimit = this.checkMentions(content.body, content.formatted_body, explicitMentions);
|
||||||
if (hitLimit) {
|
if (hitLimit) {
|
||||||
await mjolnir.managementRoomOutput.logMessage(LogLevel.WARN, "MentionSpam", `Redacting event from ${event['sender']} for spamming mentions. ${Permalinks.forEvent(roomId, event['event_id'], [new UserID(await mjolnir.client.getUserId()).domain])}`);
|
await mjolnir.managementRoomOutput.logMessage(LogLevel.WARN, "MentionSpam", `Redacting event from ${event['sender']} for spamming mentions. ${Permalinks.forEvent(roomId, event['event_id'], [new UserID(await mjolnir.client.getUserId()).domain])}`);
|
||||||
|
Loading…
Reference in New Issue
Block a user