From beeb3dba94eb7dcf780d69505c778231801d187e Mon Sep 17 00:00:00 2001 From: Aevann Date: Sun, 14 May 2023 23:48:38 +0300 Subject: [PATCH] rename type to kind in execute_blackjack --- files/helpers/sanitize.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/files/helpers/sanitize.py b/files/helpers/sanitize.py index abd859471..18c0c3e28 100644 --- a/files/helpers/sanitize.py +++ b/files/helpers/sanitize.py @@ -169,7 +169,7 @@ def send_repeatable_notification_duplicated(uid, text): g.db.add(notif) -def execute_blackjack(v, target, body, type): +def execute_blackjack(v, target, body, kind): if not blackjack or not body: return False execute = False @@ -193,14 +193,14 @@ def execute_blackjack(v, target, body, type): g.db.add(v) notified_ids = [x[0] for x in g.db.query(User.id).filter(User.admin_level >= PERMS['BLACKJACK_NOTIFICATIONS'])] - extra_info = type + extra_info = kind if target: - if type == 'post': + if kind == 'post': extra_info = target.permalink - elif type == 'report': + elif kind == 'report': extra_info = f"reports on {target.permalink}" - elif type in {'comment', 'message'}: + elif kind in {'comment', 'message'}: for id in notified_ids: n = Notification(comment_id=target.id, user_id=id) g.db.add(n)