forked from rDrama/rDrama
let chuds into /h/chudrama
parent
0e0f414cc9
commit
797cf61d3f
|
@ -91,6 +91,7 @@ class Comment(Base):
|
|||
if self.post.sub != 'chudrama': return True
|
||||
if v:
|
||||
if v.truecoins >= 5000: return True
|
||||
if v.agendaposter: return True
|
||||
if v.id == self.author_id: return True
|
||||
if v.id == self.post.author_id: return True
|
||||
return False
|
||||
|
|
|
@ -83,6 +83,7 @@ class Submission(Base):
|
|||
if self.sub != 'chudrama': return True
|
||||
if v:
|
||||
if v.truecoins >= 5000: return True
|
||||
if v.agendaposter: return True
|
||||
if v.id == self.author_id: return True
|
||||
return False
|
||||
|
||||
|
|
|
@ -174,7 +174,9 @@ class User(Base):
|
|||
@property
|
||||
@lazy
|
||||
def all_blocks(self):
|
||||
stealth = set([x[0] for x in g.db.query(Sub.name).filter_by(stealth=True).all()]) - set([x[0] for x in g.db.query(SubJoin.sub).filter_by(user_id=self.id).all()])
|
||||
stealth = set([x[0] for x in g.db.query(Sub.name).filter_by(stealth=True).all()])
|
||||
stealth = stealth - set([x[0] for x in g.db.query(SubJoin.sub).filter_by(user_id=self.id).all()])
|
||||
if self.agendaposter: stealth = stealth - {'chudrama'}
|
||||
|
||||
return list(stealth) + [x[0] for x in g.db.query(SubBlock.sub).filter_by(user_id=self.id).all()]
|
||||
|
||||
|
|
Loading…
Reference in New Issue