diff --git a/td/telegram/MessageContent.cpp b/td/telegram/MessageContent.cpp index 09165bb71..68a343bc4 100644 --- a/td/telegram/MessageContent.cpp +++ b/td/telegram/MessageContent.cpp @@ -5172,6 +5172,9 @@ unique_ptr dup_message_content(Td *td, DialogId dialog_id, const } result->photo.photos.clear(); + result->photo.animations.clear(); + result->photo.sticker_photo_size = nullptr; + bool has_thumbnail = thumbnail.type != 0; if (has_thumbnail) { thumbnail.type = 't'; diff --git a/td/telegram/StoryContent.cpp b/td/telegram/StoryContent.cpp index 5efbf5a3b..6da05a353 100644 --- a/td/telegram/StoryContent.cpp +++ b/td/telegram/StoryContent.cpp @@ -446,7 +446,12 @@ unique_ptr dup_story_content(Td *td, const StoryContent *content) photo_size.type = 'i'; photo_size.file_id = fix_file_id(photo_size.file_id); - auto result = make_unique(); + auto result = make_unique(Photo(old_content->photo_)); + + result->photo_.photos.clear(); + result->photo_.animations.clear(); + result->photo_.sticker_photo_size = nullptr; + result->photo_.photos.push_back(std::move(photo_size)); return std::move(result); }