diff options
| author | levlam <levlam@telegram.org> | 2025-10-24 14:06:16 +0300 |
|---|---|---|
| committer | levlam <levlam@telegram.org> | 2025-10-24 14:06:16 +0300 |
| commit | 9f6b6b6a777820f24c84d7009a1e1235883dcf4e (patch) | |
| tree | bb18e0fa27927bdc4221b31c14b28a70cd26634e /td/telegram/StoryContent.cpp | |
| parent | aabffc3648d7a13ed0ceff9f503e758dcc448544 (diff) | |
Check type of botMediaPreview.content.
Diffstat (limited to 'td/telegram/StoryContent.cpp')
| -rw-r--r-- | td/telegram/StoryContent.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/td/telegram/StoryContent.cpp b/td/telegram/StoryContent.cpp index 9ddf444e4..8a33de9af 100644 --- a/td/telegram/StoryContent.cpp +++ b/td/telegram/StoryContent.cpp @@ -223,7 +223,7 @@ void add_story_content_dependencies(Dependencies &dependencies, const StoryConte } unique_ptr<StoryContent> get_story_content(Td *td, tl_object_ptr<telegram_api::MessageMedia> &&media_ptr, - DialogId owner_dialog_id) { + DialogId owner_dialog_id, bool is_bot_preview) { CHECK(media_ptr != nullptr); switch (media_ptr->get_id()) { case telegram_api::messageMediaPhoto::ID: { @@ -285,6 +285,9 @@ unique_ptr<StoryContent> get_story_content(Td *td, tl_object_ptr<telegram_api::M return make_unique<StoryContentVideo>(parsed_document.file_id, alt_file_id); } case telegram_api::messageMediaVideoStream::ID: { + if (is_bot_preview) { + return nullptr; + } auto media = telegram_api::move_object_as<telegram_api::messageMediaVideoStream>(media_ptr); return make_unique<StoryContentLiveStream>(InputGroupCallId(media->call_), media->rtmp_stream_); } |
