forked from rDrama/rDrama
1
0
Fork 0

remove alert_admins

master
Aevann 2024-02-17 16:00:59 +02:00
parent a5f62a380a
commit a1b80e3743
3 changed files with 2 additions and 18 deletions

View File

@ -302,22 +302,6 @@ def alert_everyone(cid):
on conflict do nothing;""")
g.db.execute(_everyone_query)
def alert_admins(body):
body_html = sanitize(body, blackjack="admin alert")
new_comment = Comment(author_id=AUTOJANNY_ID,
parent_post=None,
level=1,
body_html=body_html,
sentto=MODMAIL_ID,
distinguished=True,
is_bot=True
)
g.db.add(new_comment)
g.db.flush()
new_comment.top_comment_id = new_comment.id
def alert_active_users(body, vid, extra_criteria):
body_html = sanitize(body, blackjack="notification")
cid = create_comment(body_html)

View File

@ -71,7 +71,7 @@ def request_api_keys(v):
g.db.add(new_app)
body = f"@{v.username} has requested API keys for `{request.values.get('name')}`. You can approve or deny the request [here](/admin/apps)."
alert_admins(body)
send_repeatable_notification(AEVANN_ID, body)
return {"message": "API keys requested successfully!"}

View File

@ -723,7 +723,7 @@ def submit_post(v, hole=None):
if flag_effortpost and not (SITE_NAME == 'WPD' and v.truescore < 500):
body = f"@{v.username} has requested that [{p.title}](/post/{p.id}) be marked as an effortpost!"
alert_admins(body)
send_repeatable_notification(AEVANN_ID, body)
if v.client: return p.json
else: