Fix dup_story_content.
This commit is contained in:
parent
e3625824f9
commit
aed9823659
@ -5172,6 +5172,9 @@ unique_ptr<MessageContent> dup_message_content(Td *td, DialogId dialog_id, const
|
|||||||
}
|
}
|
||||||
|
|
||||||
result->photo.photos.clear();
|
result->photo.photos.clear();
|
||||||
|
result->photo.animations.clear();
|
||||||
|
result->photo.sticker_photo_size = nullptr;
|
||||||
|
|
||||||
bool has_thumbnail = thumbnail.type != 0;
|
bool has_thumbnail = thumbnail.type != 0;
|
||||||
if (has_thumbnail) {
|
if (has_thumbnail) {
|
||||||
thumbnail.type = 't';
|
thumbnail.type = 't';
|
||||||
|
@ -446,7 +446,12 @@ unique_ptr<StoryContent> dup_story_content(Td *td, const StoryContent *content)
|
|||||||
photo_size.type = 'i';
|
photo_size.type = 'i';
|
||||||
photo_size.file_id = fix_file_id(photo_size.file_id);
|
photo_size.file_id = fix_file_id(photo_size.file_id);
|
||||||
|
|
||||||
auto result = make_unique<StoryContentPhoto>();
|
auto result = make_unique<StoryContentPhoto>(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));
|
result->photo_.photos.push_back(std::move(photo_size));
|
||||||
return std::move(result);
|
return std::move(result);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user