From 726924067c2e0b2825ed3eb48030217ba644cb97 Mon Sep 17 00:00:00 2001 From: Neil Williams Date: Tue, 21 May 2013 15:02:21 -0700 Subject: [PATCH] butler: Don't send notifications if you're just spamming. --- r2/r2/lib/butler.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/r2/r2/lib/butler.py b/r2/r2/lib/butler.py index 333f86be9..78893e80e 100644 --- a/r2/r2/lib/butler.py +++ b/r2/r2/lib/butler.py @@ -63,6 +63,10 @@ def monitor_mentions(comment): usernames = list(extract_user_mentions(comment.body)) inbox_class = Inbox.rel(Account, Comment) + # don't be a jerk spammer + if len(usernames) > 3: + return + # Subreddit.can_view stupidly requires this. c.user_is_loggedin = True