Improve method and field names.

This commit is contained in:
levlam 2023-06-23 19:00:34 +03:00
parent 2702d19dc4
commit b8bccde43c
4 changed files with 11 additions and 11 deletions

View File

@ -714,12 +714,12 @@ usernames active_usernames:vector<string> disabled_usernames:vector<string> edit
//@is_scam True, if many users reported this user as a scam
//@is_fake True, if many users reported this user as a fake account
//@has_active_stories True, if the user has non-expired stories available to the current user
//@stories_are_archived True, if stories of the user aren't available on the main chat list
//@stories_are_hidden True, if stories of the user aren't available on the main chat list
//@have_access If false, the user is inaccessible, and the only information known about the user is inside this class. Identifier of the user can't be passed to any method
//@type Type of the user
//@language_code IETF language tag of the user's language; only available to bots
//@added_to_attachment_menu True, if the user added the current bot to attachment menu; only available to bots
user id:int53 first_name:string last_name:string usernames:usernames phone_number:string status:UserStatus profile_photo:profilePhoto emoji_status:emojiStatus is_contact:Bool is_mutual_contact:Bool is_close_friend:Bool is_verified:Bool is_premium:Bool is_support:Bool restriction_reason:string is_scam:Bool is_fake:Bool has_active_stories:Bool stories_are_archived:Bool have_access:Bool type:UserType language_code:string added_to_attachment_menu:Bool = User;
user id:int53 first_name:string last_name:string usernames:usernames phone_number:string status:UserStatus profile_photo:profilePhoto emoji_status:emojiStatus is_contact:Bool is_mutual_contact:Bool is_close_friend:Bool is_verified:Bool is_premium:Bool is_support:Bool restriction_reason:string is_scam:Bool is_fake:Bool has_active_stories:Bool stories_are_hidden:Bool have_access:Bool type:UserType language_code:string added_to_attachment_menu:Bool = User;
//@description Contains information about a bot
@ -7258,8 +7258,8 @@ toggleStoryIsPinned story_id:int32 is_pinned:Bool = Ok;
//@description Deletes a previously sent story @story_id Identifier of the story to delete
deleteStory story_id:int32 = Ok;
//@description Toggles whether stories of the user are available on the main chat list @user_id Identifier of the user @are_archived Pass true to make the story unavailable on the main chat list; pass false to make them available
toggleUserStoriesAreArchived user_id:int53 are_archived:Bool = Ok;
//@description Toggles whether stories of the user are available on the main chat list @user_id Identifier of the user @are_hidden Pass true to make the story unavailable from the main chat list; pass false to make them available
toggleUserStoriesAreHidden user_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;

View File

@ -5660,10 +5660,10 @@ void Td::on_request(uint64 id, const td_api::deleteStory &request) {
story_manager_->delete_story(StoryId(request.story_id_), std::move(promise));
}
void Td::on_request(uint64 id, const td_api::toggleUserStoriesAreArchived &request) {
void Td::on_request(uint64 id, const td_api::toggleUserStoriesAreHidden &request) {
CHECK_IS_USER();
CREATE_OK_REQUEST_PROMISE();
story_manager_->toggle_dialog_stories_hidden(DialogId(UserId(request.user_id_)), request.are_archived_,
story_manager_->toggle_dialog_stories_hidden(DialogId(UserId(request.user_id_)), request.are_hidden_,
std::move(promise));
}

View File

@ -798,7 +798,7 @@ class Td final : public Actor {
void on_request(uint64 id, const td_api::deleteStory &request);
void on_request(uint64 id, const td_api::toggleUserStoriesAreArchived &request);
void on_request(uint64 id, const td_api::toggleUserStoriesAreHidden &request);
void on_request(uint64 id, const td_api::getForumTopicDefaultIcons &request);

View File

@ -4038,11 +4038,11 @@ class CliClient final : public Actor {
StoryId story_id;
get_args(args, story_id);
send_request(td_api::make_object<td_api::deleteStory>(story_id));
} else if (op == "tusaa") {
} else if (op == "tusah") {
UserId user_id;
bool are_archived;
get_args(args, user_id, are_archived);
send_request(td_api::make_object<td_api::toggleUserStoriesAreArchived>(user_id, are_archived));
bool are_hidden;
get_args(args, user_id, are_hidden);
send_request(td_api::make_object<td_api::toggleUserStoriesAreHidden>(user_id, are_hidden));
} else if (op == "gups") {
UserId user_id;
StoryId from_story_id;