From f608d3427113882f9d419ac345d2ea2a33e4b809 Mon Sep 17 00:00:00 2001 From: Matthew Miller Date: Fri, 26 Jul 2019 18:21:50 +1000 Subject: [PATCH 1/2] fix: prevent using @everyone from an IRC channel --- lib/bot.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/bot.js b/lib/bot.js index 8bc83acf..24dce44d 100644 --- a/lib/bot.js +++ b/lib/bot.js @@ -560,7 +560,8 @@ class Bot { webhook.client.sendMessage(withMentions, { username, text, - avatarURL + avatarURL, + disableEveryone: true }).catch(logger.error); return; } From 8afec235dc5ee16e37e83f8b8abebb8688fd5b2a Mon Sep 17 00:00:00 2001 From: Matthew Miller Date: Fri, 26 Jul 2019 18:29:34 +1000 Subject: [PATCH 2/2] Update tests --- test/bot.test.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/bot.test.js b/test/bot.test.js index 6f1a1a58..cc1450c0 100644 --- a/test/bot.test.js +++ b/test/bot.test.js @@ -986,6 +986,7 @@ describe('Bot', function () { username: 'n_', text, avatarURL: null, + disableEveryone: true, }); }); @@ -999,6 +1000,7 @@ describe('Bot', function () { username: '12345678901234567890123456789012', text, avatarURL: null, + disableEveryone: true, }); });