From fe01434b3d288c5fd3ae3f743be712660d783508 Mon Sep 17 00:00:00 2001 From: levlam Date: Tue, 30 Jun 2020 12:57:54 +0300 Subject: [PATCH] Add minithumbnail to user profile photo. GitOrigin-RevId: dbadd36ac8eed84f9f9cdddae3740fab9c494bb9 --- td/generate/scheme/td_api.tl | 3 ++- td/generate/scheme/td_api.tlo | Bin 176652 -> 176692 bytes td/telegram/Photo.cpp | 6 +++--- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/td/generate/scheme/td_api.tl b/td/generate/scheme/td_api.tl index 31a2d1a36..8541c8bf3 100644 --- a/td/generate/scheme/td_api.tl +++ b/td/generate/scheme/td_api.tl @@ -347,9 +347,10 @@ chatLocation location:location address:string = ChatLocation; //@description Describes a chat or user profile photo //@id Unique photo identifier //@added_date Point in time (Unix timestamp) when the photo has been added +//@minithumbnail Photo minithumbnail; may be null //@sizes Available variants of the photo in JPEG format, in different size //@animation Animated variant of the photo in MPEG4 format; may be null -chatPhoto id:int64 added_date:int32 sizes:vector animation:photoSize = ChatPhoto; +chatPhoto id:int64 added_date:int32 minithumbnail:minithumbnail sizes:vector animation:photoSize = ChatPhoto; //@description Contains a list of chat or user profile photos @total_count Total number of photos @photos List of photos chatPhotos total_count:int32 photos:vector = ChatPhotos; diff --git a/td/generate/scheme/td_api.tlo b/td/generate/scheme/td_api.tlo index 34e305a254f81b7072258b92f5e9c3ac6f40741b..f38632a3e3901810fadbda1501d61700a55e60a2 100644 GIT binary patch delta 169 zcmeBq!nNfI*M=#aEb@m|F>Ri~8Dj}%P2XV4Xs}tsIY$A^ojfBM%2<%3xcP3fvxEpp zJ!f)8Vo5+oen~z91BgFa!A)awOpVI4&x{(=J0ckkCU2NBq?sbo9rwh0#eSI zoRL@(kda@K&%glUPhPM=V)6$Y!O5{T%9B^r#6a|N)V=^Srt8EqDQp(0J2HtCq?mE~ iK~_fj?SBLq&$K}l8XPs;{&zZKus4{yJ>)UtgL42f!#d;u diff --git a/td/telegram/Photo.cpp b/td/telegram/Photo.cpp index 5a7902758..d6938eecb 100644 --- a/td/telegram/Photo.cpp +++ b/td/telegram/Photo.cpp @@ -673,9 +673,9 @@ tl_object_ptr get_chat_photo_object(FileManager *file_manager } const PhotoSize *animation = photo.animated_photos.empty() ? nullptr : &photo.animated_photos.back(); - return td_api::make_object(photo.id.get(), photo.date, - get_photo_sizes_object(file_manager, photo.photos), - get_photo_size_object(file_manager, animation)); + return td_api::make_object( + photo.id.get(), photo.date, get_minithumbnail_object(photo.minithumbnail), + get_photo_sizes_object(file_manager, photo.photos), get_photo_size_object(file_manager, animation)); } void photo_delete_thumbnail(Photo &photo) {