forked from rDrama/rDrama
1
0
Fork 0
master
Aevann1 2022-04-20 00:23:25 +02:00
parent 5be791e21d
commit cc3788bd8d
1 changed files with 7 additions and 3 deletions

View File

@ -45,10 +45,14 @@ def send_notification(uid, text, autojanny=False):
def notif_comment(text, autojanny=False):
if autojanny: author_id = AUTOJANNY_ID
else: author_id = NOTIFICATIONS_ID
if autojanny:
author_id = AUTOJANNY_ID
alert = True
else:
author_id = NOTIFICATIONS_ID
alert = False
text_html = sanitize(text, alert=True)
text_html = sanitize(text, alert=alert)
existing = g.db.query(Comment.id).filter_by(author_id=author_id, parent_submission=None, body_html=text_html).one_or_none()