From d484baa1ee1b3531ef2c0bf9374aa8838bad18bb Mon Sep 17 00:00:00 2001 From: levlam Date: Tue, 7 Jul 2020 13:00:56 +0300 Subject: [PATCH] Rename chatPhoto to chatPhotoInfo. GitOrigin-RevId: e301571c29719009148353161da483de9902eb8d --- td/generate/scheme/td_api.tl | 10 +++++----- td/generate/scheme/td_api.tlo | Bin 174948 -> 174956 bytes td/telegram/ContactsManager.cpp | 2 +- td/telegram/MessagesManager.cpp | 9 +++++---- td/telegram/Photo.cpp | 7 ++++--- td/telegram/Photo.h | 3 ++- td/telegram/WebPageBlock.cpp | 2 +- 7 files changed, 18 insertions(+), 15 deletions(-) diff --git a/td/generate/scheme/td_api.tl b/td/generate/scheme/td_api.tl index 56a179957..02b132846 100644 --- a/td/generate/scheme/td_api.tl +++ b/td/generate/scheme/td_api.tl @@ -313,7 +313,7 @@ poll id:int64 question:string options:vector total_voter_count:int32 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 -chatPhoto small:file big:file = ChatPhoto; +chatPhotoInfo small:file big:file = ChatPhotoInfo; //@class UserType @description Represents the type of a user. The following types are possible: regular users, deleted users and bots @@ -773,7 +773,7 @@ chatPosition list:ChatList order:int64 is_pinned:Bool source:ChatSource = ChatPo //@reply_markup_message_id Identifier of the message from which reply markup needs to be used; 0 if there is no default custom reply markup in the chat //@draft_message A draft of a message in the chat; may be null //@client_data Contains application-specific data associated with the chat. (For example, the chat scroll position or local chat notification settings can be stored here.) Persistent if the message database is used -chat id:int53 type:ChatType title:string photo:chatPhoto permissions:chatPermissions last_message:message positions:vector is_marked_as_unread:Bool has_scheduled_messages:Bool can_be_deleted_only_for_self:Bool can_be_deleted_for_all_users:Bool can_be_reported:Bool default_disable_notification:Bool unread_count:int32 last_read_inbox_message_id:int53 last_read_outbox_message_id:int53 unread_mention_count:int32 notification_settings:chatNotificationSettings action_bar:ChatActionBar pinned_message_id:int53 reply_markup_message_id:int53 draft_message:draftMessage client_data:string = Chat; +chat id:int53 type:ChatType title:string photo:chatPhotoInfo permissions:chatPermissions last_message:message positions:vector is_marked_as_unread:Bool has_scheduled_messages:Bool can_be_deleted_only_for_self:Bool can_be_deleted_for_all_users:Bool can_be_reported:Bool default_disable_notification:Bool unread_count:int32 last_read_inbox_message_id:int53 last_read_outbox_message_id:int53 unread_mention_count:int32 notification_settings:chatNotificationSettings action_bar:ChatActionBar pinned_message_id:int53 reply_markup_message_id:int53 draft_message:draftMessage client_data:string = Chat; //@description Represents a list of chats @chat_ids List of chat identifiers chats chat_ids:vector = Chats; @@ -798,7 +798,7 @@ chatInviteLink invite_link:string = ChatInviteLink; //@member_count Number of members in the chat //@member_user_ids User identifiers of some chat members that may be known to the current user //@is_public True, if the chat is a public supergroup or channel, i.e. it has a username or it is a location-based supergroup -chatInviteLinkInfo chat_id:int53 accessible_for:int32 type:ChatType title:string photo:chatPhoto member_count:int32 member_user_ids:vector is_public:Bool = ChatInviteLinkInfo; +chatInviteLinkInfo chat_id:int53 accessible_for:int32 type:ChatType title:string photo:chatPhotoInfo member_count:int32 member_user_ids:vector is_public:Bool = ChatInviteLinkInfo; //@class PublicChatType @description Describes a type of public chats @@ -1073,7 +1073,7 @@ pageBlockCollage page_blocks:vector caption:pageBlockCaption = PageBl pageBlockSlideshow page_blocks:vector caption:pageBlockCaption = PageBlock; //@description A link to a chat @title Chat title @photo Chat photo; may be null @username Chat username, by which all other information about the chat should be resolved -pageBlockChatLink title:string photo:chatPhoto username:string = PageBlock; +pageBlockChatLink title:string photo:chatPhotoInfo username:string = PageBlock; //@description A table @caption Table caption @cells Table cells @is_bordered True, if the table is bordered @is_striped True, if the table is striped pageBlockTable caption:RichText cells:vector> is_bordered:Bool is_striped:Bool = PageBlock; @@ -2963,7 +2963,7 @@ updateNewChat chat:chat = Update; updateChatTitle chat_id:int53 title:string = Update; //@description A chat photo was changed @chat_id Chat identifier @photo The new chat photo; may be null -updateChatPhoto chat_id:int53 photo:chatPhoto = Update; +updateChatPhoto chat_id:int53 photo:chatPhotoInfo = Update; //@description Chat permissions was changed @chat_id Chat identifier @permissions The new chat permissions updateChatPermissions chat_id:int53 permissions:chatPermissions = Update; diff --git a/td/generate/scheme/td_api.tlo b/td/generate/scheme/td_api.tlo index e52226662a715b20edf2376c523110238ead3641..d17c66716c6c1a6e173fb9c4475f12755818d456 100644 GIT binary patch delta 3208 zcmZuzZA_C_6z;iH2Z&gm3tjAH7mHN-B1LgAOO2hnr6!Fj6En=%0s|aI28~0dLnUlBC+-K0^=>mu^lH`77*i)7SH?bt#3?&+LPc+e){&Y-HW%D7FPO7D=I76 z?RUYASj7Ac1_QSr-&p2NQQKauQs;a=BWG#% ztZR(TAsgH zojp`<7P5G-kR{>_98&{_ydv;KW%a29E|d!a^+{F=txbjHLOX3)1vY6tTm{+EO0t1X z4No>cTJOGUrtRP^(gBQ}=`b`jfP2ZiRY z)_&2N)fgXKjlPl9U^8PWti6W)TNf(vn~wBxj4n^Z2+K!AQ&y&9fi&1AHAd1j6)dAq zLb>)=pfQA~>oaguUpknmXALMaplS`~YFdLNQHJS#i&O74r%`u0xMjfMbPR}o2`-(^ zM*Rg4PpuAYj7PWp4#<_ULk^6cb$~@QfEUmIUTT0JH zE{WA-Vr%Qx>IyRP3g=I)nXf-pc;lrKgJJyL#Qa6Op8vDdU-(tYma>YXef+iXX*L+d z1^K>!40Th^5;@QQIHC<)t}~`_M)m1f3T?Erb_bnMFLk=IFn@6tcBLl^wMVn?TCD4! zR7TXT!=AOSgARd(O4q|ANYk?cIts;0>ZG776VI1A&#)oq51IPUuzbRDu4Gw+HF8F? z8qP8a0?IoJN&>g|(<17VUsF_nzKOcdflUoOkC#r-Zm=*s(!yp-gevDzkO&CsKS$29+PTZTs@y*{h%(3Ch5W}MKoSu zof1iUF0kq1D+{zM#px2KQS?)t-zwDI3N|~(V{d=+mXotf4)}`;D@*v*i;cv6c!cW8 zF^Og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$QW=x{TZWCU!?(v3h1v-~5-EJ-FtFxYw#HQX1mjH!!APt{h=-hJt1 zABkNOj~yGK;s{rBW>OzTM^6-`#nq}Je?~zbgYGg)OHH+0M&|w%4uN-?1#enjd-D}c zqKyavr-`J8amS~xpj3Y=*ob3Pyym3hnnqX5FE)x&&qguB`#EPP^?4+YbP+!J0V`wlE~!=WKB874c8Idbse#Qf(wQ(%e7ZL)uo-FG%SZ9oL}X8nd=wiz9+foZC%2GWKZ%xO5^D%fB4c6_x|xdmHcmd_ z6XnNm!xD20OyNy1JB0*>X=RGj$`q%OG&~JnmTR0r%sGQcuxAE^#%I98;>>pttG@%g z7A|MZpr3YRWKG<2;UopT|Zz z6)ZfD%V2nfdo!iRINu{2QU4?8Vtl3rd05eo1?bXiq^}3zvt!j!>pu|7m!4rE;IT?Z z)RM&&uaQ2AiFjn{nHAD{yesz$=<4`J0 z1WN?(w}paxUm;7j<;lrJJg_{&Mik7jhqEzEzm79WmJsZ;l5UKM2G?=^A{G)Z;beK| z7A{@IqG>y{j;Oz$YuTif1mx&Ru9|rahq-REo-XC;&s&N`<3DmC^=gHIpSXC||M1|Z AO#lD@ diff --git a/td/telegram/ContactsManager.cpp b/td/telegram/ContactsManager.cpp index 677ad4fd1..9b3ff79fb 100644 --- a/td/telegram/ContactsManager.cpp +++ b/td/telegram/ContactsManager.cpp @@ -13848,7 +13848,7 @@ tl_object_ptr ContactsManager::get_chat_invite_link_ } return make_tl_object(dialog_id.get(), accessible_for, std::move(chat_type), title, - get_chat_photo_object(td_->file_manager_.get(), photo), + get_chat_photo_info_object(td_->file_manager_.get(), photo), participant_count, std::move(member_user_ids), is_public); } diff --git a/td/telegram/MessagesManager.cpp b/td/telegram/MessagesManager.cpp index b97136113..6b81622c2 100644 --- a/td/telegram/MessagesManager.cpp +++ b/td/telegram/MessagesManager.cpp @@ -17462,7 +17462,7 @@ td_api::object_ptr MessagesManager::get_chat_object(const Dialog * return make_tl_object( d->dialog_id.get(), get_chat_type_object(d->dialog_id), get_dialog_title(d->dialog_id), - get_chat_photo_object(td_->file_manager_.get(), get_dialog_photo(d->dialog_id)), + get_chat_photo_info_object(td_->file_manager_.get(), get_dialog_photo(d->dialog_id)), get_dialog_permissions(d->dialog_id).get_chat_permissions_object(), get_message_object(d->dialog_id, get_message(d, d->last_message_id)), get_chat_positions_object(d), d->is_marked_as_unread, get_dialog_has_scheduled_messages(d), can_delete_for_self, can_delete_for_all_users, @@ -26139,9 +26139,10 @@ void MessagesManager::on_dialog_bots_updated(DialogId dialog_id, vector void MessagesManager::on_dialog_photo_updated(DialogId dialog_id) { auto d = get_dialog(dialog_id); // called from update_user, must not create the dialog if (d != nullptr && d->is_update_new_chat_sent) { - send_closure(G()->td(), &Td::send_update, - make_tl_object( - dialog_id.get(), get_chat_photo_object(td_->file_manager_.get(), get_dialog_photo(dialog_id)))); + send_closure( + G()->td(), &Td::send_update, + make_tl_object( + dialog_id.get(), get_chat_photo_info_object(td_->file_manager_.get(), get_dialog_photo(dialog_id)))); } } diff --git a/td/telegram/Photo.cpp b/td/telegram/Photo.cpp index c115253ad..3d02d98d1 100644 --- a/td/telegram/Photo.cpp +++ b/td/telegram/Photo.cpp @@ -246,12 +246,13 @@ DialogPhoto get_dialog_photo(FileManager *file_manager, DialogId dialog_id, int6 return result; } -tl_object_ptr get_chat_photo_object(FileManager *file_manager, const DialogPhoto *dialog_photo) { +tl_object_ptr get_chat_photo_info_object(FileManager *file_manager, + const DialogPhoto *dialog_photo) { if (dialog_photo == nullptr || !dialog_photo->small_file_id.is_valid()) { return nullptr; } - return td_api::make_object(file_manager->get_file_object(dialog_photo->small_file_id), - file_manager->get_file_object(dialog_photo->big_file_id)); + return td_api::make_object(file_manager->get_file_object(dialog_photo->small_file_id), + file_manager->get_file_object(dialog_photo->big_file_id)); } vector dialog_photo_get_file_ids(const DialogPhoto &dialog_photo) { diff --git a/td/telegram/Photo.h b/td/telegram/Photo.h index 331ad5147..6437cc23d 100644 --- a/td/telegram/Photo.h +++ b/td/telegram/Photo.h @@ -84,7 +84,8 @@ StringBuilder &operator<<(StringBuilder &string_builder, const ProfilePhoto &pro DialogPhoto get_dialog_photo(FileManager *file_manager, DialogId dialog_id, int64 dialog_access_hash, tl_object_ptr &&chat_photo_ptr); -tl_object_ptr get_chat_photo_object(FileManager *file_manager, const DialogPhoto *dialog_photo); +tl_object_ptr get_chat_photo_info_object(FileManager *file_manager, + const DialogPhoto *dialog_photo); DialogPhoto as_dialog_photo(const Photo &photo); diff --git a/td/telegram/WebPageBlock.cpp b/td/telegram/WebPageBlock.cpp index e070f2f9b..3be67d5e3 100644 --- a/td/telegram/WebPageBlock.cpp +++ b/td/telegram/WebPageBlock.cpp @@ -1410,7 +1410,7 @@ class WebPageBlockChatLink : public WebPageBlock { td_api::object_ptr get_page_block_object(Context *context) const override { return make_tl_object( - title, get_chat_photo_object(context->td_->file_manager_.get(), &photo), username); + title, get_chat_photo_info_object(context->td_->file_manager_.get(), &photo), username); } template