Improve method names.

This commit is contained in:
levlam 2023-06-27 22:45:01 +03:00
parent 5e9d98abce
commit 5fd1d06948
4 changed files with 20 additions and 20 deletions

View File

@ -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

View File

@ -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) {

View File

@ -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);

View File

@ -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<td_api::toggleChatStoriesAreHidden>(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<td_api::getUserPinnedStories>(user_id, from_story_id, as_limit(limit)));
get_args(args, chat_id, from_story_id, limit);
send_request(td_api::make_object<td_api::getChatPinnedStories>(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<td_api::getArchivedStories>(from_story_id, as_limit(limit)));
} else if (op == "guas") {
UserId user_id;
get_args(args, user_id);
send_request(td_api::make_object<td_api::getUserActiveStories>(user_id));
} else if (op == "gcas") {
ChatId chat_id;
get_args(args, chat_id);
send_request(td_api::make_object<td_api::getChatActiveStories>(chat_id));
} else if (op == "os") {
ChatId story_sender_chat_id;
StoryId story_id;