diff --git a/td/telegram/StoryManager.cpp b/td/telegram/StoryManager.cpp index b9bf80e1b..c965aa285 100644 --- a/td/telegram/StoryManager.cpp +++ b/td/telegram/StoryManager.cpp @@ -540,6 +540,10 @@ void StoryManager::on_get_dialog_expiring_stories(DialogId owner_dialog_id, }))); } +bool StoryManager::have_story(StoryFullId story_full_id) const { + return get_story(story_full_id) != nullptr; +} + td_api::object_ptr StoryManager::get_story_object(StoryFullId story_full_id) const { return get_story_object(story_full_id, get_story(story_full_id)); } diff --git a/td/telegram/StoryManager.h b/td/telegram/StoryManager.h index c1d20e30a..c2390278b 100644 --- a/td/telegram/StoryManager.h +++ b/td/telegram/StoryManager.h @@ -106,6 +106,8 @@ class StoryManager final : public Actor { std::pair> on_get_stories(DialogId owner_dialog_id, telegram_api::object_ptr &&stories); + bool have_story(StoryFullId story_full_id) const; + td_api::object_ptr get_story_object(StoryFullId story_full_id) const; td_api::object_ptr get_stories_object(int32 total_count,