forked from rDrama/rDrama
1
0
Fork 0
master
Aevann1 2021-12-02 20:54:44 +02:00
parent 6e3865a80a
commit f6e87fae8a
2 changed files with 10 additions and 5 deletions

View File

@ -549,14 +549,15 @@ def api_comment(v):
if request.host == 'pcmemes.net':
if 'kippy' in body_html.lower() and 1592 not in notify_users: notify_users.add(1592)
if request.host in ['rdrama.net','pcmemes.net']:
if ('aevan' in body_html.lower() or 'avean' in body_html.lower()) and 1 not in notify_users: notify_users.add(1)
if request.host == 'rdrama.net':
if ('aevan' in body_html.lower() or 'avean' in body_html.lower()) and 1 not in notify_users: notify_users.add(1)
if ('joan' in body_html.lower() or 'pewkie' 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)
notify_users.add(541)
if ('idio3' in body_html.lower() or 'idio ' in body_html.lower()) and 30 not in notify_users: notify_users.add(30)
if (x in body_html.lower() for x in ('landlord_messiah', 'landlordmessiah', ' llm ', 'landlet')) and 253 not in notify_users: notify_users.add(253)
for x in notify_users:
n = Notification(comment_id=c.id, user_id=x)
@ -821,14 +822,15 @@ def edit_comment(cid, v):
if request.host == 'pcmemes.net':
if 'kippy' in body_html.lower() and 1592 not in notify_users: notify_users.add(1592)
if request.host in ['rdrama.net','pcmemes.net']:
if ('aevan' in body_html.lower() or 'avean' in body_html.lower()) and 1 not in notify_users: notify_users.add(1)
if request.host == 'rdrama.net':
if ('aevan' in body_html.lower() or 'avean' in body_html.lower()) and 1 not in notify_users: notify_users.add(1)
if ('joan' in body_html.lower() or 'pewkie' 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)
notify_users.add(541)
if ('idio3' in body_html.lower() or 'idio ' in body_html.lower()) and 30 not in notify_users: notify_users.add(30)
if (x in body_html.lower() for x in ('landlord_messiah', 'landlordmessiah', ' llm ', 'landlet')) and 253 not in notify_users: notify_users.add(253)
for x in notify_users:
notif = g.db.query(Notification).filter_by(comment_id=c.id, user_id=x).first()

View File

@ -64,14 +64,15 @@ def publish(pid, v):
if request.host == 'pcmemes.net':
if 'kippy' in f'{post.body_html}{post.title}'.lower() and 1592 not in notify_users: notify_users.add(1592)
if request.host in ['rdrama.net','pcmemes.net']:
if ('aevan' in f'{post.body_html}{post.title}'.lower() or 'avean' in f'{post.body_html}{post.title}'.lower()) and 1 not in notify_users: notify_users.add(1)
if request.host == 'rdrama.net':
if ('aevan' in f'{post.body_html}{post.title}'.lower() or 'avean' 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() or 'pewkie' 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)
notify_users.add(541)
if ('idio3' in f'{post.body_html}{post.title}'.lower() or 'idio ' in f'{post.body_html}{post.title}'.lower()) and 30 not in notify_users: notify_users.add(30)
if (x in f'{post.body_html}{post.title}'.lower() for x in ('landlord_messiah', 'landlordmessiah', ' llm ', 'landlet')) and 253 not in notify_users: notify_users.add(253)
for x in notify_users: send_notification(x, f"@{v.username} has mentioned you: http://{site}{post.permalink}")
@ -383,14 +384,15 @@ def edit_post(pid, v):
if request.host == 'pcmemes.net':
if 'kippy' in f'{body_html}{title}'.lower() and 1592 not in notify_users: notify_users.add(1592)
if request.host in ['rdrama.net','pcmemes.net']:
if ('aevan' in f'{body_html}{title}'.lower() or 'avean' in f'{body_html}{title}'.lower()) and 1 not in notify_users: notify_users.add(1)
if request.host == 'rdrama.net':
if ('aevan' in f'{body_html}{title}'.lower() or 'avean' in f'{body_html}{title}'.lower()) and 1 not in notify_users: notify_users.add(1)
if ('joan' in f'{body_html}{title}'.lower() or 'pewkie' 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)
notify_users.add(541)
if ('idio3' in f'{body_html}{title}'.lower() or 'idio ' in f'{body_html}{title}'.lower()) and 30 not in notify_users: notify_users.add(30)
if (x in f'{body_html}{title}'.lower() for x in ('landlord_messiah', 'landlordmessiah', ' llm ', 'landlet')) and 253 not in notify_users: notify_users.add(253)
for x in notify_users: send_notification(x, message)
@ -877,14 +879,15 @@ def submit_post(v):
if request.host == 'pcmemes.net':
if 'kippy' in f'{body_html}{title}'.lower() and 1592 not in notify_users: notify_users.add(1592)
if request.host in ['rdrama.net','pcmemes.net']:
if ('aevan' in f'{body_html}{title}'.lower() or 'avean' in f'{body_html}{title}'.lower()) and 1 not in notify_users: notify_users.add(1)
if request.host == 'rdrama.net':
if ('aevan' in f'{body_html}{title}'.lower() or 'avean' in f'{body_html}{title}'.lower()) and 1 not in notify_users: notify_users.add(1)
if ('joan' in f'{body_html}{title}'.lower() or 'pewkie' 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)
notify_users.add(541)
if ('idio3' in f'{body_html}{title}'.lower() or 'idio ' in f'{body_html}{title}'.lower()) and 30 not in notify_users: notify_users.add(30)
if (x in f'{body_html}{title}'.lower() for x in ('landlord_messiah', 'landlordmessiah', ' llm ', 'landlet')) and 253 not in notify_users: notify_users.add(253)
for x in notify_users: send_notification(x, f"@{v.username} has mentioned you: http://{site}{new_post.permalink}")