diff --git a/app/handlers/referral.py b/app/handlers/referral.py index 50701f7c..7f667cfa 100644 --- a/app/handlers/referral.py +++ b/app/handlers/referral.py @@ -793,7 +793,7 @@ async def confirm_withdrawal_request(callback: types.CallbackQuery, db_user: Use try: notification_service = AdminNotificationService(callback.bot) - await notification_service.send_to_admins(admin_text, keyboard=admin_keyboard) + await notification_service.send_admin_notification(admin_text, reply_markup=admin_keyboard) except Exception as e: logger.error('Ошибка отправки уведомления админам о заявке на вывод', error=e) diff --git a/app/services/admin_notification_service.py b/app/services/admin_notification_service.py index c975b171..5d73fec4 100644 --- a/app/services/admin_notification_service.py +++ b/app/services/admin_notification_service.py @@ -1215,6 +1215,14 @@ class AdminNotificationService: """Public check for whether admin notifications are configured and active.""" return self._is_enabled() + async def send_admin_notification( + self, text: str, reply_markup: types.InlineKeyboardMarkup | None = None + ) -> bool: + """Send a generic notification to admin chat with optional inline keyboard.""" + if not self._is_enabled(): + return False + return await self._send_message(text, reply_markup=reply_markup) + async def send_webhook_notification(self, text: str) -> bool: """Send a generic webhook/infrastructure notification to admin chat.