Add StoryManager::have_story.
This commit is contained in:
parent
114c92f365
commit
f4a2dbde41
@ -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<td_api::story> StoryManager::get_story_object(StoryFullId story_full_id) const {
|
||||
return get_story_object(story_full_id, get_story(story_full_id));
|
||||
}
|
||||
|
@ -106,6 +106,8 @@ class StoryManager final : public Actor {
|
||||
std::pair<int32, vector<StoryId>> on_get_stories(DialogId owner_dialog_id,
|
||||
telegram_api::object_ptr<telegram_api::stories_stories> &&stories);
|
||||
|
||||
bool have_story(StoryFullId story_full_id) const;
|
||||
|
||||
td_api::object_ptr<td_api::story> get_story_object(StoryFullId story_full_id) const;
|
||||
|
||||
td_api::object_ptr<td_api::stories> get_stories_object(int32 total_count,
|
||||
|
Loading…
Reference in New Issue
Block a user