Return updateChatActiveStories in getCurrentState.

This commit is contained in:
levlam 2023-07-07 16:18:18 +03:00
parent 3afa9fb5f5
commit bf3f1c33ae
3 changed files with 12 additions and 0 deletions

View File

@ -3087,6 +3087,14 @@ void StoryManager::remove_story_notifications_by_story_ids(DialogId dialog_id, c
}
}
void StoryManager::get_current_state(vector<td_api::object_ptr<td_api::Update>> &updates) const {
if (!td_->auth_manager_->is_bot()) {
active_stories_.foreach([&](const DialogId &dialog_id, const unique_ptr<ActiveStories> &) {
updates.push_back(get_update_chat_active_stories(dialog_id));
});
}
}
void StoryManager::on_binlog_events(vector<BinlogEvent> &&events) {
if (G()->close_flag()) {
return;

View File

@ -225,6 +225,8 @@ class StoryManager final : public Actor {
void try_synchronize_archive_all_stories();
void get_current_state(vector<td_api::object_ptr<td_api::Update>> &updates) const;
void on_binlog_events(vector<BinlogEvent> &&events);
private:

View File

@ -4319,6 +4319,8 @@ void Td::on_request(uint64 id, const td_api::getCurrentState &request) {
notification_manager_->get_current_state(updates);
story_manager_->get_current_state(updates);
config_manager_.get_actor_unsafe()->get_current_state(updates);
autosave_manager_->get_current_state(updates);