From c3d6324ec66a9d3b418a706524ec803629d15443 Mon Sep 17 00:00:00 2001 From: machka pasla Date: Mon, 27 Oct 2025 15:58:35 +0300 Subject: [PATCH] fixed channel sub check --- bot/middlewares/channel_subscription.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/bot/middlewares/channel_subscription.py b/bot/middlewares/channel_subscription.py index 3af434b..902c061 100644 --- a/bot/middlewares/channel_subscription.py +++ b/bot/middlewares/channel_subscription.py @@ -40,6 +40,14 @@ class ChannelSubscriptionMiddleware(BaseMiddleware): if not event_user or event_user.id in self.settings.ADMIN_IDS: return await handler(event, data) + callback_query = event.callback_query + if ( + callback_query + and callback_query.data + and callback_query.data == "channel_subscription:verify" + ): + return await handler(event, data) + # Allow /start to reach the handler so the check can be re-run. message_object: Optional[Message] = event.message if (