forked from rDrama/rDrama
1
0
Fork 0
Aevann 2023-08-11 15:43:58 +03:00
parent d674390f1a
commit fb0aed8e2b
2 changed files with 4 additions and 2 deletions

View File

@ -769,7 +769,8 @@ class User(Base):
Post.notify == True,
Post.author_id != self.id,
Post.ghost == False,
Post.author_id.notin_(self.userblocks)
Post.author_id.notin_(self.userblocks),
or_(Post.sub == None, Post.sub.notin_(self.sub_blocks)),
).count()
@property

View File

@ -174,7 +174,8 @@ def notifications_posts(v):
Post.notify == True,
Post.author_id != v.id,
Post.ghost == False,
Post.author_id.notin_(v.userblocks)
Post.author_id.notin_(v.userblocks),
or_(Post.sub == None, Post.sub.notin_(v.sub_blocks)),
).options(load_only(Post.id))
total = listing.count()