From 9328b27740a80f5975dcbb40bdcec87c84857eb9 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sat, 13 Nov 2021 16:21:53 +0200 Subject: [PATCH] fdfd --- files/routes/comments.py | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/files/routes/comments.py b/files/routes/comments.py index 5e61133251..f142ea6a54 100644 --- a/files/routes/comments.py +++ b/files/routes/comments.py @@ -532,11 +532,11 @@ def api_comment(v): if v.any_block_exists(user): continue if user.id != v.id: notify_users.add(user.id) - if request.host == 'rdrama.net': - if 'aevann' in body_html.lower() and 1 not in notify_users: notify_users.add(1) - if 'joan' in body_html.lower() and 28 not in notify_users: notify_users.add(28) - if 'carp' in body_html.lower() and 995 not in notify_users: notify_users.add(995) - if ('idio3' in body_html.lower() or 'idio ' in body_html.lower()) and 30 not in notify_users: notify_users.add(30) + if request.host == 'rdrama.net': + if 'aevann' in body_html.lower() and 1 not in notify_users: notify_users.add(1) + if 'joan' in body_html.lower() and 28 not in notify_users: notify_users.add(28) + if 'carp' in body_html.lower() and 995 not in notify_users: notify_users.add(995) + if ('idio3' in body_html.lower() or 'idio ' in body_html.lower()) and 30 not in notify_users: notify_users.add(30) for x in notify_users: n = Notification(comment_id=c.id, user_id=x) @@ -776,17 +776,17 @@ def edit_comment(cid, v): if v.any_block_exists(user): continue if user.id != v.id: notify_users.add(user.id) - if request.host == 'rdrama.net': - if 'aevann' in body_html.lower() and 1 not in notify_users: notify_users.add(1) - if 'joan' in body_html.lower() and 28 not in notify_users: notify_users.add(28) - if 'carp' in body_html.lower() and 995 not in notify_users: notify_users.add(995) - if ('idio3' in body_html.lower() or 'idio ' in body_html.lower()) and 30 not in notify_users: notify_users.add(30) + if request.host == 'rdrama.net': + if 'aevann' in body_html.lower() and 1 not in notify_users: notify_users.add(1) + if 'joan' in body_html.lower() and 28 not in notify_users: notify_users.add(28) + if 'carp' in body_html.lower() and 995 not in notify_users: notify_users.add(995) + if ('idio3' in body_html.lower() or 'idio ' in body_html.lower()) and 30 not in notify_users: notify_users.add(30) - for x in notify_users: - notif = notifs.filter_by(comment_id=c.id, user_id=x).first() - if not notif: - n = Notification(comment_id=c.id, user_id=x) - g.db.add(n) + for x in notify_users: + notif = notifs.filter_by(comment_id=c.id, user_id=x).first() + if not notif: + n = Notification(comment_id=c.id, user_id=x) + g.db.add(n) g.db.commit()