diff --git a/td/generate/scheme/td_api.tl b/td/generate/scheme/td_api.tl index 421d216bb..39e9c1f74 100644 --- a/td/generate/scheme/td_api.tl +++ b/td/generate/scheme/td_api.tl @@ -7271,16 +7271,16 @@ deleteStory story_id:int32 = Ok; //@description Toggles whether stories posted by the chat are available on the main chat list @chat_id Identifier of the chat @are_hidden Pass true to make the story unavailable from the main chat list; pass false to make them available toggleChatStoriesAreHidden chat_id:int53 are_hidden:Bool = Ok; -//@description Returns the list of active stories of a given user. The stories are returned in a chronological order (i.e., in order of increasing story_id) @user_id User identifier -getUserActiveStories user_id:int53 = ActiveStories; +//@description Returns the list of active stories posted by the given chat. The stories are returned in a chronological order (i.e., in order of increasing story_id) @chat_id Chat identifier +getChatActiveStories chat_id:int53 = ActiveStories; -//@description Returns the list of pinned stories of a given user. The stories are returned in a reverse chronological order (i.e., in order of decreasing story_id). +//@description Returns the list of pinned stories posted by the given chat. The stories are returned in a reverse chronological order (i.e., in order of decreasing story_id). //-For optimal performance, the number of returned stories is chosen by TDLib -//@user_id User identifier +//@chat_id Chat identifier //@from_story_id Identifier of the story starting from which stories must be returned; use 0 to get results from the last story //@limit The maximum number of stories to be returned //-For optimal performance, the number of returned stories is chosen by TDLib and can be smaller than the specified limit -getUserPinnedStories user_id:int53 from_story_id:int32 limit:int32 = Stories; +getChatPinnedStories chat_id:int53 from_story_id:int32 limit:int32 = Stories; //@description Returns the list of all stories of the current user. The stories are returned in a reverse chronological order (i.e., in order of decreasing story_id). //-For optimal performance, the number of returned stories is chosen by TDLib diff --git a/td/telegram/Td.cpp b/td/telegram/Td.cpp index e25989d10..233c0a85b 100644 --- a/td/telegram/Td.cpp +++ b/td/telegram/Td.cpp @@ -6423,17 +6423,17 @@ void Td::on_request(uint64 id, const td_api::readChatList &request) { messages_manager_->read_all_dialogs_from_list(DialogListId(request.chat_list_), std::move(promise)); } -void Td::on_request(uint64 id, const td_api::getUserActiveStories &request) { +void Td::on_request(uint64 id, const td_api::getChatActiveStories &request) { CHECK_IS_USER(); CREATE_REQUEST_PROMISE(); - story_manager_->get_dialog_expiring_stories(DialogId(UserId(request.user_id_)), std::move(promise)); + story_manager_->get_dialog_expiring_stories(DialogId(request.chat_id_), std::move(promise)); } -void Td::on_request(uint64 id, const td_api::getUserPinnedStories &request) { +void Td::on_request(uint64 id, const td_api::getChatPinnedStories &request) { CHECK_IS_USER(); CREATE_REQUEST_PROMISE(); - story_manager_->get_dialog_pinned_stories(DialogId(UserId(request.user_id_)), StoryId(request.from_story_id_), - request.limit_, std::move(promise)); + story_manager_->get_dialog_pinned_stories(DialogId(request.chat_id_), StoryId(request.from_story_id_), request.limit_, + std::move(promise)); } void Td::on_request(uint64 id, const td_api::getArchivedStories &request) { diff --git a/td/telegram/Td.h b/td/telegram/Td.h index 26a32a40f..4e5dbc048 100644 --- a/td/telegram/Td.h +++ b/td/telegram/Td.h @@ -1000,9 +1000,9 @@ class Td final : public Actor { void on_request(uint64 id, const td_api::readChatList &request); - void on_request(uint64 id, const td_api::getUserActiveStories &request); + void on_request(uint64 id, const td_api::getChatActiveStories &request); - void on_request(uint64 id, const td_api::getUserPinnedStories &request); + void on_request(uint64 id, const td_api::getChatPinnedStories &request); void on_request(uint64 id, const td_api::getArchivedStories &request); diff --git a/td/telegram/cli.cpp b/td/telegram/cli.cpp index 1b922d801..44385b81c 100644 --- a/td/telegram/cli.cpp +++ b/td/telegram/cli.cpp @@ -4045,21 +4045,21 @@ class CliClient final : public Actor { bool are_hidden; get_args(args, chat_id, are_hidden); send_request(td_api::make_object(chat_id, are_hidden)); - } else if (op == "gups") { - UserId user_id; + } else if (op == "gcps") { + ChatId chat_id; StoryId from_story_id; string limit; - get_args(args, user_id, from_story_id, limit); - send_request(td_api::make_object(user_id, from_story_id, as_limit(limit))); + get_args(args, chat_id, from_story_id, limit); + send_request(td_api::make_object(chat_id, from_story_id, as_limit(limit))); } else if (op == "gast") { StoryId from_story_id; string limit; get_args(args, from_story_id, limit); send_request(td_api::make_object(from_story_id, as_limit(limit))); - } else if (op == "guas") { - UserId user_id; - get_args(args, user_id); - send_request(td_api::make_object(user_id)); + } else if (op == "gcas") { + ChatId chat_id; + get_args(args, chat_id); + send_request(td_api::make_object(chat_id)); } else if (op == "os") { ChatId story_sender_chat_id; StoryId story_id;