diff --git a/td/generate/scheme/td_api.tl b/td/generate/scheme/td_api.tl index dd3cf35e3..c39ff1d39 100644 --- a/td/generate/scheme/td_api.tl +++ b/td/generate/scheme/td_api.tl @@ -1125,7 +1125,7 @@ keyboardButtonTypeRequestLocation = KeyboardButtonType; //@description A button that allows the user to create and send a poll when pressed; available only in private chats @force_regular If true, only regular polls must be allowed to create @force_quiz If true, only polls in quiz mode must be allowed to create keyboardButtonTypeRequestPoll force_regular:Bool force_quiz:Bool = KeyboardButtonType; -//@description A button that opens a specified URL in web view by calling getSimpleWebViewUrl @url An HTTP URL to pass to getSimpleWebViewUrl +//@description A button that opens a specified URL in web view by calling getWebViewUrl @url An HTTP URL to pass to getWebViewUrl keyboardButtonTypeWebView url:string = KeyboardButtonType; @@ -1141,8 +1141,8 @@ inlineKeyboardButtonTypeUrl url:string = InlineKeyboardButtonType; //@description A button that opens a specified URL and automatically authorize the current user by calling getLoginUrlInfo @url An HTTP URL to pass to getLoginUrlInfo @id Unique button identifier @forward_text If non-empty, new text of the button in forwarded messages inlineKeyboardButtonTypeLoginUrl url:string id:int53 forward_text:string = InlineKeyboardButtonType; -//@description A button that opens a specified URL in web view by calling getWebViewUrl @url An HTTP URL to pass to getWebViewUrl -inlineKeyboardButtonTypeWebViewUrl url:string = InlineKeyboardButtonType; +//@description A button that opens a specified URL in web view by calling openWebView @url An HTTP URL to pass to openWebView +inlineKeyboardButtonTypeWebView url:string = InlineKeyboardButtonType; //@description A button that sends a callback query to a bot @data Data to be sent to the bot via a callback query inlineKeyboardButtonTypeCallback data:bytes = InlineKeyboardButtonType; @@ -4108,7 +4108,7 @@ updateTermsOfService terms_of_service_id:string terms_of_service:termsOfService //@description The list of users nearby has changed. The update is guaranteed to be sent only 60 seconds after a successful searchChatsNearby request @users_nearby The new list of users nearby updateUsersNearby users_nearby:vector = Update; -//@description The list of bots added to attach menu has changed @bots The new list of bots added to attach menu. The bots must not be shown in attach menu on scheduled messages screen +//@description The list of bots added to attach menu has changed @bots The new list of bots added to attach menu. The bots must be shown in attach menu only in private chats. The bots must not be shown on scheduled messages screen updateAttachMenuBots bots:vector = Update; //@description The list of supported reactions has changed @reactions The new list of supported reactions @@ -4859,7 +4859,7 @@ answerInlineQuery inline_query_id:int64 is_personal:Bool results:vector get_inline_keyboard_button(tl_object_ptr(button->type_); + case td_api::inlineKeyboardButtonTypeWebView::ID: { + auto button_type = move_tl_object_as(button->type_); auto user_id = LinkManager::get_link_user_id(button_type->url_); if (user_id.is_valid()) { return Status::Error(400, "Link to a user can't be used in web view URL buttons"); @@ -902,7 +902,7 @@ static tl_object_ptr get_inline_keyboard_button_ob "get_inline_keyboard_button_object")); break; case InlineKeyboardButton::Type::WebView: - type = make_tl_object(keyboard_button.data); + type = make_tl_object(keyboard_button.data); break; default: UNREACHABLE(); diff --git a/td/telegram/Td.cpp b/td/telegram/Td.cpp index 8e1cf7686..66aa79a79 100644 --- a/td/telegram/Td.cpp +++ b/td/telegram/Td.cpp @@ -7336,7 +7336,7 @@ void Td::on_request(uint64 id, td_api::answerInlineQuery &request) { request.next_offset_, request.switch_pm_text_, request.switch_pm_parameter_, std::move(promise)); } -void Td::on_request(uint64 id, td_api::getSimpleWebViewUrl &request) { +void Td::on_request(uint64 id, td_api::getWebViewUrl &request) { CHECK_IS_USER(); CLEAN_INPUT_STRING(request.url_); CREATE_REQUEST_PROMISE(); diff --git a/td/telegram/Td.h b/td/telegram/Td.h index 6454f7aa3..9e8b796a5 100644 --- a/td/telegram/Td.h +++ b/td/telegram/Td.h @@ -1155,7 +1155,7 @@ class Td final : public Actor { void on_request(uint64 id, td_api::answerInlineQuery &request); - void on_request(uint64 id, td_api::getSimpleWebViewUrl &request); + void on_request(uint64 id, td_api::getWebViewUrl &request); void on_request(uint64 id, td_api::sendWebViewData &request); diff --git a/td/telegram/cli.cpp b/td/telegram/cli.cpp index ee92b9876..79637dbf5 100644 --- a/td/telegram/cli.cpp +++ b/td/telegram/cli.cpp @@ -3428,11 +3428,11 @@ class CliClient final : public Actor { bool is_added; get_args(args, user_id, is_added); send_request(td_api::make_object(user_id, is_added)); - } else if (op == "gswvu") { + } else if (op == "gwvu") { UserId user_id; string url; get_args(args, user_id, url); - send_request(td_api::make_object(user_id, url, get_theme_parameters())); + send_request(td_api::make_object(user_id, url, get_theme_parameters())); } else if (op == "swvd") { UserId user_id; string button_text;