Rename share_text to short_description.
This commit is contained in:
parent
0381558d54
commit
040f0a954c
@ -692,7 +692,7 @@ user id:int53 first_name:string last_name:string usernames:usernames phone_numbe
|
||||
|
||||
|
||||
//@description Contains information about a bot
|
||||
//@share_text The text that is shown on the bot's profile page and is sent together with the link when users share the bot
|
||||
//@short_description The text that is shown on the bot's profile page and is sent together with the link when users share the bot
|
||||
//@param_description The text shown in the chat with the bot if the chat is empty
|
||||
//@photo Photo shown in the chat with the bot if the chat is empty; may be null
|
||||
//@animation Animation shown in the chat with the bot if the chat is empty; may be null
|
||||
@ -700,7 +700,7 @@ user id:int53 first_name:string last_name:string usernames:usernames phone_numbe
|
||||
//@commands List of the bot commands
|
||||
//@default_group_administrator_rights Default administrator rights for adding the bot to basic group and supergroup chats; may be null
|
||||
//@default_channel_administrator_rights Default administrator rights for adding the bot to channels; may be null
|
||||
botInfo share_text:string description:string photo:photo animation:animation menu_button:botMenuButton commands:vector<botCommand> default_group_administrator_rights:chatAdministratorRights default_channel_administrator_rights:chatAdministratorRights = BotInfo;
|
||||
botInfo short_description:string description:string photo:photo animation:animation menu_button:botMenuButton commands:vector<botCommand> default_group_administrator_rights:chatAdministratorRights default_channel_administrator_rights:chatAdministratorRights = BotInfo;
|
||||
|
||||
//@description Contains full information about a user
|
||||
//@personal_photo User profile photo set by the current user for the contact; may be null. If null and user.profile_photo is null, then the photo is empty; otherwise, it is unknown.
|
||||
@ -7615,13 +7615,13 @@ setBotInfoDescription language_code:string description:string = Ok;
|
||||
getBotInfoDescription language_code:string = Text;
|
||||
|
||||
//@description Sets the text shown on the bot's profile page and sent together with the link when users share the bot; bots only
|
||||
//@language_code A two-letter ISO 639-1 language code. If empty, the share text will be shown to all users, for which language there are no dedicated description
|
||||
//@share_text New bot's share text on the specified language
|
||||
setBotInfoShareText language_code:string share_text:string = Ok;
|
||||
//@language_code A two-letter ISO 639-1 language code. If empty, the short description will be shown to all users, for which language there are no dedicated description
|
||||
//@short_description New bot's short description on the specified language
|
||||
setBotInfoShortDescription language_code:string short_description:string = Ok;
|
||||
|
||||
//@description Returns the text shown on the bot's profile page and sent together with the link when users share the bot in the given language; bots only
|
||||
//@language_code A two-letter ISO 639-1 language code or an empty string
|
||||
getBotInfoShareText language_code:string = Text;
|
||||
getBotInfoShortDescription language_code:string = Text;
|
||||
|
||||
|
||||
//@description Returns all active sessions of the current user
|
||||
|
@ -808,13 +808,13 @@ void get_bot_info_description(Td *td, const string &language_code, Promise<strin
|
||||
td->create_handler<GetBotInfoQuery>(std::move(promise))->send(language_code, 1);
|
||||
}
|
||||
|
||||
void set_bot_info_share_text(Td *td, const string &language_code, const string &share_text, Promise<Unit> &&promise) {
|
||||
void set_bot_info_about(Td *td, const string &language_code, const string &about, Promise<Unit> &&promise) {
|
||||
TRY_STATUS_PROMISE(promise, validate_bot_language_code(language_code));
|
||||
td->contacts_manager_->invalidate_user_full(td->contacts_manager_->get_my_id());
|
||||
td->create_handler<SetBotInfoQuery>(std::move(promise))->send(language_code, true, share_text, false, string());
|
||||
td->create_handler<SetBotInfoQuery>(std::move(promise))->send(language_code, true, about, false, string());
|
||||
}
|
||||
|
||||
void get_bot_info_share_text(Td *td, const string &language_code, Promise<string> &&promise) {
|
||||
void get_bot_info_about(Td *td, const string &language_code, Promise<string> &&promise) {
|
||||
TRY_STATUS_PROMISE(promise, validate_bot_language_code(language_code));
|
||||
td->create_handler<GetBotInfoQuery>(std::move(promise))->send(language_code, 0);
|
||||
}
|
||||
|
@ -54,9 +54,9 @@ void set_bot_info_description(Td *td, const string &language_code, const string
|
||||
|
||||
void get_bot_info_description(Td *td, const string &language_code, Promise<string> &&promise);
|
||||
|
||||
void set_bot_info_share_text(Td *td, const string &language_code, const string &share_text, Promise<Unit> &&promise);
|
||||
void set_bot_info_about(Td *td, const string &language_code, const string &about, Promise<Unit> &&promise);
|
||||
|
||||
void get_bot_info_share_text(Td *td, const string &language_code, Promise<string> &&promise);
|
||||
void get_bot_info_about(Td *td, const string &language_code, Promise<string> &&promise);
|
||||
|
||||
void export_contact_token(Td *td, Promise<td_api::object_ptr<td_api::userLink>> &&promise);
|
||||
|
||||
|
@ -7042,14 +7042,14 @@ void Td::on_request(uint64 id, const td_api::getBotInfoDescription &request) {
|
||||
get_bot_info_description(this, request.language_code_, std::move(query_promise));
|
||||
}
|
||||
|
||||
void Td::on_request(uint64 id, td_api::setBotInfoShareText &request) {
|
||||
void Td::on_request(uint64 id, td_api::setBotInfoShortDescription &request) {
|
||||
CHECK_IS_BOT();
|
||||
CLEAN_INPUT_STRING(request.share_text_);
|
||||
CLEAN_INPUT_STRING(request.short_description_);
|
||||
CREATE_OK_REQUEST_PROMISE();
|
||||
set_bot_info_share_text(this, request.language_code_, request.share_text_, std::move(promise));
|
||||
set_bot_info_about(this, request.language_code_, request.short_description_, std::move(promise));
|
||||
}
|
||||
|
||||
void Td::on_request(uint64 id, const td_api::getBotInfoShareText &request) {
|
||||
void Td::on_request(uint64 id, const td_api::getBotInfoShortDescription &request) {
|
||||
CHECK_IS_BOT();
|
||||
CREATE_REQUEST_PROMISE();
|
||||
auto query_promise = PromiseCreator::lambda([promise = std::move(promise)](Result<string> result) mutable {
|
||||
@ -7059,7 +7059,7 @@ void Td::on_request(uint64 id, const td_api::getBotInfoShareText &request) {
|
||||
promise.set_value(td_api::make_object<td_api::text>(result.move_as_ok()));
|
||||
}
|
||||
});
|
||||
get_bot_info_share_text(this, request.language_code_, std::move(query_promise));
|
||||
get_bot_info_about(this, request.language_code_, std::move(query_promise));
|
||||
}
|
||||
|
||||
void Td::on_request(uint64 id, const td_api::setLocation &request) {
|
||||
|
@ -1124,9 +1124,9 @@ class Td final : public Actor {
|
||||
|
||||
void on_request(uint64 id, const td_api::getBotInfoDescription &request);
|
||||
|
||||
void on_request(uint64 id, td_api::setBotInfoShareText &request);
|
||||
void on_request(uint64 id, td_api::setBotInfoShortDescription &request);
|
||||
|
||||
void on_request(uint64 id, const td_api::getBotInfoShareText &request);
|
||||
void on_request(uint64 id, const td_api::getBotInfoShortDescription &request);
|
||||
|
||||
void on_request(uint64 id, const td_api::setLocation &request);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user