Improve method names and documentation.
This commit is contained in:
parent
b01bc42470
commit
ad7e0e2118
@ -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
|
//@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;
|
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;
|
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
|
//@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;
|
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
|
//@description A button that opens a specified URL in web view by calling openWebView @url An HTTP URL to pass to openWebView
|
||||||
inlineKeyboardButtonTypeWebViewUrl url:string = InlineKeyboardButtonType;
|
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
|
//@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;
|
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
|
//@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<chatNearby> = Update;
|
updateUsersNearby users_nearby:vector<chatNearby> = 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<attachMenuBot> = Update;
|
updateAttachMenuBots bots:vector<attachMenuBot> = Update;
|
||||||
|
|
||||||
//@description The list of supported reactions has changed @reactions The new list of supported reactions
|
//@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<InputInl
|
|||||||
//@bot_user_id Identifier of the target bot
|
//@bot_user_id Identifier of the target bot
|
||||||
//@url The URL from the keyboardButtonTypeWebView button
|
//@url The URL from the keyboardButtonTypeWebView button
|
||||||
//@theme Preferred web view theme; pass null to use the default theme
|
//@theme Preferred web view theme; pass null to use the default theme
|
||||||
getSimpleWebViewUrl bot_user_id:int53 url:string theme:themeParameters = HttpUrl;
|
getWebViewUrl bot_user_id:int53 url:string theme:themeParameters = HttpUrl;
|
||||||
|
|
||||||
//@description Sends data received from keyboardButtonTypeWebView web view to a bot
|
//@description Sends data received from keyboardButtonTypeWebView web view to a bot
|
||||||
//@bot_user_id Identifier of the target bot @button_text Text of the keyboardButtonTypeWebView button, which opened the web view @data Received data
|
//@bot_user_id Identifier of the target bot @button_text Text of the keyboardButtonTypeWebView button, which opened the web view @data Received data
|
||||||
|
@ -566,8 +566,8 @@ static Result<InlineKeyboardButton> get_inline_keyboard_button(tl_object_ptr<td_
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case td_api::inlineKeyboardButtonTypeWebViewUrl::ID: {
|
case td_api::inlineKeyboardButtonTypeWebView::ID: {
|
||||||
auto button_type = move_tl_object_as<td_api::inlineKeyboardButtonTypeWebViewUrl>(button->type_);
|
auto button_type = move_tl_object_as<td_api::inlineKeyboardButtonTypeWebView>(button->type_);
|
||||||
auto user_id = LinkManager::get_link_user_id(button_type->url_);
|
auto user_id = LinkManager::get_link_user_id(button_type->url_);
|
||||||
if (user_id.is_valid()) {
|
if (user_id.is_valid()) {
|
||||||
return Status::Error(400, "Link to a user can't be used in web view URL buttons");
|
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<td_api::inlineKeyboardButton> get_inline_keyboard_button_ob
|
|||||||
"get_inline_keyboard_button_object"));
|
"get_inline_keyboard_button_object"));
|
||||||
break;
|
break;
|
||||||
case InlineKeyboardButton::Type::WebView:
|
case InlineKeyboardButton::Type::WebView:
|
||||||
type = make_tl_object<td_api::inlineKeyboardButtonTypeWebViewUrl>(keyboard_button.data);
|
type = make_tl_object<td_api::inlineKeyboardButtonTypeWebView>(keyboard_button.data);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
UNREACHABLE();
|
UNREACHABLE();
|
||||||
|
@ -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));
|
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();
|
CHECK_IS_USER();
|
||||||
CLEAN_INPUT_STRING(request.url_);
|
CLEAN_INPUT_STRING(request.url_);
|
||||||
CREATE_REQUEST_PROMISE();
|
CREATE_REQUEST_PROMISE();
|
||||||
|
@ -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::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);
|
void on_request(uint64 id, td_api::sendWebViewData &request);
|
||||||
|
|
||||||
|
@ -3428,11 +3428,11 @@ class CliClient final : public Actor {
|
|||||||
bool is_added;
|
bool is_added;
|
||||||
get_args(args, user_id, is_added);
|
get_args(args, user_id, is_added);
|
||||||
send_request(td_api::make_object<td_api::toggleBotIsAddedToAttachMenu>(user_id, is_added));
|
send_request(td_api::make_object<td_api::toggleBotIsAddedToAttachMenu>(user_id, is_added));
|
||||||
} else if (op == "gswvu") {
|
} else if (op == "gwvu") {
|
||||||
UserId user_id;
|
UserId user_id;
|
||||||
string url;
|
string url;
|
||||||
get_args(args, user_id, url);
|
get_args(args, user_id, url);
|
||||||
send_request(td_api::make_object<td_api::getSimpleWebViewUrl>(user_id, url, get_theme_parameters()));
|
send_request(td_api::make_object<td_api::getWebViewUrl>(user_id, url, get_theme_parameters()));
|
||||||
} else if (op == "swvd") {
|
} else if (op == "swvd") {
|
||||||
UserId user_id;
|
UserId user_id;
|
||||||
string button_text;
|
string button_text;
|
||||||
|
Loading…
Reference in New Issue
Block a user