From 93aaaa8f05901638eae25b533e07179a5bcbfd5d Mon Sep 17 00:00:00 2001 From: Capybara-z Date: Mon, 13 Oct 2025 19:04:52 +0300 Subject: [PATCH] fix notifications --- handlers/notifications/general_notifications.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/handlers/notifications/general_notifications.py b/handlers/notifications/general_notifications.py index 93e46eb3..a013807a 100644 --- a/handlers/notifications/general_notifications.py +++ b/handlers/notifications/general_notifications.py @@ -208,8 +208,9 @@ async def notify_24h_keys( sent_count = 0 for msg, result in zip(messages, results, strict=False): tg_id = msg["tg_id"] + + await add_notification(session, tg_id, msg["notification_id"]) if result: - await add_notification(session, tg_id, msg["notification_id"]) sent_count += 1 logger.info(f"Отправлено уведомление об истекающей подписке {msg['email']} пользователю {tg_id}.") else: @@ -292,8 +293,9 @@ async def notify_10h_keys( sent_count = 0 for msg, result in zip(messages, results, strict=False): tg_id = msg["tg_id"] + + await add_notification(session, tg_id, msg["notification_id"]) if result: - await add_notification(session, tg_id, msg["notification_id"]) sent_count += 1 logger.info(f"Отправлено уведомление об истекающей подписке {msg['email']} пользователю {tg_id}.") else: