This commit is contained in:
Aevann1 2021-10-15 17:52:16 +02:00
parent 9a3739d077
commit c69b6f40b9

View file

@ -348,14 +348,11 @@ class Comment(Base):
@lazy
def collapse_for_user(self, v):
if self.over_18 and not (v and v.over_18) and not self.post.over_18:
return True
if self.over_18 and not (v and v.over_18) and not self.post.over_18: return True
if not v:
return False
if not v: return False
if any([x in self.body for x in v.filter_words]):
return True
if v.filter_words and any([x in self.body for x in v.filter_words]): return True
if self.is_banned or (self.author and self.author.shadowbanned): return True