From 01a1f4cbe3d9ccf0b1383c23a5538bcf5cda2179 Mon Sep 17 00:00:00 2001 From: Miikka Date: Fri, 3 Aug 2018 11:23:08 +0300 Subject: [PATCH] fix(spam): recent actions being considered from all users, not just the author of the message being evaluated --- src/plugins/Spam.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/plugins/Spam.ts b/src/plugins/Spam.ts index 0b0df1c7..1a2d4985 100644 --- a/src/plugins/Spam.ts +++ b/src/plugins/Spam.ts @@ -90,6 +90,7 @@ export class SpamPlugin extends Plugin { if (action.timestamp < since) return false; if (action.type !== type) return false; if (action.channelId !== channelId) return false; + if (action.userId !== userId) return false; return true; }); } @@ -99,6 +100,7 @@ export class SpamPlugin extends Plugin { if (action.timestamp < since) return count; if (action.type !== type) return count; if (action.channelId !== channelId) return count; + if (action.userId !== userId) return false; return count + action.count; }, 0); }