aboutsummaryrefslogtreecommitdiffhomepage
path: root/td/telegram/StoryContent.cpp
diff options
context:
space:
mode:
authorlevlam <levlam@telegram.org>2023-05-25 01:26:26 +0300
committerlevlam <levlam@telegram.org>2023-05-25 01:26:26 +0300
commitb88312dda1fa4e8ef9635a089dbe7c9e8568c33b (patch)
tree730e13b0eeb9b2205e9cc381c916039747540384 /td/telegram/StoryContent.cpp
parentd2ef7d67a73bf3160a0072c27446278becb5ee9b (diff)
Add FileType::PhotoStory.
Diffstat (limited to 'td/telegram/StoryContent.cpp')
-rw-r--r--td/telegram/StoryContent.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/td/telegram/StoryContent.cpp b/td/telegram/StoryContent.cpp
index a8a5cc059..db9503194 100644
--- a/td/telegram/StoryContent.cpp
+++ b/td/telegram/StoryContent.cpp
@@ -73,7 +73,7 @@ unique_ptr<StoryContent> get_story_content(Td *td, tl_object_ptr<telegram_api::M
break;
}
- auto photo = get_photo(td, std::move(media->photo_), owner_dialog_id);
+ auto photo = get_photo(td, std::move(media->photo_), owner_dialog_id, FileType::PhotoStory);
if (photo.is_empty()) {
LOG(ERROR) << "Receive a story with empty photo";
break;
@@ -140,6 +140,8 @@ Result<unique_ptr<StoryContent>> get_input_story_content(
auto input_story = static_cast<const td_api::inputStoryContentPhoto *>(input_story_content.get());
TRY_RESULT(file_id, td->file_manager_->get_input_file_id(FileType::Photo, input_story->photo_, owner_dialog_id,
false, false));
+ file_id =
+ td->file_manager_->copy_file_id(file_id, FileType::PhotoStory, owner_dialog_id, "get_input_story_content");
auto sticker_file_ids =
td->stickers_manager_->get_attached_sticker_file_ids(input_story->added_sticker_file_ids_);
TRY_RESULT(photo,