dfs
This commit is contained in:
parent
9a3739d077
commit
c69b6f40b9
1 changed files with 3 additions and 6 deletions
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue