From 55370860acabe4ab990e6e609a6f6ab0744f0dbf Mon Sep 17 00:00:00 2001 From: Aevann Date: Tue, 25 Apr 2023 09:15:48 +0200 Subject: [PATCH] do this https://rdrama.net/post/18459/marseycapywalking-megathread-for-bugs-and-suggestions/3933779#context --- files/routes/reporting.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/files/routes/reporting.py b/files/routes/reporting.py index 56aff6c12..888204fd0 100644 --- a/files/routes/reporting.py +++ b/files/routes/reporting.py @@ -67,7 +67,7 @@ def flag_post(pid, v): flag = Flag(post_id=post.id, user_id=v.id, reason=reason) g.db.add(flag) - if v.id != post.author_id and not v.shadowbanned: + if v.id != post.author_id and not v.shadowbanned and not post.author.has_blocked(v): message = f'@{v.username} reported [{post.title}]({post.shortlink})\n\n> {reason}' send_repeatable_notification(post.author_id, message) @@ -99,7 +99,7 @@ def flag_comment(cid, v): flag = CommentFlag(comment_id=comment.id, user_id=v.id, reason=reason) g.db.add(flag) - if v.id != comment.author_id and not v.shadowbanned: + if v.id != comment.author_id and not v.shadowbanned and not comment.author.has_blocked(v): message = f'@{v.username} reported your [comment]({comment.shortlink})\n\n> {reason}' send_repeatable_notification(comment.author_id, message)