From 096fb962f1a29a7f72feaeaa5ce48f226c357f86 Mon Sep 17 00:00:00 2001 From: Aevann Date: Wed, 15 Mar 2023 04:20:56 +0200 Subject: [PATCH] remove notify_jannies_of_grooming --- files/helpers/sanitize.py | 10 ---------- files/routes/users.py | 2 -- 2 files changed, 12 deletions(-) diff --git a/files/helpers/sanitize.py b/files/helpers/sanitize.py index 537f729d3..312ceb824 100644 --- a/files/helpers/sanitize.py +++ b/files/helpers/sanitize.py @@ -201,16 +201,6 @@ def execute_blackjack(v, target, body, type): send_repeatable_notification(id, f"Blackjack by @{v.username}: {extra_info}") return True -def notify_jannies_of_grooming(v, c, u): - if 'discord' not in c.body and 'groomercord' not in c.body: - return - - notified_ids = [x[0] for x in g.db.query(User.id).filter(User.admin_level >= PERMS['BLACKJACK_NOTIFICATIONS'])] - - for id in notified_ids: - n = Notification(comment_id=c.id, user_id=id) - g.db.add(n) - def render_emoji(html, regexp, golden, marseys_used, b=False): emojis = list(regexp.finditer(html)) captured = set() diff --git a/files/routes/users.py b/files/routes/users.py index 9d537d273..768e065fb 100644 --- a/files/routes/users.py +++ b/files/routes/users.py @@ -536,7 +536,6 @@ def message2(v:User, username:str): g.db.flush() execute_blackjack(v, c, c.body_html, 'message') execute_under_siege(v, c, c.body_html, 'message') - notify_jannies_of_grooming(v, c, user) c.top_comment_id = c.id if user.id not in bots: @@ -610,7 +609,6 @@ def messagereply(v:User): g.db.flush() execute_blackjack(v, c, c.body_html, 'message') execute_under_siege(v, c, c.body_html, 'message') - notify_jannies_of_grooming(v, c, user) if user_id and user_id not in {v.id, MODMAIL_ID} | bots: notif = g.db.query(Notification).filter_by(comment_id=c.id, user_id=user_id).one_or_none()