From f6dea300b0ab697d9859923550afdafaf4ad82d7 Mon Sep 17 00:00:00 2001 From: TLSM Date: Sun, 13 Nov 2022 17:13:14 -0500 Subject: [PATCH] Adjust shadowed comment visibility. - Don't show shadowed comments to non-jannies in notifications. - Auto-collapse for jannies in notifs/threads. --- files/classes/comment.py | 2 ++ files/routes/notifications.py | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/files/classes/comment.py b/files/classes/comment.py index 9e3955128..4ea11d8d1 100644 --- a/files/classes/comment.py +++ b/files/classes/comment.py @@ -362,6 +362,8 @@ class Comment(Base): if self.is_banned: return True + if self.author.shadowbanned and not v.shadowbanned: return True + if (self.wordle_result) and (not self.body or len(self.body_html) <= 100) and 9 > self.level > 1: return True if v and v.filter_words and self.body and any(x in self.body for x in v.filter_words): return True diff --git a/files/routes/notifications.py b/files/routes/notifications.py index 8cc6c516d..09cdd0324 100644 --- a/files/routes/notifications.py +++ b/files/routes/notifications.py @@ -270,8 +270,12 @@ def notifications(v): Comment.body_html.notlike('%

New site mention%