From 193c7c6293ceddc4a6124a0dca280841829316f6 Mon Sep 17 00:00:00 2001 From: levlam Date: Tue, 7 Jul 2020 13:48:56 +0300 Subject: [PATCH] Rename chatPhotoFullInfo to chatPhoto. GitOrigin-RevId: f97da057f1f74ccce283d21d1cfdd827bf51c871 --- td/generate/scheme/td_api.tl | 14 +++++++------- td/generate/scheme/td_api.tlo | Bin 174956 -> 174940 bytes td/telegram/ContactsManager.cpp | 4 ++-- td/telegram/MessageContent.cpp | 3 +-- td/telegram/MessagesManager.cpp | 4 ++-- td/telegram/Photo.cpp | 5 ++--- td/telegram/Photo.h | 2 +- 7 files changed, 15 insertions(+), 17 deletions(-) diff --git a/td/generate/scheme/td_api.tl b/td/generate/scheme/td_api.tl index 02b132846..11d8772c4 100644 --- a/td/generate/scheme/td_api.tl +++ b/td/generate/scheme/td_api.tl @@ -312,7 +312,7 @@ poll id:int64 question:string options:vector total_voter_count:int32 //@small A small (160x160) user profile photo. The file can be downloaded only before the photo is changed @big A big (640x640) user profile photo. The file can be downloaded only before the photo is changed profilePhoto id:int64 small:file big:file = ProfilePhoto; -//@description Describes the photo of a chat @small A small (160x160) chat photo. The file can be downloaded only before the photo is changed @big A big (640x640) chat photo. The file can be downloaded only before the photo is changed +//@description Contains basic information about the photo of a chat @small A small (160x160) chat photo variant in JPEG format. The file can be downloaded only before the photo is changed @big A big (640x640) chat photo variant in JPEG format. The file can be downloaded only before the photo is changed chatPhotoInfo small:file big:file = ChatPhotoInfo; @@ -351,8 +351,8 @@ userProfilePhoto id:int64 added_date:int32 sizes:vector = UserProfile userProfilePhotos total_count:int32 photos:vector = UserProfilePhotos; -//@description Contains full information about a chat photo @added_date Point in time (Unix timestamp) when the photo has been added @sizes Available variants of the chat photo, in different size -chatPhotoFullInfo added_date:int32 sizes:vector = ChatPhotoFullInfo; +//@description Describes a chat photo @added_date Point in time (Unix timestamp) when the photo has been added @sizes Available variants of the chat photo, in different size +chatPhoto added_date:int32 sizes:vector = ChatPhoto; //@description Represents a user @id User identifier @first_name First name of the user @last_name Last name of the user @username Username of the user @@ -500,7 +500,7 @@ basicGroup id:int32 member_count:int32 status:ChatMemberStatus is_active:Bool up //@creator_user_id User identifier of the creator of the group; 0 if unknown //@members Group members //@invite_link Invite link for this group; available only after it has been generated at least once and only for the group creator -basicGroupFullInfo photo:chatPhotoFullInfo description:string creator_user_id:int32 members:vector invite_link:string = BasicGroupFullInfo; +basicGroupFullInfo photo:chatPhoto description:string creator_user_id:int32 members:vector invite_link:string = BasicGroupFullInfo; //@description Represents a supergroup or channel with zero or more members (subscribers in the case of channels). From the point of view of the system, a channel is a special kind of a supergroup: only administrators can post and see the list of members, and posts from all administrators use the name and photo of the channel instead of individual names and profile photos. Unlike supergroups, channels can have an unlimited number of subscribers @@ -540,7 +540,7 @@ supergroup id:int32 username:string date:int32 status:ChatMemberStatus member_co //@invite_link Invite link for this chat //@upgraded_from_basic_group_id Identifier of the basic group from which supergroup was upgraded; 0 if none //@upgraded_from_max_message_id Identifier of the last message in the basic group from which supergroup was upgraded; 0 if none -supergroupFullInfo photo:chatPhotoFullInfo description:string member_count:int32 administrator_count:int32 restricted_count:int32 banned_count:int32 linked_chat_id:int53 slow_mode_delay:int32 slow_mode_delay_expires_in:double can_get_members:Bool can_set_username:Bool can_set_sticker_set:Bool can_set_location:Bool can_view_statistics:Bool is_all_history_available:Bool sticker_set_id:int64 location:chatLocation invite_link:string upgraded_from_basic_group_id:int32 upgraded_from_max_message_id:int53 = SupergroupFullInfo; +supergroupFullInfo photo:chatPhoto description:string member_count:int32 administrator_count:int32 restricted_count:int32 banned_count:int32 linked_chat_id:int53 slow_mode_delay:int32 slow_mode_delay_expires_in:double can_get_members:Bool can_set_username:Bool can_set_sticker_set:Bool can_set_location:Bool can_view_statistics:Bool is_all_history_available:Bool sticker_set_id:int64 location:chatLocation invite_link:string upgraded_from_basic_group_id:int32 upgraded_from_max_message_id:int53 = SupergroupFullInfo; //@class SecretChatState @description Describes the current secret chat state @@ -1510,7 +1510,7 @@ messageSupergroupChatCreate title:string = MessageContent; messageChatChangeTitle title:string = MessageContent; //@description An updated chat photo @photo New chat photo -messageChatChangePhoto photo:chatPhotoFullInfo = MessageContent; +messageChatChangePhoto photo:chatPhoto = MessageContent; //@description A deleted chat photo messageChatDeletePhoto = MessageContent; @@ -2131,7 +2131,7 @@ chatEventDescriptionChanged old_description:string new_description:string = Chat chatEventUsernameChanged old_username:string new_username:string = ChatEventAction; //@description The chat photo was changed @old_photo Previous chat photo value; may be null @new_photo New chat photo value; may be null -chatEventPhotoChanged old_photo:chatPhotoFullInfo new_photo:chatPhotoFullInfo = ChatEventAction; +chatEventPhotoChanged old_photo:chatPhoto new_photo:chatPhoto = ChatEventAction; //@description The can_invite_users permission of a supergroup chat was toggled @can_invite_users New value of can_invite_users permission chatEventInvitesToggled can_invite_users:Bool = ChatEventAction; diff --git a/td/generate/scheme/td_api.tlo b/td/generate/scheme/td_api.tlo index d17c66716c6c1a6e173fb9c4475f12755818d456..9ee65a4492a6422313d41c6f8f8bbead3d877cf1 100644 GIT binary patch delta 1912 zcmaJ?Ur1YL6wkT$Mw580*K*fd4BKVgwJE*e9c(NQ4qUZmqr%+igB__}lU&VcW}L<$ zOsdkbWl%8fH~n71$Y>uF%9@cv_OQ{2G71ygvaNK`2OoU!A%!yb;Dg%T@6S!`x-?HG zzw;Mye)>Jsx8*LUUycyg;*FtGNGp!1>z8IEQ@F;HT#m!Urm8q9bOja!_Xvv`+Pi}Qj* z77rNWNYO>qC`WptmPxuGU6J3PuLdHk(ZbzVV$M`fePNH%(WIOijgHuHkB4^rM^s}6 zza7=u$OM1|KYuP}j8_(k@j>KcJnMQa!72;K`5cmQjy!Y`*$y+#`!ndMbu&5 z;nZ;0?+ys?<16sa)iXXCUfLPXs487F(h^y;l*dEYCjVuEwo&p;$7ku%p|PEQYGCsy z1d(+|LEAea=F)d{YAhayE~MO-kv1=({4V$2+0_`Wy4%N$u07397MbjffPU#bf#lzq z0{VH6lQ;I#jNJcJZ*$4yEZqeo82a`pqvO0S1o0ygWR&~C$J24&f&xrxAq(}T7S@23 zuuz3*Du9y!daX_ozxM=Apq+IMZvwE^up+>-PDC_!`$L=+T<0yv$trnx-(-ri$RTWs zVCtj=z8-YDX0Bhn+4Pw`F)=h^_k0?&i63V~*yQy{5Mby{B`^HLA_@(zN~HlJ4AUCHU{+rvB)M`8d(!A;(|vAp1T+6z|Cv*nyN7uFS+Vw|Gft!;0*t3CUde>I|>wvdo$ImJCx& z+iZ5zTg{MVSk=YK!2^&024-8psNes33xsO>3+VIgF;whemjj!Mdk_%?dYIaE1&kVB zz;mae1N&Mb%)C9VFS$MC*;bG)2FaUraAI=I9v>M`O^%(OOeQ}V9Zq=&jtle7;*qaQ zxiSyEB7MNh3WBa9Ub;wlWf@*8r*A;|5Phz2Wf?RquR5nf`L^TUZAV_S${nB4g@SI)S>^iCe;yPz+wV%xd~tjb~!8 zUAMjd`7aD3%81t5=^yd7cFv86b}Y`nS{7dIw>I$n@9E&)TMhM= zFPggSW^SJy{Gyiz);gkOMv&5{VqAv96iKgumsH<$q0p*{le|x-RfjnawR6t~0R7^$ z)Q)+hd)Ot^J2{n(PmDcw_b{9;E;JU8eOHS41@K$>jdg{9udj{o5&dBUo-f8WA#;%5 zOfFC;IFFH;R90lJiB3X})BpP}JU+j-CDwnP5|O diff --git a/td/telegram/ContactsManager.cpp b/td/telegram/ContactsManager.cpp index 9b3ff79fb..6ddbf9842 100644 --- a/td/telegram/ContactsManager.cpp +++ b/td/telegram/ContactsManager.cpp @@ -13644,7 +13644,7 @@ tl_object_ptr ContactsManager::get_basic_group_full_ const ChatFull *chat_full) const { CHECK(chat_full != nullptr); return make_tl_object( - get_chat_photo_full_info_object(td_->file_manager_.get(), chat_full->photo), chat_full->description, + get_chat_photo_object(td_->file_manager_.get(), chat_full->photo), chat_full->description, get_user_id_object(chat_full->creator_user_id, "basicGroupFullInfo"), transform(chat_full->participants, [this](const DialogParticipant &chat_participant) { return get_chat_member_object(chat_participant); }), @@ -13689,7 +13689,7 @@ tl_object_ptr ContactsManager::get_supergroup_full_i slow_mode_delay_expires_in = max(channel_full->slow_mode_next_send_date - G()->server_time(), 1e-3); } return td_api::make_object( - get_chat_photo_full_info_object(td_->file_manager_.get(), channel_full->photo), channel_full->description, + get_chat_photo_object(td_->file_manager_.get(), channel_full->photo), channel_full->description, channel_full->participant_count, channel_full->administrator_count, channel_full->restricted_count, channel_full->banned_count, DialogId(channel_full->linked_channel_id).get(), channel_full->slow_mode_delay, slow_mode_delay_expires_in, channel_full->can_get_participants, channel_full->can_set_username, diff --git a/td/telegram/MessageContent.cpp b/td/telegram/MessageContent.cpp index 3fea12957..2e1718b0a 100644 --- a/td/telegram/MessageContent.cpp +++ b/td/telegram/MessageContent.cpp @@ -4439,8 +4439,7 @@ tl_object_ptr get_message_content_object(const MessageCo } case MessageContentType::ChatChangePhoto: { const MessageChatChangePhoto *m = static_cast(content); - return make_tl_object( - get_chat_photo_full_info_object(td->file_manager_.get(), m->photo)); + return make_tl_object(get_chat_photo_object(td->file_manager_.get(), m->photo)); } case MessageContentType::ChatDeletePhoto: return make_tl_object(); diff --git a/td/telegram/MessagesManager.cpp b/td/telegram/MessagesManager.cpp index 6b81622c2..c395e9b30 100644 --- a/td/telegram/MessagesManager.cpp +++ b/td/telegram/MessagesManager.cpp @@ -27865,8 +27865,8 @@ tl_object_ptr MessagesManager::get_chat_event_action_ob auto file_manager = td_->file_manager_.get(); auto old_photo = get_photo(file_manager, std::move(action->prev_photo_), DialogId(channel_id)); auto new_photo = get_photo(file_manager, std::move(action->new_photo_), DialogId(channel_id)); - return make_tl_object(get_chat_photo_full_info_object(file_manager, old_photo), - get_chat_photo_full_info_object(file_manager, new_photo)); + return make_tl_object(get_chat_photo_object(file_manager, old_photo), + get_chat_photo_object(file_manager, new_photo)); } case telegram_api::channelAdminLogEventActionDefaultBannedRights::ID: { auto action = move_tl_object_as(action_ptr); diff --git a/td/telegram/Photo.cpp b/td/telegram/Photo.cpp index 3d02d98d1..60b87e5ec 100644 --- a/td/telegram/Photo.cpp +++ b/td/telegram/Photo.cpp @@ -663,13 +663,12 @@ tl_object_ptr get_user_profile_photo_object(FileManage get_photo_sizes_object(file_manager, photo.photos)); } -tl_object_ptr get_chat_photo_full_info_object(FileManager *file_manager, - const Photo &photo) { +tl_object_ptr get_chat_photo_object(FileManager *file_manager, const Photo &photo) { if (photo.is_empty()) { return nullptr; } - return td_api::make_object(photo.date, get_photo_sizes_object(file_manager, photo.photos)); + return td_api::make_object(photo.date, get_photo_sizes_object(file_manager, photo.photos)); } void photo_delete_thumbnail(Photo &photo) { diff --git a/td/telegram/Photo.h b/td/telegram/Photo.h index 6437cc23d..f0ba01e15 100644 --- a/td/telegram/Photo.h +++ b/td/telegram/Photo.h @@ -127,7 +127,7 @@ Photo get_web_document_photo(FileManager *file_manager, tl_object_ptr get_photo_object(FileManager *file_manager, const Photo &photo); tl_object_ptr get_user_profile_photo_object(FileManager *file_manager, const Photo &photo); -tl_object_ptr get_chat_photo_full_info_object(FileManager *file_manager, const Photo &photo); +tl_object_ptr get_chat_photo_object(FileManager *file_manager, const Photo &photo); void photo_delete_thumbnail(Photo &photo);