From 6f981a58b87a2a826a9fbca174e4f81a1e6fff2b Mon Sep 17 00:00:00 2001 From: Aevann Date: Fri, 24 Feb 2023 04:04:54 +0200 Subject: [PATCH] give push notifs for personal reddit mentions --- files/helpers/offsitementions.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/files/helpers/offsitementions.py b/files/helpers/offsitementions.py index 7cbdc6a34..4b88ffb9e 100644 --- a/files/helpers/offsitementions.py +++ b/files/helpers/offsitementions.py @@ -122,3 +122,6 @@ def notify_mentions(mentions, send_to=None, mention_str='site mention'): if send_to: notif = Notification(comment_id=new_comment.id, user_id=send_to) g.db.add(notif) + + g.db.flush() + push_notif({send_to}, f'New mention of you on reddit', new_comment.body, f'{SITE_FULL}/comment/{new_comment.id}?read=true#context')