From e99f978b777471980fc87bca486db1bb43f5552b Mon Sep 17 00:00:00 2001 From: Aevann Date: Tue, 7 Mar 2023 03:08:10 +0200 Subject: [PATCH] exclude jannies with perm USE_ADMIGGER_THREADS from comment spam check --- files/helpers/actions.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/files/helpers/actions.py b/files/helpers/actions.py index bb3e7fc3d..5c5443571 100644 --- a/files/helpers/actions.py +++ b/files/helpers/actions.py @@ -371,6 +371,8 @@ def execute_antispam_submission_check(title, v, url): return True def execute_antispam_duplicate_comment_check(v:User, body_html:str): + if v.admin_level >= PERMS['USE_ADMIGGER_THREADS']: return + ''' Sanity check for newfriends ''' @@ -390,6 +392,8 @@ def execute_antispam_duplicate_comment_check(v:User, body_html:str): abort(403, "Too much spam!") def execute_antispam_comment_check(body:str, v:User): + if v.admin_level >= PERMS['USE_ADMIGGER_THREADS']: return + if v.id in ANTISPAM_BYPASS_IDS: return if len(body) <= COMMENT_SPAM_LENGTH_THRESHOLD: return now = int(time.time())