This commit is contained in:
Aevann1 2021-11-13 16:11:13 +02:00
parent ae64fe23f8
commit 277b996cc2
2 changed files with 5 additions and 1 deletions

View file

@ -71,6 +71,7 @@ def publish(pid, v):
if 'aevann' in f'{post.body_html}{post.title}'.lower() and 1 not in notify_users: notify_users.add(1)
if 'joan' in f'{post.body_html}{post.title}'.lower() and 28 not in notify_users: notify_users.add(28)
if 'carp' in f'{post.body_html}{post.title}'.lower() and 995 not in notify_users: notify_users.add(995)
if ('idio3' in f'{post.body_html}{post.title}' or 'idio ' in f'{post.body_html}{post.title}') and 30 not in notify_users: notify_users.add(30)
for x in notify_users: send_notification(x, f"@{v.username} has mentioned you: http://{site}{post.permalink}")
@ -342,6 +343,7 @@ def edit_post(pid, v):
if 'aevann' in f'{body_html}{title}'.lower() and 1 not in notify_users: notify_users.add(1)
if 'joan' in f'{body_html}{title}'.lower() and 28 not in notify_users: notify_users.add(28)
if 'carp' in f'{body_html}{title}'.lower() and 995 not in notify_users: notify_users.add(995)
if ('idio3' in f'{body_html}{title}' or 'idio ' in f'{body_html}{title}') and 30 not in notify_users: notify_users.add(30)
for x in notify_users:
existing = g.db.query(Comment.id).filter(Comment.author_id == NOTIFICATIONS_ACCOUNT, Comment.body == message, Comment.notifiedto == x).first()
@ -790,6 +792,7 @@ def submit_post(v):
if 'aevann' in f'{body_html}{title}'.lower() and 1 not in notify_users: notify_users.add(1)
if 'joan' in f'{body_html}{title}'.lower() and 28 not in notify_users: notify_users.add(28)
if 'carp' in f'{body_html}{title}'.lower() and 995 not in notify_users: notify_users.add(995)
if ('idio3' in f'{body_html}{title}' or 'idio ' in f'{body_html}{title}') and 30 not in notify_users: notify_users.add(30)
for x in notify_users: send_notification(x, f"@{v.username} has mentioned you: http://{site}{new_post.permalink}")