From e08bd45666197e35f927ee383139caf0a819d2c6 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Thu, 28 Oct 2021 15:40:13 +0200 Subject: [PATCH] sfdsfd --- files/routes/posts.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/files/routes/posts.py b/files/routes/posts.py index c3ff33517..a3d77d445 100755 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -66,7 +66,7 @@ def publish(pid, v): user = g.db.query(User).options(lazyload('*')).filter_by(username=username).first() if user and not v.any_block_exists(user) and user.id != v.id: notify_users.add(user.id) - if request.host == 'rdrama.net' and 'aevann' in post.body_html.lower() and 1 not in notify_users: notify_users.add(1) + if request.host == 'rdrama.net' and 'aevann' in f'{post.body_html}{post.title}'.lower() and 1 not in notify_users: notify_users.add(1) for x in notify_users: send_notification(x, f"@{v.username} has mentioned you: http://{site}{new_post.permalink}") @@ -326,7 +326,7 @@ def edit_post(pid, v): message = f"@{v.username} has mentioned you: http://{site}{p.permalink}" - if request.host == 'rdrama.net' and 'aevann' in body_html.lower() and 1 not in notify_users: notify_users.add(1) + if request.host == 'rdrama.net' and 'aevann' in f'{body_html}{title}'.lower() and 1 not in notify_users: notify_users.add(1) for x in notify_users: existing = g.db.query(Comment).options(lazyload('*')).filter(Comment.author_id == NOTIFICATIONS_ACCOUNT, Comment.body == message, Comment.notifiedto == x).first() @@ -773,7 +773,7 @@ def submit_post(v): user = g.db.query(User).options(lazyload('*')).filter_by(username=username).first() if user and not v.any_block_exists(user) and user.id != v.id: notify_users.add(user.id) - if request.host == 'rdrama.net' and 'aevann' in body_html.lower() and 1 not in notify_users: notify_users.add(1) + if request.host == 'rdrama.net' and 'aevann' in f'{body_html}{title}'.lower() and 1 not in notify_users: notify_users.add(1) for x in notify_users: send_notification(x, f"@{v.username} has mentioned you: http://{site}{new_post.permalink}")