diff --git a/td/generate/scheme/td_api.tl b/td/generate/scheme/td_api.tl index 94631f8fd..67b3c24af 100644 --- a/td/generate/scheme/td_api.tl +++ b/td/generate/scheme/td_api.tl @@ -440,13 +440,12 @@ chatPermissions can_send_messages:Bool can_send_media_messages:Bool can_send_pol //@class ChatMemberStatus @description Provides information about the status of a member in a chat //@description The user is the owner of a chat and has all the administrator privileges -//@is_anonymous True, if the creator isn't shown in the chat member list and sends messages anonymously //@custom_title A custom title of the owner; 0-16 characters without emojis; applicable to supergroups only +//@is_anonymous True, if the creator isn't shown in the chat member list and sends messages anonymously //@is_member True, if the user is a member of the chat -chatMemberStatusCreator is_anonymous:Bool custom_title:string is_member:Bool = ChatMemberStatus; +chatMemberStatusCreator custom_title:string is_anonymous:Bool is_member:Bool = ChatMemberStatus; //@description The user is a member of a chat and has some additional privileges. In basic groups, administrators can edit and delete messages sent by others, add new members, and ban unprivileged members. In supergroups and channels, there are more detailed options for administrator privileges -//@is_anonymous True, if the administrator isn't shown in the chat member list and sends messages anonymously //@custom_title A custom title of the administrator; 0-16 characters without emojis; applicable to supergroups only //@can_be_edited True, if the current user can edit the administrator privileges for the called user //@can_change_info True, if the administrator can change the chat title, photo, and other settings @@ -457,7 +456,8 @@ chatMemberStatusCreator is_anonymous:Bool custom_title:string is_member:Bool = C //@can_restrict_members True, if the administrator can restrict, ban, or unban chat members //@can_pin_messages True, if the administrator can pin messages; applicable to groups only //@can_promote_members True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that were directly or indirectly promoted by them -chatMemberStatusAdministrator is_anonymous:Bool custom_title:string can_be_edited:Bool can_change_info:Bool can_post_messages:Bool can_edit_messages:Bool can_delete_messages:Bool can_invite_users:Bool can_restrict_members:Bool can_pin_messages:Bool can_promote_members:Bool = ChatMemberStatus; +//@is_anonymous True, if the administrator isn't shown in the chat member list and sends messages anonymously +chatMemberStatusAdministrator custom_title:string can_be_edited:Bool can_change_info:Bool can_post_messages:Bool can_edit_messages:Bool can_delete_messages:Bool can_invite_users:Bool can_restrict_members:Bool can_pin_messages:Bool can_promote_members:Bool is_anonymous:Bool = ChatMemberStatus; //@description The user is a member of a chat, without any additional privileges or restrictions chatMemberStatusMember = ChatMemberStatus; diff --git a/td/generate/scheme/td_api.tlo b/td/generate/scheme/td_api.tlo index cb16f7c04..e8b44f148 100644 Binary files a/td/generate/scheme/td_api.tlo and b/td/generate/scheme/td_api.tlo differ diff --git a/td/telegram/DialogParticipant.cpp b/td/telegram/DialogParticipant.cpp index 9bc2d97ca..61a40606b 100644 --- a/td/telegram/DialogParticipant.cpp +++ b/td/telegram/DialogParticipant.cpp @@ -111,12 +111,12 @@ RestrictedRights DialogParticipantStatus::get_restricted_rights() const { tl_object_ptr DialogParticipantStatus::get_chat_member_status_object() const { switch (type_) { case Type::Creator: - return td_api::make_object(is_anonymous(), rank_, is_member()); + return td_api::make_object(rank_, is_anonymous(), is_member()); case Type::Administrator: return td_api::make_object( - is_anonymous(), rank_, can_be_edited(), can_change_info_and_settings(), can_post_messages(), - can_edit_messages(), can_delete_messages(), can_invite_users(), can_restrict_members(), can_pin_messages(), - can_promote_members()); + rank_, can_be_edited(), can_change_info_and_settings(), can_post_messages(), can_edit_messages(), + can_delete_messages(), can_invite_users(), can_restrict_members(), can_pin_messages(), can_promote_members(), + is_anonymous()); case Type::Member: return td_api::make_object(); case Type::Restricted: diff --git a/td/telegram/Td.cpp b/td/telegram/Td.cpp index 735494705..a287cd18c 100644 --- a/td/telegram/Td.cpp +++ b/td/telegram/Td.cpp @@ -6117,7 +6117,7 @@ void Td::on_request(uint64 id, const td_api::leaveChat &request) { } new_status = - td_api::make_object(status.is_anonymous(), status.get_rank(), false); + td_api::make_object(status.get_rank(), status.is_anonymous(), false); } } messages_manager_->set_dialog_participant_status(dialog_id, contacts_manager_->get_my_id(), std::move(new_status), diff --git a/td/telegram/cli.cpp b/td/telegram/cli.cpp index bea9f2f40..9cadf07e3 100644 --- a/td/telegram/cli.cpp +++ b/td/telegram/cli.cpp @@ -3756,25 +3756,28 @@ class CliClient final : public Actor { } else if (status_str == "banned") { status = td_api::make_object(std::numeric_limits::max()); } else if (status_str == "creator") { - status = td_api::make_object(false, "", true); + status = td_api::make_object("", false, true); } else if (status_str == "creatoranon") { - status = td_api::make_object(true, "", true); + status = td_api::make_object("", true, true); } else if (status_str == "uncreator") { - status = td_api::make_object(false, "", false); + status = td_api::make_object("", false, false); } else if (status_str == "anon") { - status = td_api::make_object(true, "anon", true, true, true, true, true, + status = td_api::make_object("anon", true, true, true, true, true, true, true, true, true, true); + } else if (status_str == "anonadmin") { + status = td_api::make_object("anon", false, false, false, false, false, + false, false, false, false, true); } else if (status_str == "admin") { - status = td_api::make_object(false, "", true, true, true, true, true, - true, true, true, true); + status = td_api::make_object("", true, true, true, true, true, true, + true, true, true, false); } else if (status_str == "adminq") { - status = td_api::make_object(false, "title", true, true, true, true, - true, true, true, true, true); + status = td_api::make_object("title", true, true, true, true, true, true, + true, true, true, false); } else if (status_str == "minadmin") { - status = td_api::make_object(false, "", true, true, false, false, false, + status = td_api::make_object("", true, true, false, false, false, false, false, false, false, false); } else if (status_str == "unadmin") { - status = td_api::make_object(false, "", true, false, false, false, false, + status = td_api::make_object("", true, false, false, false, false, false, false, false, false, false); } else if (status_str == "rest") { status = td_api::make_object(