From 208f9974f9b90588958701030ca242ec0640103a Mon Sep 17 00:00:00 2001 From: Ben Rog-Wilhelm Date: Thu, 8 Aug 2024 07:45:48 -0500 Subject: [PATCH] Suppress reports created by shadowbanned users. --- files/routes/reporting.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/files/routes/reporting.py b/files/routes/reporting.py index bcf0e608c..9d7f5e8f3 100644 --- a/files/routes/reporting.py +++ b/files/routes/reporting.py @@ -52,7 +52,8 @@ def api_flag_comment(cid, v): g.db.add(flag) # We only want to notify if the user is not permabanned - if not v.is_suspended_permanently: + # this should probably be a "reportbanned" flag that's applied manually that also clears their reports, but that's a lot more work + if not v.is_suspended_permanently and not v.shadowbanned: g.db.query(Comment) \ .where(Comment.id == comment.id, Comment.state_report != StateReport.IGNORED) \ .update({Comment.state_report: StateReport.REPORTED})