This commit is contained in:
Aevann1 2021-11-24 00:36:38 +02:00
parent 16a3dd95b8
commit 2e39f547fa
20 changed files with 285 additions and 171 deletions

View file

@ -14,10 +14,7 @@ def send_notification(uid, text, autojanny=False):
text_html = sanitize(text_html)
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: abort(403)
else: author_id = NOTIFICATIONS_ID
new_comment = Comment(author_id=author_id,
parent_submission=None,