This commit is contained in:
Will Hunt 2024-09-19 16:43:44 +01:00
parent fadc16bc4c
commit 5d497b4ca0

View File

@ -70,7 +70,7 @@ describe("Test: Mention spam protection", function () {
return await client.sendMessage(this.mjolnir.managementRoomId, { msgtype: 'm.text', body: "!mjolnir enable MentionSpam" }); return await client.sendMessage(this.mjolnir.managementRoomId, { msgtype: 'm.text', body: "!mjolnir enable MentionSpam" });
}); });
// Also covers HTML mentions // Also covers HTML mentions
const mentionUsers = Array.from({length: DEFAULT_MAX_MENTIONS}, (_, i) => `@user${i}:example.org`); const mentionUsers = Array.from({length: DEFAULT_MAX_MENTIONS+1}, (_, i) => `@user${i}:example.org`);
const messageWithTextMentions = await client.sendText(room, 'Hello world ' + mentionUsers.join(' ')); const messageWithTextMentions = await client.sendText(room, 'Hello world ' + mentionUsers.join(' '));
const messageWithMMentions = await client.sendMessage(room, { const messageWithMMentions = await client.sendMessage(room, {
msgtype: 'm.text', msgtype: 'm.text',