From 69a68e564cc259739e01faf61ef418215adb7797 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sun, 19 Dec 2021 08:43:51 +0200 Subject: [PATCH] fdsfsd --- files/helpers/alerts.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/files/helpers/alerts.py b/files/helpers/alerts.py index 57dc1d03d5..c1e2e07759 100644 --- a/files/helpers/alerts.py +++ b/files/helpers/alerts.py @@ -16,8 +16,9 @@ def send_notification(uid, text, autojanny=False): if autojanny: author_id = AUTOJANNY_ID else: author_id = NOTIFICATIONS_ID - existing = g.db.query(Comment.id).filter(Comment.author_id == author_id, Comment.body_html == text_html, Comment.notifiedto == uid).first() - if existing: return + if ' has gifted you ' not in text: + existing = g.db.query(Comment.id).filter(Comment.author_id == author_id, Comment.body_html == text_html, Comment.notifiedto == uid).first() + if existing: return new_comment = Comment(author_id=author_id, parent_submission=None,