restore modmail notifs for myself

pull/134/head
Aevann 2023-02-24 01:25:47 +02:00
parent 335414f4a4
commit 52a63fbba3
2 changed files with 5 additions and 2 deletions

View File

@ -252,7 +252,7 @@ def submit_contact(v):
execute_under_siege(v, new_comment, new_comment.body_html, 'modmail')
new_comment.top_comment_id = new_comment.id
admins = g.db.query(User).filter(User.admin_level >= PERMS['NOTIFICATIONS_MODMAIL'], User.id != AEVANN_ID)
admins = g.db.query(User).filter(User.admin_level >= PERMS['NOTIFICATIONS_MODMAIL'])
for admin in admins.all():
notif = Notification(comment_id=new_comment.id, user_id=admin.id)

View File

@ -607,7 +607,10 @@ def messagereply(v:User):
top_comment = c.top_comment(g.db)
if top_comment.sentto == MODMAIL_ID:
admins = g.db.query(User.id).filter(User.admin_level >= PERMS['NOTIFICATIONS_MODMAIL'], User.id != v.id, User.id != AEVANN_ID)
admins = g.db.query(User.id).filter(User.admin_level >= PERMS['NOTIFICATIONS_MODMAIL'], User.id != v.id)
if SITE == 'rdrama.net':
admins = admins.filter(User.id != AEVANN_ID)
admins = [x[0] for x in admins.all()]