From beb8adcda5d79a0f78ebccb4db24e112855af427 Mon Sep 17 00:00:00 2001 From: Aevann Date: Sun, 14 May 2023 23:36:05 +0300 Subject: [PATCH] use 'report' instead of 'flag' --- files/helpers/actions.py | 2 +- files/helpers/sanitize.py | 2 +- files/routes/reporting.py | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/files/helpers/actions.py b/files/helpers/actions.py index a058dda67..7f3d02630 100644 --- a/files/helpers/actions.py +++ b/files/helpers/actions.py @@ -473,7 +473,7 @@ def execute_under_siege(v:User, target:Optional[Union[Submission, Comment]], bod unshadowbannedcels = [x[0] for x in g.db.query(ModAction.target_user_id).filter_by(kind='unshadowban').all()] if v.id in unshadowbannedcels: return True - if type in ('flag', 'message'): + if type in ('report', 'message'): threshold = 86400 else: threshold = UNDER_SIEGE_AGE_THRESHOLD diff --git a/files/helpers/sanitize.py b/files/helpers/sanitize.py index 9014f7d48..69896af37 100644 --- a/files/helpers/sanitize.py +++ b/files/helpers/sanitize.py @@ -198,7 +198,7 @@ def execute_blackjack(v, target, body, type): if target: if type == 'submission': extra_info = target.permalink - elif type == 'flag': + elif type == 'report': extra_info = f"reports on {target.permalink}" elif type in {'comment', 'message'}: for id in notified_ids: diff --git a/files/routes/reporting.py b/files/routes/reporting.py index 5725ae957..214b94e64 100644 --- a/files/routes/reporting.py +++ b/files/routes/reporting.py @@ -22,8 +22,8 @@ def flag_post(pid, v): post = get_post(pid) reason = request.values.get("reason", "").strip() - execute_under_siege(v, post, reason, 'flag') - execute_blackjack(v, post, reason, 'flag') + execute_under_siege(v, post, reason, 'report') + execute_blackjack(v, post, reason, 'report') reason = reason[:100] og_flair = reason[1:] reason_html = filter_emojis_only(reason) @@ -89,8 +89,8 @@ def flag_comment(cid, v): if existing: abort(409, "You already reported this comment!") reason = request.values.get("reason", "").strip() - execute_under_siege(v, comment, reason, 'flag') - execute_blackjack(v, comment, reason, 'flag') + execute_under_siege(v, comment, reason, 'report') + execute_blackjack(v, comment, reason, 'report') reason = reason[:100] reason_html = filter_emojis_only(reason)