forked from rDrama/rDrama
remove alert_admins
parent
a5f62a380a
commit
a1b80e3743
|
@ -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)
|
||||
|
|
|
@ -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!"}
|
||||
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue