From b2cd641ca3e2708dd374ecddcaa6fc02e77c4c3c Mon Sep 17 00:00:00 2001 From: Aevann Date: Fri, 17 May 2024 02:29:51 +0300 Subject: [PATCH] fix repetitive notifs --- files/helpers/sanitize.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/files/helpers/sanitize.py b/files/helpers/sanitize.py index 05bae3050..868fc8156 100644 --- a/files/helpers/sanitize.py +++ b/files/helpers/sanitize.py @@ -104,10 +104,9 @@ def execute_blackjack(v, target, body, kind): extra_info = None - if extra_info: + if v and extra_info: for id in notified_ids: - username = v.username if v else 'AutoJanny' - send_repeatable_notification_duplicated(id, f"Blackjack by @{username}: {extra_info}") + send_repeatable_notification_duplicated(id, f"Blackjack by @{v.username}: {extra_info}") return True def find_all_emoji_endings(emoji):