dont send push notif when shadowbeaned
parent
594f32e703
commit
a51125e21b
|
@ -379,12 +379,11 @@ def messagereply(v):
|
|||
execute_blackjack(v, c, c.body_html, 'message')
|
||||
execute_under_siege(v, c, c.body_html, 'message')
|
||||
|
||||
if user_id and user_id not in {v.id, MODMAIL_ID} | BOT_IDs and user_id not in online["messages"]:
|
||||
if can_see(user, v):
|
||||
notif = g.db.query(Notification).filter_by(comment_id=c.id, user_id=user_id).one_or_none()
|
||||
if not notif:
|
||||
notif = Notification(comment_id=c.id, user_id=user_id)
|
||||
g.db.add(notif)
|
||||
if user_id and user_id not in {v.id, MODMAIL_ID} | BOT_IDs and user_id not in online["messages"] and can_see(user, v):
|
||||
notif = g.db.query(Notification).filter_by(comment_id=c.id, user_id=user_id).one_or_none()
|
||||
if not notif:
|
||||
notif = Notification(comment_id=c.id, user_id=user_id)
|
||||
g.db.add(notif)
|
||||
|
||||
title = f'New message from @{c.author_name}'
|
||||
url = f'{SITE_FULL}/notifications/messages'
|
||||
|
|
Loading…
Reference in New Issue