diff options
| author | levlam <levlam@telegram.org> | 2023-03-15 00:23:41 +0300 |
|---|---|---|
| committer | levlam <levlam@telegram.org> | 2023-03-15 00:23:41 +0300 |
| commit | e5cb2fa963fecd574bae214cc62128219c7e5035 (patch) | |
| tree | 9789066f2b7b3d27795424ec820d5d871cd72a2c /td/telegram/Photo.cpp | |
| parent | 0dc9aac72418fbb11b872bcb89725cd60196289a (diff) | |
Add call_source to register_photo_size.
Diffstat (limited to 'td/telegram/Photo.cpp')
| -rw-r--r-- | td/telegram/Photo.cpp | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/td/telegram/Photo.cpp b/td/telegram/Photo.cpp index 91cee5e7a..7e42af55a 100644 --- a/td/telegram/Photo.cpp +++ b/td/telegram/Photo.cpp @@ -54,12 +54,14 @@ ProfilePhoto get_profile_photo(FileManager *file_manager, UserId user_id, int64 result.is_personal = profile_photo->personal_; result.id = profile_photo->photo_id_; result.minithumbnail = profile_photo->stripped_thumb_.as_slice().str(); - result.small_file_id = register_photo_size( - file_manager, PhotoSizeSource::dialog_photo(DialogId(user_id), user_access_hash, false), result.id, - 0 /*access_hash*/, "" /*file_reference*/, DialogId(), 0 /*file_size*/, dc_id, PhotoFormat::Jpeg); - result.big_file_id = register_photo_size( - file_manager, PhotoSizeSource::dialog_photo(DialogId(user_id), user_access_hash, true), result.id, - 0 /*access_hash*/, "" /*file_reference*/, DialogId(), 0 /*file_size*/, dc_id, PhotoFormat::Jpeg); + result.small_file_id = + register_photo_size(file_manager, PhotoSizeSource::dialog_photo(DialogId(user_id), user_access_hash, false), + result.id, 0 /*access_hash*/, "" /*file_reference*/, DialogId(), 0 /*file_size*/, dc_id, + PhotoFormat::Jpeg, "get_profile_photo small"); + result.big_file_id = + register_photo_size(file_manager, PhotoSizeSource::dialog_photo(DialogId(user_id), user_access_hash, true), + result.id, 0 /*access_hash*/, "" /*file_reference*/, DialogId(), 0 /*file_size*/, dc_id, + PhotoFormat::Jpeg, "get_profile_photo big"); break; } default: @@ -107,12 +109,12 @@ DialogPhoto get_dialog_photo(FileManager *file_manager, DialogId dialog_id, int6 result.has_animation = chat_photo->has_video_; result.is_personal = false; result.minithumbnail = chat_photo->stripped_thumb_.as_slice().str(); - result.small_file_id = - register_photo_size(file_manager, PhotoSizeSource::dialog_photo(dialog_id, dialog_access_hash, false), - chat_photo->photo_id_, 0, "", DialogId(), 0, dc_id, PhotoFormat::Jpeg); - result.big_file_id = - register_photo_size(file_manager, PhotoSizeSource::dialog_photo(dialog_id, dialog_access_hash, true), - chat_photo->photo_id_, 0, "", DialogId(), 0, dc_id, PhotoFormat::Jpeg); + result.small_file_id = register_photo_size( + file_manager, PhotoSizeSource::dialog_photo(dialog_id, dialog_access_hash, false), chat_photo->photo_id_, 0, + "", DialogId(), 0, dc_id, PhotoFormat::Jpeg, "get_dialog_photo small"); + result.big_file_id = register_photo_size( + file_manager, PhotoSizeSource::dialog_photo(dialog_id, dialog_access_hash, true), chat_photo->photo_id_, 0, + "", DialogId(), 0, dc_id, PhotoFormat::Jpeg, "get_dialog_photo big"); break; } |
