From bc730f7d0f56e88f891228f0ff8554274c977323 Mon Sep 17 00:00:00 2001 From: levlam Date: Sat, 24 Dec 2022 08:54:17 +0300 Subject: [PATCH] Improve photo field order in userFullInfo. --- td/generate/scheme/td_api.tl | 4 ++-- td/telegram/ContactsManager.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/td/generate/scheme/td_api.tl b/td/generate/scheme/td_api.tl index 9e6c76d11..9fd0f5417 100644 --- a/td/generate/scheme/td_api.tl +++ b/td/generate/scheme/td_api.tl @@ -649,9 +649,9 @@ user id:int53 first_name:string last_name:string usernames:usernames phone_numbe botInfo share_text:string description:string photo:photo animation:animation menu_button:botMenuButton commands:vector 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 empty or unknown. If non-null, then it is the same photo as in user.profile_photo and chat.photo. This photo isn't returned in the list of user photos //@photo User profile photo; may be null if empty or unknown. If non-null and personal_photo is null, then it is the same photo as in user.profile_photo and chat.photo //@public_photo User profile photo visible if the main photo is hidden by privacy settings; may be null if empty or unknown. If non-null and photo and personal_photo are null, then it is the same photo as in user.profile_photo and chat.photo. This photo isn't returned in the list of user photos -//@personal_photo User profile photo set by the current user for the contact; may be null if empty or unknown. If non-null, then it is the same photo as in user.profile_photo and chat.photo. This photo isn't returned in the list of user photos //@is_blocked True, if the user is blocked by the current user //@can_be_called True, if the user can be called //@supports_video_calls True, if a video call can be created with the user @@ -663,7 +663,7 @@ botInfo share_text:string description:string photo:photo animation:animation men //@premium_gift_options The list of available options for gifting Telegram Premium to the user //@group_in_common_count Number of group chats where both the other user and the current user are a member; 0 for the current user //@bot_info For bots, information about the bot; may be null -userFullInfo photo:chatPhoto public_photo:chatPhoto personal_photo:chatPhoto is_blocked:Bool can_be_called:Bool supports_video_calls:Bool has_private_calls:Bool has_private_forwards:Bool has_restricted_voice_and_video_note_messages:Bool need_phone_number_privacy_exception:Bool bio:formattedText premium_gift_options:vector group_in_common_count:int32 bot_info:botInfo = UserFullInfo; +userFullInfo personal_photo:chatPhoto photo:chatPhoto public_photo:chatPhoto is_blocked:Bool can_be_called:Bool supports_video_calls:Bool has_private_calls:Bool has_private_forwards:Bool has_restricted_voice_and_video_note_messages:Bool need_phone_number_privacy_exception:Bool bio:formattedText premium_gift_options:vector group_in_common_count:int32 bot_info:botInfo = UserFullInfo; //@description Represents a list of users @total_count Approximate total number of users found @user_ids A list of user identifiers users total_count:int32 user_ids:vector = Users; diff --git a/td/telegram/ContactsManager.cpp b/td/telegram/ContactsManager.cpp index 1580d1cfc..10cfc2f58 100644 --- a/td/telegram/ContactsManager.cpp +++ b/td/telegram/ContactsManager.cpp @@ -18037,9 +18037,9 @@ tl_object_ptr ContactsManager::get_user_full_info_object(U } auto voice_messages_forbidden = is_premium ? user_full->voice_messages_forbidden : false; return make_tl_object( + get_chat_photo_object(td_->file_manager_.get(), user_full->personal_photo), get_chat_photo_object(td_->file_manager_.get(), user_full->photo), - get_chat_photo_object(td_->file_manager_.get(), user_full->fallback_photo), - get_chat_photo_object(td_->file_manager_.get(), user_full->personal_photo), user_full->is_blocked, + get_chat_photo_object(td_->file_manager_.get(), user_full->fallback_photo), user_full->is_blocked, user_full->can_be_called, user_full->supports_video_calls, user_full->has_private_calls, !user_full->private_forward_name.empty(), voice_messages_forbidden, user_full->need_phone_number_privacy_exception, std::move(bio_object),