Add get_story_content_any_file_id.
This commit is contained in:
parent
41da14fd17
commit
2b74fb9542
@ -229,6 +229,18 @@ td_api::object_ptr<td_api::StoryContent> get_story_content_object(Td *td, const
|
||||
}
|
||||
}
|
||||
|
||||
FileId get_story_content_any_file_id(const Td *td, const StoryContent *content) {
|
||||
switch (content->get_type()) {
|
||||
case StoryContentType::Photo:
|
||||
return get_photo_any_file_id(static_cast<const StoryContentPhoto *>(content)->photo_);
|
||||
case StoryContentType::Video:
|
||||
return static_cast<const StoryContentVideo *>(content)->file_id_;
|
||||
case StoryContentType::Unsupported:
|
||||
default:
|
||||
return {};
|
||||
}
|
||||
}
|
||||
|
||||
vector<FileId> get_story_content_file_ids(const Td *td, const StoryContent *content) {
|
||||
switch (content->get_type()) {
|
||||
case StoryContentType::Photo:
|
||||
|
@ -42,6 +42,8 @@ void merge_story_contents(Td *td, const StoryContent *old_content, StoryContent
|
||||
|
||||
td_api::object_ptr<td_api::StoryContent> get_story_content_object(Td *td, const StoryContent *content);
|
||||
|
||||
FileId get_story_content_any_file_id(const Td *td, const StoryContent *content);
|
||||
|
||||
vector<FileId> get_story_content_file_ids(const Td *td, const StoryContent *content);
|
||||
|
||||
int32 get_story_content_duration(const Td *td, const StoryContent *content);
|
||||
|
Loading…
Reference in New Issue
Block a user