forked from rDrama/rDrama
1
0
Fork 0
master
Aevann1 2022-04-29 16:39:56 +02:00
parent 01e55c142a
commit 9ba2593f4f
1 changed files with 5 additions and 0 deletions

View File

@ -747,6 +747,11 @@ def messagereply(v):
if c.top_comment.sentto == 2:
ids = [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)
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)