Fix: Comment context links sometimes don't show the comment if a parent comment is shadowbanned.

This commit is contained in:
Ben Rog-Wilhelm 2024-06-01 06:19:15 -05:00
parent 5f76bbf921
commit 1944f5b235

View file

@ -155,7 +155,7 @@ class Comment(CreatedBase):
elif self.parent_submission: return f"post_{self.parent_submission}"
def replies(self, user):
if self.replies2 != None: return [x for x in self.replies2 if not x.author.shadowbanned]
if self.replies2 != None: return [x for x in self.replies2 if not x.author.shadowbanned or x.descendant_count > 0]
author_id = None
if user:
author_id = user.id