dont give me modmail notifs in WPD

master
Aevann1 2022-09-21 21:38:29 +02:00
parent e8c3f01bb0
commit fb1b1279fe
2 changed files with 10 additions and 2 deletions

View File

@ -228,7 +228,11 @@ def submit_contact(v):
g.db.flush() g.db.flush()
new_comment.top_comment_id = new_comment.id new_comment.top_comment_id = new_comment.id
for admin in g.db.query(User).filter(User.admin_level > 2).all(): admins = g.db.query(User).filter(User.admin_level > 2)
if SITE == 'watchpeopledie.co':
admins = admins.filter(User.id != AEVANN_ID)
for admin in admins.all():
notif = Notification(comment_id=new_comment.id, user_id=admin.id) notif = Notification(comment_id=new_comment.id, user_id=admin.id)
g.db.add(notif) g.db.add(notif)

View File

@ -826,7 +826,11 @@ def messagereply(v):
if c.top_comment.sentto == 2: if c.top_comment.sentto == 2:
admins = [x[0] for x in g.db.query(User.id).filter(User.admin_level > 2, User.id != v.id).all()] admins = g.db.query(User.id).filter(User.admin_level > 2, User.id != v.id)
if SITE == 'watchpeopledie.co':
admins = admins.filter(User.id != AEVANN_ID)
admins = [x[0] for x in admins.all()]
if parent.author.id not in admins: if parent.author.id not in admins:
admins.append(parent.author.id) admins.append(parent.author.id)