From 8bd2491a854322829308c9cbb96414b6831abf7b Mon Sep 17 00:00:00 2001 From: Aevann Date: Mon, 27 Feb 2023 14:49:19 +0200 Subject: [PATCH] higher threshold for reports and DMs --- files/helpers/actions.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/files/helpers/actions.py b/files/helpers/actions.py index b6cd354d5..96cc3b954 100644 --- a/files/helpers/actions.py +++ b/files/helpers/actions.py @@ -412,7 +412,13 @@ def execute_antispam_comment_check(body:str, v:User): def execute_under_siege(v:User, target:Optional[Union[Submission, Comment]], body, type:str) -> bool: if not get_setting("under_siege"): return True - if not v.shadowbanned and v.age < UNDER_SIEGE_AGE_THRESHOLD and not v.admin_level >= PERMS['SITE_BYPASS_UNDER_SIEGE_MODE']: + + if type in ('flag', 'message'): + threshold = 86400 + else: + threshold = UNDER_SIEGE_AGE_THRESHOLD + + if not v.shadowbanned and v.age < threshold and not v.admin_level >= PERMS['SITE_BYPASS_UNDER_SIEGE_MODE']: v.shadowbanned = AUTOJANNY_ID ma = ModAction(