Add edit links to userFull.
This commit is contained in:
parent
e2d3f2694f
commit
c44a2d07b5
@ -712,7 +712,11 @@ user id:int53 first_name:string last_name:string usernames:usernames phone_numbe
|
|||||||
//@commands List of the bot commands
|
//@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_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
|
//@default_channel_administrator_rights Default administrator rights for adding the bot to channels; may be null
|
||||||
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;
|
//@edit_commands_link The internal link, which can be used to edit bot commands; may be null
|
||||||
|
//@edit_description_link The internal link, which can be used to edit bot description; may be null
|
||||||
|
//@edit_description_media_link The internal link, which can be used to edit the photo or animation shown in the chat with the bot if the chat is empty; may be null
|
||||||
|
//@edit_settings_link The internal link, which can be used to edit bot settings; may be null
|
||||||
|
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 edit_commands_link:InternalLinkType edit_description_link:InternalLinkType edit_description_media_link:InternalLinkType edit_settings_link:InternalLinkType = BotInfo;
|
||||||
|
|
||||||
//@description Contains full information about a user
|
//@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.
|
//@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.
|
||||||
|
@ -18590,7 +18590,20 @@ tl_object_ptr<td_api::userFullInfo> ContactsManager::get_user_full_info_object(U
|
|||||||
: user_full->group_administrator_rights.get_chat_administrator_rights_object(),
|
: user_full->group_administrator_rights.get_chat_administrator_rights_object(),
|
||||||
user_full->broadcast_administrator_rights == AdministratorRights()
|
user_full->broadcast_administrator_rights == AdministratorRights()
|
||||||
? nullptr
|
? nullptr
|
||||||
: user_full->broadcast_administrator_rights.get_chat_administrator_rights_object());
|
: user_full->broadcast_administrator_rights.get_chat_administrator_rights_object(),
|
||||||
|
nullptr, nullptr, nullptr, nullptr);
|
||||||
|
const User *u = get_user(user_id);
|
||||||
|
if (u != nullptr && u->can_be_edited_bot && u->usernames.has_editable_username()) {
|
||||||
|
auto bot_username = u->usernames.get_editable_username();
|
||||||
|
bot_info->edit_commands_link_ = td_api::make_object<td_api::internalLinkTypeBotStart>(
|
||||||
|
"botfather", PSTRING() << bot_username << "-commands", true);
|
||||||
|
bot_info->edit_description_link_ = td_api::make_object<td_api::internalLinkTypeBotStart>(
|
||||||
|
"botfather", PSTRING() << bot_username << "-intro", true);
|
||||||
|
bot_info->edit_description_media_link_ = td_api::make_object<td_api::internalLinkTypeBotStart>(
|
||||||
|
"botfather", PSTRING() << bot_username << "-intropic", true);
|
||||||
|
bot_info->edit_settings_link_ =
|
||||||
|
td_api::make_object<td_api::internalLinkTypeBotStart>("botfather", bot_username, true);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
FormattedText bio;
|
FormattedText bio;
|
||||||
bio.text = user_full->about;
|
bio.text = user_full->about;
|
||||||
|
Loading…
Reference in New Issue
Block a user