forked from rDrama/rDrama
1
0
Fork 0

let chuds into /h/chudrama

master
Aevann1 2022-08-21 15:57:56 +02:00
parent 0e0f414cc9
commit 797cf61d3f
3 changed files with 5 additions and 1 deletions

View File

@ -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

View File

@ -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

View File

@ -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()]