From 00608a45a39d7e02f6f6546a2f4be570df0d17ec Mon Sep 17 00:00:00 2001 From: levlam Date: Fri, 7 Jul 2023 16:51:14 +0300 Subject: [PATCH] Return chat_id back to activeStories. --- td/generate/scheme/td_api.tl | 8 ++++---- td/telegram/StoryManager.cpp | 9 ++++----- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/td/generate/scheme/td_api.tl b/td/generate/scheme/td_api.tl index 9e24cec98..48204db71 100644 --- a/td/generate/scheme/td_api.tl +++ b/td/generate/scheme/td_api.tl @@ -4957,12 +4957,13 @@ stories total_count:int32 stories:vector = Stories; //@description Contains basic information about a story @story_id Unique story identifier among stories of the given sender @date Point in time (Unix timestamp) when the story was published storyInfo story_id:int32 date:int32 = StoryInfo; -//@description Describes active stories sent by the same sender +//@description Describes active stories posted by a chat +//@chat_id Identifier of the chat that posted the stories //@list Identifier of the story list in which the stories are shown; may be null if the stories aren't shown in a story list //@order A parameter used to determine order of the stories in the story list; 0 if the stories doesn't need to be shown in the story list. Stories must be sorted by the pair (order, story_sender_chat_id) in descending order //@max_read_story_id Identifier of the last read active story //@stories Basic information about the stories; use getStory to get full information about the stories. The stories are in a chronological order (i.e., in order of increasing story identifiers) -activeStories list:StoryList order:int53 max_read_story_id:int32 stories:vector = ActiveStories; +activeStories chat_id:int53 list:StoryList order:int53 max_read_story_id:int32 stories:vector = ActiveStories; //@description Contains a part of a file @data File bytes @@ -5727,9 +5728,8 @@ updateStory story:story = Update; updateStoryDeleted story_sender_chat_id:int53 story_id:int32 = Update; //@description The list of active stories posted by a specific chat has changed -//@chat_id Identifier of the chat that posted the stories //@active_stories The new list of active stories -updateChatActiveStories chat_id:int53 active_stories:activeStories = Update; +updateChatActiveStories active_stories:activeStories = Update; //@description An option changed its value @name The option name @value The new option value updateOption name:string value:OptionValue = Update; diff --git a/td/telegram/StoryManager.cpp b/td/telegram/StoryManager.cpp index 463fce585..8a0c0555b 100644 --- a/td/telegram/StoryManager.cpp +++ b/td/telegram/StoryManager.cpp @@ -1846,8 +1846,9 @@ td_api::object_ptr StoryManager::get_active_stories_objec order = active_stories->public_order_; } } - return td_api::make_object(std::move(list), order, max_read_story_id.get(), - std::move(stories)); + return td_api::make_object( + td_->messages_manager_->get_chat_id_object(owner_dialog_id, "updateChatActiveStories"), std::move(list), order, + max_read_story_id.get(), std::move(stories)); } vector StoryManager::get_story_file_ids(const Story *story) const { @@ -2423,9 +2424,7 @@ void StoryManager::delete_active_stories_from_story_list(DialogId owner_dialog_i td_api::object_ptr StoryManager::get_update_chat_active_stories( DialogId owner_dialog_id) const { - return td_api::make_object( - td_->messages_manager_->get_chat_id_object(owner_dialog_id, "updateChatActiveStories"), - get_active_stories_object(owner_dialog_id)); + return td_api::make_object(get_active_stories_object(owner_dialog_id)); } void StoryManager::send_update_chat_active_stories(DialogId owner_dialog_id) {