forked from rDrama/rDrama
dont give me modmail notifs on WPD (if its important they'll tell me)
parent
32772ce1e9
commit
1d1f3d1a3b
|
@ -282,6 +282,8 @@ def submit_contact(v):
|
||||||
new_comment.top_comment_id = new_comment.id
|
new_comment.top_comment_id = new_comment.id
|
||||||
|
|
||||||
admin_ids = [x[0] for x in g.db.query(User.id).filter(User.admin_level >= PERMS['NOTIFICATIONS_MODMAIL']).all()]
|
admin_ids = [x[0] for x in g.db.query(User.id).filter(User.admin_level >= PERMS['NOTIFICATIONS_MODMAIL']).all()]
|
||||||
|
if SITE_NAME == 'watchpeopledie.tv':
|
||||||
|
admin_ids += AEVANN_ID
|
||||||
|
|
||||||
for admin_id in admin_ids:
|
for admin_id in admin_ids:
|
||||||
notif = Notification(comment_id=new_comment.id, user_id=admin_id)
|
notif = Notification(comment_id=new_comment.id, user_id=admin_id)
|
||||||
|
|
|
@ -664,14 +664,14 @@ def messagereply(v:User):
|
||||||
top_comment = c.top_comment
|
top_comment = c.top_comment
|
||||||
|
|
||||||
if top_comment.sentto == MODMAIL_ID:
|
if top_comment.sentto == MODMAIL_ID:
|
||||||
admins = g.db.query(User.id).filter(User.admin_level >= PERMS['NOTIFICATIONS_MODMAIL'], User.id != v.id)
|
admin_ids = [x[0] for x in g.db.query(User.id).filter(User.admin_level >= PERMS['NOTIFICATIONS_MODMAIL'], User.id != v.id).all()]
|
||||||
|
if SITE_NAME == 'watchpeopledie.tv':
|
||||||
|
admin_ids += AEVANN_ID
|
||||||
|
|
||||||
admins = [x[0] for x in admins.all()]
|
if parent.author.id not in admin_ids + [v.id]:
|
||||||
|
admin_ids.append(parent.author.id)
|
||||||
|
|
||||||
if parent.author.id not in admins + [v.id]:
|
for admin in admin_ids:
|
||||||
admins.append(parent.author.id)
|
|
||||||
|
|
||||||
for admin in admins:
|
|
||||||
notif = Notification(comment_id=c.id, user_id=admin)
|
notif = Notification(comment_id=c.id, user_id=admin)
|
||||||
g.db.add(notif)
|
g.db.add(notif)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue