Add minithumbnail to user profile photo.

GitOrigin-RevId: dbadd36ac8eed84f9f9cdddae3740fab9c494bb9
This commit is contained in:
levlam 2020-06-30 12:57:54 +03:00
parent cf93b3c69c
commit fe01434b3d
3 changed files with 5 additions and 4 deletions

View File

@ -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<photoSize> animation:photoSize = ChatPhoto;
chatPhoto id:int64 added_date:int32 minithumbnail:minithumbnail sizes:vector<photoSize> 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<chatPhoto> = ChatPhotos;

Binary file not shown.

View File

@ -673,9 +673,9 @@ tl_object_ptr<td_api::chatPhoto> get_chat_photo_object(FileManager *file_manager
}
const PhotoSize *animation = photo.animated_photos.empty() ? nullptr : &photo.animated_photos.back();
return td_api::make_object<td_api::chatPhoto>(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<td_api::chatPhoto>(
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) {