From 1c40ce963ce1de9b779d75e623d0f680504b3d96 Mon Sep 17 00:00:00 2001 From: levlam Date: Tue, 13 Feb 2024 12:55:07 +0300 Subject: [PATCH] Reload chats to send stories after updating the list locally to restore correct order. --- td/telegram/StoryManager.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/td/telegram/StoryManager.cpp b/td/telegram/StoryManager.cpp index dbf6213f7..963f65025 100644 --- a/td/telegram/StoryManager.cpp +++ b/td/telegram/StoryManager.cpp @@ -4634,6 +4634,7 @@ void StoryManager::finish_get_dialogs_to_send_stories(Result &&result) { void StoryManager::update_dialogs_to_send_stories(ChannelId channel_id, bool can_send_stories) { if (channels_to_send_stories_inited_) { + CHECK(!td_->auth_manager_->is_bot()); bool was_changed = false; if (!can_send_stories) { was_changed = td::remove(channels_to_send_stories_, channel_id); @@ -4641,6 +4642,9 @@ void StoryManager::update_dialogs_to_send_stories(ChannelId channel_id, bool can if (!td::contains(channels_to_send_stories_, channel_id)) { channels_to_send_stories_.push_back(channel_id); was_changed = true; + + next_reload_channels_to_send_stories_time_ = Time::now(); + set_timeout_in(1.0); } } if (was_changed) {