This commit is contained in:
Aevann1 2022-04-29 16:52:00 +02:00
parent af0e20c945
commit 235349652b
2 changed files with 6 additions and 6 deletions

View file

@ -746,12 +746,12 @@ def messagereply(v):
)
if c.top_comment.sentto == 2:
ids = [c.top_comment.id] + [x.id for x in c.top_comment.replies]
notifications = g.db.query(Notification).filter(Notification.comment_id.in_(ids))
for n in notifications:
g.db.delete(n)
ids = [c.top_comment.id] + [x.id for x in c.top_comment.replies]
notifications = g.db.query(Notification).filter(Notification.comment_id.in_(ids))
for n in notifications:
g.db.delete(n)
if c.top_comment.sentto == 2:
admins = g.db.query(User).filter(User.admin_level > 2, User.id != v.id).all()
for admin in admins:
notif = Notification(comment_id=c.id, user_id=admin.id)