remotes/1693045480750635534/spooky-22
Aevann1 2021-10-15 17:52:16 +02:00
parent b7a13b4146
commit bfbfcb8dbe
1 changed files with 3 additions and 6 deletions

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