forked from rDrama/rDrama
1
0
Fork 0

hide modmail messages from muted users in the main notifications tab (they still appear in the modmail tab)

master
Aevann1 2022-11-12 11:19:56 +02:00
parent 42e40c1691
commit 9b85fd5dd5
1 changed files with 2 additions and 0 deletions

View File

@ -299,6 +299,8 @@ def notifications(v):
if x.replies2 == None:
x.replies2 = g.db.query(Comment).filter_by(parent_comment_id=x.id).filter(or_(Comment.author_id == v.id, Comment.id.in_(cids))).order_by(Comment.id.desc()).all()
else:
if c.sentto == 2 and c.author.is_muted:
continue
while c.parent_comment:
c = c.parent_comment
c.replies2 = g.db.query(Comment).filter_by(parent_comment_id=c.id).order_by(Comment.id).all()