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 @lazy
def collapse_for_user(self, v): def collapse_for_user(self, v):
if self.over_18 and not (v and v.over_18) and not self.post.over_18: if self.over_18 and not (v and v.over_18) and not self.post.over_18: return True
return True
if not v: if not v: return False
return False
if any([x in self.body for x in v.filter_words]): if v.filter_words and any([x in self.body for x in v.filter_words]): return True
return True
if self.is_banned or (self.author and self.author.shadowbanned): return True if self.is_banned or (self.author and self.author.shadowbanned): return True