From 5a00eaa1589b2de22b55c059eb814b39267fe25c Mon Sep 17 00:00:00 2001 From: levlam Date: Fri, 19 Jul 2024 16:09:08 +0300 Subject: [PATCH] Check that bot has main Web App in preview methods. --- td/telegram/BotInfoManager.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/td/telegram/BotInfoManager.cpp b/td/telegram/BotInfoManager.cpp index c86379826..178cfa67b 100644 --- a/td/telegram/BotInfoManager.cpp +++ b/td/telegram/BotInfoManager.cpp @@ -622,6 +622,9 @@ Result> BotInfoManager::get_me if (can_be_edited && !bot_data.can_be_edited) { return Status::Error(400, "Bot must be owned"); } + if (!bot_data.has_main_app) { + return Status::Error(400, "Bot must have the main Mini App"); + } return td_->user_manager_->get_input_user(user_id); }