Update layer to 133.

This commit is contained in:
levlam 2021-09-03 12:27:59 +03:00
parent 0b6d40b4b5
commit 41c391f140
54 changed files with 635 additions and 577 deletions

View File

@ -50,12 +50,12 @@ class MessagesDbBench final : public Benchmark {
void run(int n) final { void run(int n) final {
auto guard = scheduler_->get_main_guard(); auto guard = scheduler_->get_main_guard();
for (int i = 0; i < n; i += 20) { for (int i = 0; i < n; i += 20) {
auto dialog_id = DialogId{UserId{Random::fast(1, 100)}}; auto dialog_id = DialogId(UserId(static_cast<int64>(Random::fast(1, 100))));
auto message_id_raw = Random::fast(1, 100000); auto message_id_raw = Random::fast(1, 100000);
for (int j = 0; j < 20; j++) { for (int j = 0; j < 20; j++) {
auto message_id = MessageId{ServerMessageId{message_id_raw + j}}; auto message_id = MessageId{ServerMessageId{message_id_raw + j}};
auto unique_message_id = ServerMessageId{i + 1}; auto unique_message_id = ServerMessageId{i + 1};
auto sender_user_id = UserId{Random::fast(1, 1000)}; auto sender_user_id = UserId(static_cast<int64>(Random::fast(1, 1000)));
auto random_id = i + 1; auto random_id = i + 1;
auto ttl_expires_at = 0; auto ttl_expires_at = 0;
auto data = BufferSlice(Random::fast(100, 299)); auto data = BufferSlice(Random::fast(100, 299));

View File

@ -142,7 +142,7 @@ class TdExample {
std::map<std::uint64_t, std::function<void(Object)>> handlers_; std::map<std::uint64_t, std::function<void(Object)>> handlers_;
std::map<std::int32_t, td_api::object_ptr<td_api::user>> users_; std::map<std::int64_t, td_api::object_ptr<td_api::user>> users_;
std::map<std::int64_t, std::string> chat_title_; std::map<std::int64_t, std::string> chat_title_;
@ -174,7 +174,7 @@ class TdExample {
} }
} }
std::string get_user_name(std::int32_t user_id) const { std::string get_user_name(std::int64_t user_id) const {
auto it = users_.find(user_id); auto it = users_.find(user_id);
if (it == users_.end()) { if (it == users_.end()) {
return "unknown user"; return "unknown user";

View File

@ -37,18 +37,18 @@ public final class Example {
private static final Lock authorizationLock = new ReentrantLock(); private static final Lock authorizationLock = new ReentrantLock();
private static final Condition gotAuthorization = authorizationLock.newCondition(); private static final Condition gotAuthorization = authorizationLock.newCondition();
private static final ConcurrentMap<Integer, TdApi.User> users = new ConcurrentHashMap<Integer, TdApi.User>(); private static final ConcurrentMap<Long, TdApi.User> users = new ConcurrentHashMap<Long, TdApi.User>();
private static final ConcurrentMap<Integer, TdApi.BasicGroup> basicGroups = new ConcurrentHashMap<Integer, TdApi.BasicGroup>(); private static final ConcurrentMap<Long, TdApi.BasicGroup> basicGroups = new ConcurrentHashMap<Long, TdApi.BasicGroup>();
private static final ConcurrentMap<Integer, TdApi.Supergroup> supergroups = new ConcurrentHashMap<Integer, TdApi.Supergroup>(); private static final ConcurrentMap<Long, TdApi.Supergroup> supergroups = new ConcurrentHashMap<Long, TdApi.Supergroup>();
private static final ConcurrentMap<Integer, TdApi.SecretChat> secretChats = new ConcurrentHashMap<Integer, TdApi.SecretChat>(); private static final ConcurrentMap<Integer, TdApi.SecretChat> secretChats = new ConcurrentHashMap<Integer, TdApi.SecretChat>();
private static final ConcurrentMap<Long, TdApi.Chat> chats = new ConcurrentHashMap<Long, TdApi.Chat>(); private static final ConcurrentMap<Long, TdApi.Chat> chats = new ConcurrentHashMap<Long, TdApi.Chat>();
private static final NavigableSet<OrderedChat> mainChatList = new TreeSet<OrderedChat>(); private static final NavigableSet<OrderedChat> mainChatList = new TreeSet<OrderedChat>();
private static boolean haveFullMainChatList = false; private static boolean haveFullMainChatList = false;
private static final ConcurrentMap<Integer, TdApi.UserFullInfo> usersFullInfo = new ConcurrentHashMap<Integer, TdApi.UserFullInfo>(); private static final ConcurrentMap<Long, TdApi.UserFullInfo> usersFullInfo = new ConcurrentHashMap<Long, TdApi.UserFullInfo>();
private static final ConcurrentMap<Integer, TdApi.BasicGroupFullInfo> basicGroupsFullInfo = new ConcurrentHashMap<Integer, TdApi.BasicGroupFullInfo>(); private static final ConcurrentMap<Long, TdApi.BasicGroupFullInfo> basicGroupsFullInfo = new ConcurrentHashMap<Long, TdApi.BasicGroupFullInfo>();
private static final ConcurrentMap<Integer, TdApi.SupergroupFullInfo> supergroupsFullInfo = new ConcurrentHashMap<Integer, TdApi.SupergroupFullInfo>(); private static final ConcurrentMap<Long, TdApi.SupergroupFullInfo> supergroupsFullInfo = new ConcurrentHashMap<Long, TdApi.SupergroupFullInfo>();
private static final String newLine = System.getProperty("line.separator"); private static final String newLine = System.getProperty("line.separator");
private static final String commandsLine = "Enter command (gcs - GetChats, gc <chatId> - GetChat, me - GetMe, sm <chatId> <message> - SendMessage, lo - LogOut, q - Quit): "; private static final String commandsLine = "Enter command (gcs - GetChats, gc <chatId> - GetChat, me - GetMe, sm <chatId> <message> - SendMessage, lo - LogOut, q - Quit): ";

View File

@ -295,7 +295,7 @@ videoNote duration:int32 length:int32 minithumbnail:minithumbnail thumbnail:thum
voiceNote duration:int32 waveform:bytes mime_type:string voice:file = VoiceNote; voiceNote duration:int32 waveform:bytes mime_type:string voice:file = VoiceNote;
//@description Describes a user contact @phone_number Phone number of the user @first_name First name of the user; 1-255 characters in length @last_name Last name of the user @vcard Additional data about the user in a form of vCard; 0-2048 bytes in length @user_id Identifier of the user, if known; otherwise 0 //@description Describes a user contact @phone_number Phone number of the user @first_name First name of the user; 1-255 characters in length @last_name Last name of the user @vcard Additional data about the user in a form of vCard; 0-2048 bytes in length @user_id Identifier of the user, if known; otherwise 0
contact phone_number:string first_name:string last_name:string vcard:string user_id:int32 = Contact; contact phone_number:string first_name:string last_name:string vcard:string user_id:int53 = Contact;
//@description Describes a location on planet Earth @latitude Latitude of the location in degrees; as defined by the sender @longitude Longitude of the location, in degrees; as defined by the sender //@description Describes a location on planet Earth @latitude Latitude of the location in degrees; as defined by the sender @longitude Longitude of the location, in degrees; as defined by the sender
//@horizontal_accuracy The estimated horizontal accuracy of the location, in meters; as defined by the sender. 0 if unknown //@horizontal_accuracy The estimated horizontal accuracy of the location, in meters; as defined by the sender. 0 if unknown
@ -313,7 +313,7 @@ game id:int64 short_name:string title:string text:formattedText description:stri
//@total_voter_count Total number of voters, participating in the poll @recent_voter_user_ids User identifiers of recent voters, if the poll is non-anonymous //@total_voter_count Total number of voters, participating in the poll @recent_voter_user_ids User identifiers of recent voters, if the poll is non-anonymous
//@is_anonymous True, if the poll is anonymous @type Type of the poll //@is_anonymous True, if the poll is anonymous @type Type of the poll
//@open_period Amount of time the poll will be active after creation, in seconds @close_date Point in time (Unix timestamp) when the poll will be automatically closed @is_closed True, if the poll is closed //@open_period Amount of time the poll will be active after creation, in seconds @close_date Point in time (Unix timestamp) when the poll will be automatically closed @is_closed True, if the poll is closed
poll id:int64 question:string options:vector<pollOption> total_voter_count:int32 recent_voter_user_ids:vector<int32> is_anonymous:Bool type:PollType open_period:int32 close_date:int32 is_closed:Bool = Poll; poll id:int64 question:string options:vector<pollOption> total_voter_count:int32 recent_voter_user_ids:vector<int53> is_anonymous:Bool type:PollType open_period:int32 close_date:int32 is_closed:Bool = Poll;
//@description Describes a user profile photo @id Photo identifier; 0 for an empty photo. Can be used to find a photo in a list of user profile photos //@description Describes a user profile photo @id Photo identifier; 0 for an empty photo. Can be used to find a photo in a list of user profile photos
@ -352,7 +352,7 @@ userTypeUnknown = UserType;
botCommand command:string description:string = BotCommand; botCommand command:string description:string = BotCommand;
//@description Contains a list of bot commands @bot_user_id Bot's user identifier @commands List of bot commands //@description Contains a list of bot commands @bot_user_id Bot's user identifier @commands List of bot commands
botCommands bot_user_id:int32 commands:vector<botCommand> = BotCommands; botCommands bot_user_id:int53 commands:vector<botCommand> = BotCommands;
//@description Represents a location to which a chat is connected @location The location @address Location address; 1-64 characters, as defined by the chat owner //@description Represents a location to which a chat is connected @location The location @address Location address; 1-64 characters, as defined by the chat owner
@ -410,7 +410,7 @@ inputChatPhotoAnimation animation:InputFile main_frame_timestamp:double = InputC
//@have_access If false, the user is inaccessible, and the only information known about the user is inside this class. It can't be passed to any method except GetUser //@have_access If false, the user is inaccessible, and the only information known about the user is inside this class. It can't be passed to any method except GetUser
//@type Type of the user //@type Type of the user
//@language_code IETF language tag of the user's language; only available to bots //@language_code IETF language tag of the user's language; only available to bots
user id:int32 first_name:string last_name:string username:string phone_number:string status:UserStatus profile_photo:profilePhoto is_contact:Bool is_mutual_contact:Bool is_verified:Bool is_support:Bool restriction_reason:string is_scam:Bool is_fake:Bool have_access:Bool type:UserType language_code:string = User; user id:int53 first_name:string last_name:string username:string phone_number:string status:UserStatus profile_photo:profilePhoto is_contact:Bool is_mutual_contact:Bool is_verified:Bool is_support:Bool restriction_reason:string is_scam:Bool is_fake:Bool have_access:Bool type:UserType language_code:string = User;
//@description Contains full information about a user //@description Contains full information about a user
//@photo User profile photo; may be null //@photo User profile photo; may be null
@ -427,11 +427,11 @@ user id:int32 first_name:string last_name:string username:string phone_number:st
userFullInfo photo:chatPhoto is_blocked:Bool can_be_called:Bool supports_video_calls:Bool has_private_calls:Bool need_phone_number_privacy_exception:Bool bio:string share_text:string description:string group_in_common_count:int32 commands:vector<botCommand> = UserFullInfo; userFullInfo photo:chatPhoto is_blocked:Bool can_be_called:Bool supports_video_calls:Bool has_private_calls:Bool need_phone_number_privacy_exception:Bool bio:string share_text:string description:string group_in_common_count:int32 commands:vector<botCommand> = UserFullInfo;
//@description Represents a list of users @total_count Approximate total count of users found @user_ids A list of user identifiers //@description Represents a list of users @total_count Approximate total count of users found @user_ids A list of user identifiers
users total_count:int32 user_ids:vector<int32> = Users; users total_count:int32 user_ids:vector<int53> = Users;
//@description Contains information about a chat administrator @user_id User identifier of the administrator @custom_title Custom title of the administrator @is_owner True, if the user is the owner of the chat //@description Contains information about a chat administrator @user_id User identifier of the administrator @custom_title Custom title of the administrator @is_owner True, if the user is the owner of the chat
chatAdministrator user_id:int32 custom_title:string is_owner:Bool = ChatAdministrator; chatAdministrator user_id:int53 custom_title:string is_owner:Bool = ChatAdministrator;
//@description Represents a list of chat administrators @administrators A list of chat administrators //@description Represents a list of chat administrators @administrators A list of chat administrators
chatAdministrators administrators:vector<chatAdministrator> = ChatAdministrators; chatAdministrators administrators:vector<chatAdministrator> = ChatAdministrators;
@ -495,7 +495,7 @@ chatMemberStatusBanned banned_until_date:int32 = ChatMemberStatus;
//@inviter_user_id Identifier of a user that invited/promoted/banned this member in the chat; 0 if unknown //@inviter_user_id Identifier of a user that invited/promoted/banned this member in the chat; 0 if unknown
//@joined_chat_date Point in time (Unix timestamp) when the user joined the chat //@joined_chat_date Point in time (Unix timestamp) when the user joined the chat
//@status Status of the member in the chat //@status Status of the member in the chat
chatMember member_id:MessageSender inviter_user_id:int32 joined_chat_date:int32 status:ChatMemberStatus = ChatMember; chatMember member_id:MessageSender inviter_user_id:int53 joined_chat_date:int32 status:ChatMemberStatus = ChatMember;
//@description Contains a list of chat members @total_count Approximate total count of chat members found @members A list of chat members //@description Contains a list of chat members @total_count Approximate total count of chat members found @members A list of chat members
chatMembers total_count:int32 members:vector<chatMember> = ChatMembers; chatMembers total_count:int32 members:vector<chatMember> = ChatMembers;
@ -560,7 +560,7 @@ supergroupMembersFilterBots = SupergroupMembersFilter;
//@member_count Number of chat members, which joined the chat using the link //@member_count Number of chat members, which joined the chat using the link
//@is_primary True, if the link is primary. Primary invite link can't have expire date or usage limit. There is exactly one primary invite link for each administrator with can_invite_users right at a given time //@is_primary True, if the link is primary. Primary invite link can't have expire date or usage limit. There is exactly one primary invite link for each administrator with can_invite_users right at a given time
//@is_revoked True, if the link was revoked //@is_revoked True, if the link was revoked
chatInviteLink invite_link:string creator_user_id:int32 date:int32 edit_date:int32 expire_date:int32 member_limit:int32 member_count:int32 is_primary:Bool is_revoked:Bool = ChatInviteLink; chatInviteLink invite_link:string creator_user_id:int53 date:int32 edit_date:int32 expire_date:int32 member_limit:int32 member_count:int32 is_primary:Bool is_revoked:Bool = ChatInviteLink;
//@description Contains a list of chat invite links @total_count Approximate total count of chat invite links found @invite_links List of invite links //@description Contains a list of chat invite links @total_count Approximate total count of chat invite links found @invite_links List of invite links
chatInviteLinks total_count:int32 invite_links:vector<chatInviteLink> = ChatInviteLinks; chatInviteLinks total_count:int32 invite_links:vector<chatInviteLink> = ChatInviteLinks;
@ -569,13 +569,13 @@ chatInviteLinks total_count:int32 invite_links:vector<chatInviteLink> = ChatInvi
//@user_id Administrator's user identifier //@user_id Administrator's user identifier
//@invite_link_count Number of active invite links //@invite_link_count Number of active invite links
//@revoked_invite_link_count Number of revoked invite links //@revoked_invite_link_count Number of revoked invite links
chatInviteLinkCount user_id:int32 invite_link_count:int32 revoked_invite_link_count:int32 = ChatInviteLinkCount; chatInviteLinkCount user_id:int53 invite_link_count:int32 revoked_invite_link_count:int32 = ChatInviteLinkCount;
//@description Contains a list of chat invite link counts @invite_link_counts List of invite linkcounts //@description Contains a list of chat invite link counts @invite_link_counts List of invite linkcounts
chatInviteLinkCounts invite_link_counts:vector<chatInviteLinkCount> = ChatInviteLinkCounts; chatInviteLinkCounts invite_link_counts:vector<chatInviteLinkCount> = ChatInviteLinkCounts;
//@description Describes a chat member joined a chat by an invite link @user_id User identifier @joined_chat_date Point in time (Unix timestamp) when the user joined the chat //@description Describes a chat member joined a chat by an invite link @user_id User identifier @joined_chat_date Point in time (Unix timestamp) when the user joined the chat
chatInviteLinkMember user_id:int32 joined_chat_date:int32 = ChatInviteLinkMember; chatInviteLinkMember user_id:int53 joined_chat_date:int32 = ChatInviteLinkMember;
//@description Contains a list of chat members joined a chat by an invite link @total_count Approximate total count of chat members found @members List of chat members, joined a chat by an invite link //@description Contains a list of chat members joined a chat by an invite link @total_count Approximate total count of chat members found @members List of chat members, joined a chat by an invite link
chatInviteLinkMembers total_count:int32 members:vector<chatInviteLinkMember> = ChatInviteLinkMembers; chatInviteLinkMembers total_count:int32 members:vector<chatInviteLinkMember> = ChatInviteLinkMembers;
@ -589,7 +589,7 @@ chatInviteLinkMembers total_count:int32 members:vector<chatInviteLinkMember> = C
//@member_count Number of members in the chat //@member_count Number of members in the chat
//@member_user_ids User identifiers of some chat members that may be known to the current user //@member_user_ids User identifiers of some chat members that may be known to the current user
//@is_public True, if the chat is a public supergroup or channel, i.e. it has a username or it is a location-based supergroup //@is_public True, if the chat is a public supergroup or channel, i.e. it has a username or it is a location-based supergroup
chatInviteLinkInfo chat_id:int53 accessible_for:int32 type:ChatType title:string photo:chatPhotoInfo member_count:int32 member_user_ids:vector<int32> is_public:Bool = ChatInviteLinkInfo; chatInviteLinkInfo chat_id:int53 accessible_for:int32 type:ChatType title:string photo:chatPhotoInfo member_count:int32 member_user_ids:vector<int53> is_public:Bool = ChatInviteLinkInfo;
//@description Represents a basic group of 0-200 users (must be upgraded to a supergroup to accommodate more than 200 users) //@description Represents a basic group of 0-200 users (must be upgraded to a supergroup to accommodate more than 200 users)
@ -598,7 +598,7 @@ chatInviteLinkInfo chat_id:int53 accessible_for:int32 type:ChatType title:string
//@status Status of the current user in the group //@status Status of the current user in the group
//@is_active True, if the group is active //@is_active True, if the group is active
//@upgraded_to_supergroup_id Identifier of the supergroup to which this group was upgraded; 0 if none //@upgraded_to_supergroup_id Identifier of the supergroup to which this group was upgraded; 0 if none
basicGroup id:int32 member_count:int32 status:ChatMemberStatus is_active:Bool upgraded_to_supergroup_id:int32 = BasicGroup; basicGroup id:int53 member_count:int32 status:ChatMemberStatus is_active:Bool upgraded_to_supergroup_id:int53 = BasicGroup;
//@description Contains full information about a basic group //@description Contains full information about a basic group
//@photo Chat photo; may be null //@photo Chat photo; may be null
@ -607,7 +607,7 @@ basicGroup id:int32 member_count:int32 status:ChatMemberStatus is_active:Bool up
//@members Group members //@members Group members
//@invite_link Primary invite link for this group; may be null. For chat administrators with can_invite_users right only. Updated only after the basic group is opened //@invite_link Primary invite link for this group; may be null. For chat administrators with can_invite_users right only. Updated only after the basic group is opened
//@bot_commands List of commands of bots in the group //@bot_commands List of commands of bots in the group
basicGroupFullInfo photo:chatPhoto description:string creator_user_id:int32 members:vector<chatMember> invite_link:chatInviteLink bot_commands:vector<botCommands> = BasicGroupFullInfo; basicGroupFullInfo photo:chatPhoto description:string creator_user_id:int53 members:vector<chatMember> invite_link:chatInviteLink bot_commands:vector<botCommands> = BasicGroupFullInfo;
//@description Represents a supergroup or channel with zero or more members (subscribers in the case of channels). From the point of view of the system, a channel is a special kind of a supergroup: only administrators can post and see the list of members, and posts from all administrators use the name and photo of the channel instead of individual names and profile photos. Unlike supergroups, channels can have an unlimited number of subscribers //@description Represents a supergroup or channel with zero or more members (subscribers in the case of channels). From the point of view of the system, a channel is a special kind of a supergroup: only administrators can post and see the list of members, and posts from all administrators use the name and photo of the channel instead of individual names and profile photos. Unlike supergroups, channels can have an unlimited number of subscribers
@ -626,7 +626,7 @@ basicGroupFullInfo photo:chatPhoto description:string creator_user_id:int32 memb
//@restriction_reason If non-empty, contains a human-readable description of the reason why access to this supergroup or channel must be restricted //@restriction_reason If non-empty, contains a human-readable description of the reason why access to this supergroup or channel must be restricted
//@is_scam True, if many users reported this supergroup or channel as a scam //@is_scam True, if many users reported this supergroup or channel as a scam
//@is_fake True, if many users reported this supergroup or channel as a fake account //@is_fake True, if many users reported this supergroup or channel as a fake account
supergroup id:int32 username:string date:int32 status:ChatMemberStatus member_count:int32 has_linked_chat:Bool has_location:Bool sign_messages:Bool is_slow_mode_enabled:Bool is_channel:Bool is_broadcast_group:Bool is_verified:Bool restriction_reason:string is_scam:Bool is_fake:Bool = Supergroup; supergroup id:int53 username:string date:int32 status:ChatMemberStatus member_count:int32 has_linked_chat:Bool has_location:Bool sign_messages:Bool is_slow_mode_enabled:Bool is_channel:Bool is_broadcast_group:Bool is_verified:Bool restriction_reason:string is_scam:Bool is_fake:Bool = Supergroup;
//@description Contains full information about a supergroup or channel //@description Contains full information about a supergroup or channel
//@photo Chat photo; may be null //@photo Chat photo; may be null
@ -650,7 +650,7 @@ supergroup id:int32 username:string date:int32 status:ChatMemberStatus member_co
//@bot_commands List of commands of bots in the group //@bot_commands List of commands of bots in the group
//@upgraded_from_basic_group_id Identifier of the basic group from which supergroup was upgraded; 0 if none //@upgraded_from_basic_group_id Identifier of the basic group from which supergroup was upgraded; 0 if none
//@upgraded_from_max_message_id Identifier of the last message in the basic group from which supergroup was upgraded; 0 if none //@upgraded_from_max_message_id Identifier of the last message in the basic group from which supergroup was upgraded; 0 if none
supergroupFullInfo photo:chatPhoto description:string member_count:int32 administrator_count:int32 restricted_count:int32 banned_count:int32 linked_chat_id:int53 slow_mode_delay:int32 slow_mode_delay_expires_in:double can_get_members:Bool can_set_username:Bool can_set_sticker_set:Bool can_set_location:Bool can_get_statistics:Bool is_all_history_available:Bool sticker_set_id:int64 location:chatLocation invite_link:chatInviteLink bot_commands:vector<botCommands> upgraded_from_basic_group_id:int32 upgraded_from_max_message_id:int53 = SupergroupFullInfo; supergroupFullInfo photo:chatPhoto description:string member_count:int32 administrator_count:int32 restricted_count:int32 banned_count:int32 linked_chat_id:int53 slow_mode_delay:int32 slow_mode_delay_expires_in:double can_get_members:Bool can_set_username:Bool can_set_sticker_set:Bool can_set_location:Bool can_get_statistics:Bool is_all_history_available:Bool sticker_set_id:int64 location:chatLocation invite_link:chatInviteLink bot_commands:vector<botCommands> upgraded_from_basic_group_id:int53 upgraded_from_max_message_id:int53 = SupergroupFullInfo;
//@class SecretChatState @description Describes the current secret chat state //@class SecretChatState @description Describes the current secret chat state
@ -673,13 +673,13 @@ secretChatStateClosed = SecretChatState;
//@key_hash Hash of the currently used key for comparison with the hash of the chat partner's key. This is a string of 36 little-endian bytes, which must be split into groups of 2 bits, each denoting a pixel of one of 4 colors FFFFFF, D5E6F3, 2D5775, and 2F99C9. //@key_hash Hash of the currently used key for comparison with the hash of the chat partner's key. This is a string of 36 little-endian bytes, which must be split into groups of 2 bits, each denoting a pixel of one of 4 colors FFFFFF, D5E6F3, 2D5775, and 2F99C9.
//-The pixels must be used to make a 12x12 square image filled from left to right, top to bottom. Alternatively, the first 32 bytes of the hash can be converted to the hexadecimal format and printed as 32 2-digit hex numbers //-The pixels must be used to make a 12x12 square image filled from left to right, top to bottom. Alternatively, the first 32 bytes of the hash can be converted to the hexadecimal format and printed as 32 2-digit hex numbers
//@layer Secret chat layer; determines features supported by the chat partner's application. Nested text entities and underline and strikethrough entities are supported if the layer >= 101 //@layer Secret chat layer; determines features supported by the chat partner's application. Nested text entities and underline and strikethrough entities are supported if the layer >= 101
secretChat id:int32 user_id:int32 state:SecretChatState is_outbound:Bool key_hash:bytes layer:int32 = SecretChat; secretChat id:int32 user_id:int53 state:SecretChatState is_outbound:Bool key_hash:bytes layer:int32 = SecretChat;
//@class MessageSender @description Contains information about the sender of a message //@class MessageSender @description Contains information about the sender of a message
//@description The message was sent by a known user @user_id Identifier of the user that sent the message //@description The message was sent by a known user @user_id Identifier of the user that sent the message
messageSenderUser user_id:int32 = MessageSender; messageSenderUser user_id:int53 = MessageSender;
//@description The message was sent on behalf of a chat @chat_id Identifier of the chat that sent the message //@description The message was sent on behalf of a chat @chat_id Identifier of the chat that sent the message
messageSenderChat chat_id:int53 = MessageSender; messageSenderChat chat_id:int53 = MessageSender;
@ -692,7 +692,7 @@ messageSenders total_count:int32 senders:vector<MessageSender> = MessageSenders;
//@class MessageForwardOrigin @description Contains information about the origin of a forwarded message //@class MessageForwardOrigin @description Contains information about the origin of a forwarded message
//@description The message was originally sent by a known user @sender_user_id Identifier of the user that originally sent the message //@description The message was originally sent by a known user @sender_user_id Identifier of the user that originally sent the message
messageForwardOriginUser sender_user_id:int32 = MessageForwardOrigin; messageForwardOriginUser sender_user_id:int53 = MessageForwardOrigin;
//@description The message was originally sent by an anonymous chat administrator on behalf of the chat //@description The message was originally sent by an anonymous chat administrator on behalf of the chat
//@sender_chat_id Identifier of the chat that originally sent the message //@sender_chat_id Identifier of the chat that originally sent the message
@ -778,7 +778,7 @@ messageSendingStateFailed error_code:int32 error_message:string can_retry:Bool r
//@restriction_reason If non-empty, contains a human-readable description of the reason why access to this message must be restricted //@restriction_reason If non-empty, contains a human-readable description of the reason why access to this message must be restricted
//@content Content of the message //@content Content of the message
//@reply_markup Reply markup for the message; may be null //@reply_markup Reply markup for the message; may be null
message id:int53 sender:MessageSender chat_id:int53 sending_state:MessageSendingState scheduling_state:MessageSchedulingState is_outgoing:Bool is_pinned:Bool can_be_edited:Bool can_be_forwarded:Bool can_be_deleted_only_for_self:Bool can_be_deleted_for_all_users:Bool can_get_statistics:Bool can_get_message_thread:Bool can_get_media_timestamp_links:Bool has_timestamped_media:Bool is_channel_post:Bool contains_unread_mention:Bool date:int32 edit_date:int32 forward_info:messageForwardInfo interaction_info:messageInteractionInfo reply_in_chat_id:int53 reply_to_message_id:int53 message_thread_id:int53 ttl:int32 ttl_expires_in:double via_bot_user_id:int32 author_signature:string media_album_id:int64 restriction_reason:string content:MessageContent reply_markup:ReplyMarkup = Message; message id:int53 sender:MessageSender chat_id:int53 sending_state:MessageSendingState scheduling_state:MessageSchedulingState is_outgoing:Bool is_pinned:Bool can_be_edited:Bool can_be_forwarded:Bool can_be_deleted_only_for_self:Bool can_be_deleted_for_all_users:Bool can_get_statistics:Bool can_get_message_thread:Bool can_get_media_timestamp_links:Bool has_timestamped_media:Bool is_channel_post:Bool contains_unread_mention:Bool date:int32 edit_date:int32 forward_info:messageForwardInfo interaction_info:messageInteractionInfo reply_in_chat_id:int53 reply_to_message_id:int53 message_thread_id:int53 ttl:int32 ttl_expires_in:double via_bot_user_id:int53 author_signature:string media_album_id:int64 restriction_reason:string content:MessageContent reply_markup:ReplyMarkup = Message;
//@description Contains a list of messages @total_count Approximate total count of messages found @messages List of messages; messages may be null //@description Contains a list of messages @total_count Approximate total count of messages found @messages List of messages; messages may be null
messages total_count:int32 messages:vector<message> = Messages; messages total_count:int32 messages:vector<message> = Messages;
@ -834,16 +834,16 @@ draftMessage reply_to_message_id:int53 date:int32 input_message_text:InputMessag
//@class ChatType @description Describes the type of a chat //@class ChatType @description Describes the type of a chat
//@description An ordinary chat with a user @user_id User identifier //@description An ordinary chat with a user @user_id User identifier
chatTypePrivate user_id:int32 = ChatType; chatTypePrivate user_id:int53 = ChatType;
//@description A basic group (i.e., a chat with 0-200 other users) @basic_group_id Basic group identifier //@description A basic group (i.e., a chat with 0-200 other users) @basic_group_id Basic group identifier
chatTypeBasicGroup basic_group_id:int32 = ChatType; chatTypeBasicGroup basic_group_id:int53 = ChatType;
//@description A supergroup (i.e. a chat with up to GetOption("supergroup_max_size") other users), or channel (with unlimited members) @supergroup_id Supergroup or channel identifier @is_channel True, if the supergroup is a channel //@description A supergroup (i.e. a chat with up to GetOption("supergroup_max_size") other users), or channel (with unlimited members) @supergroup_id Supergroup or channel identifier @is_channel True, if the supergroup is a channel
chatTypeSupergroup supergroup_id:int32 is_channel:Bool = ChatType; chatTypeSupergroup supergroup_id:int53 is_channel:Bool = ChatType;
//@description A secret chat with a user @secret_chat_id Secret chat identifier @user_id User identifier of the secret chat peer //@description A secret chat with a user @secret_chat_id Secret chat identifier @user_id User identifier of the secret chat peer
chatTypeSecret secret_chat_id:int32 user_id:int32 = ChatType; chatTypeSecret secret_chat_id:int32 user_id:int53 = ChatType;
//@description Represents a filter of user chats //@description Represents a filter of user chats
@ -1013,7 +1013,7 @@ keyboardButton text:string type:KeyboardButtonType = KeyboardButton;
inlineKeyboardButtonTypeUrl url:string = InlineKeyboardButtonType; inlineKeyboardButtonTypeUrl url:string = InlineKeyboardButtonType;
//@description A button that opens a specified URL and automatically authorize the current user if allowed to do so @url An HTTP URL to open @id Unique button identifier @forward_text If non-empty, new text of the button in forwarded messages //@description A button that opens a specified URL and automatically authorize the current user if allowed to do so @url An HTTP URL to open @id Unique button identifier @forward_text If non-empty, new text of the button in forwarded messages
inlineKeyboardButtonTypeLoginUrl url:string id:int32 forward_text:string = InlineKeyboardButtonType; inlineKeyboardButtonTypeLoginUrl url:string id:int53 forward_text:string = InlineKeyboardButtonType;
//@description A button that sends a callback query to a bot @data Data to be sent to the bot via a callback query //@description A button that sends a callback query to a bot @data Data to be sent to the bot via a callback query
inlineKeyboardButtonTypeCallback data:bytes = InlineKeyboardButtonType; inlineKeyboardButtonTypeCallback data:bytes = InlineKeyboardButtonType;
@ -1066,7 +1066,7 @@ loginUrlInfoOpen url:string skip_confirm:Bool = LoginUrlInfo;
//@description An authorization confirmation dialog needs to be shown to the user @url An HTTP URL to be opened @domain A domain of the URL //@description An authorization confirmation dialog needs to be shown to the user @url An HTTP URL to be opened @domain A domain of the URL
//@bot_user_id User identifier of a bot linked with the website @request_write_access True, if the user needs to be requested to give the permission to the bot to send them messages //@bot_user_id User identifier of a bot linked with the website @request_write_access True, if the user needs to be requested to give the permission to the bot to send them messages
loginUrlInfoRequestConfirmation url:string domain:string bot_user_id:int32 request_write_access:Bool = LoginUrlInfo; loginUrlInfoRequestConfirmation url:string domain:string bot_user_id:int53 request_write_access:Bool = LoginUrlInfo;
//@description Contains information about a message thread //@description Contains information about a message thread
@ -1386,7 +1386,7 @@ paymentFormTheme background_color:int32 text_color:int32 hint_color:int32 link_c
//@saved_credentials Contains information about saved card credentials; may be null //@saved_credentials Contains information about saved card credentials; may be null
//@can_save_credentials True, if the user can choose to save credentials //@can_save_credentials True, if the user can choose to save credentials
//@need_password True, if the user will be able to save credentials protected by a password they set up //@need_password True, if the user will be able to save credentials protected by a password they set up
paymentForm id:int64 invoice:invoice url:string seller_bot_user_id:int32 payments_provider_user_id:int32 payments_provider:paymentsProviderStripe saved_order_info:orderInfo saved_credentials:savedCredentials can_save_credentials:Bool need_password:Bool = PaymentForm; paymentForm id:int64 invoice:invoice url:string seller_bot_user_id:int53 payments_provider_user_id:int53 payments_provider:paymentsProviderStripe saved_order_info:orderInfo saved_credentials:savedCredentials can_save_credentials:Bool need_password:Bool = PaymentForm;
//@description Contains a temporary identifier of validated order information, which is stored for one hour. Also contains the available shipping options @order_info_id Temporary identifier of the order information @shipping_options Available shipping options //@description Contains a temporary identifier of validated order information, which is stored for one hour. Also contains the available shipping options @order_info_id Temporary identifier of the order information @shipping_options Available shipping options
validatedOrderInfo order_info_id:string shipping_options:vector<shippingOption> = ValidatedOrderInfo; validatedOrderInfo order_info_id:string shipping_options:vector<shippingOption> = ValidatedOrderInfo;
@ -1406,7 +1406,7 @@ paymentResult success:Bool verification_url:string = PaymentResult;
//@shipping_option Chosen shipping option; may be null //@shipping_option Chosen shipping option; may be null
//@credentials_title Title of the saved credentials chosen by the buyer //@credentials_title Title of the saved credentials chosen by the buyer
//@tip_amount The amount of tip chosen by the buyer in the smallest units of the currency //@tip_amount The amount of tip chosen by the buyer in the smallest units of the currency
paymentReceipt title:string description:string photo:photo date:int32 seller_bot_user_id:int32 payments_provider_user_id:int32 invoice:invoice order_info:orderInfo shipping_option:shippingOption credentials_title:string tip_amount:int53 = PaymentReceipt; paymentReceipt title:string description:string photo:photo date:int32 seller_bot_user_id:int53 payments_provider_user_id:int53 invoice:invoice order_info:orderInfo shipping_option:shippingOption credentials_title:string tip_amount:int53 = PaymentReceipt;
//@description File with the date it was uploaded @file The file @date Point in time (Unix timestamp) when the file was uploaded //@description File with the date it was uploaded @file The file @date Point in time (Unix timestamp) when the file was uploaded
@ -1738,10 +1738,10 @@ messageVoiceChatStarted group_call_id:int32 = MessageContent;
messageVoiceChatEnded duration:int32 = MessageContent; messageVoiceChatEnded duration:int32 = MessageContent;
//@description A message with information about an invite to a voice chat @group_call_id Identifier of the voice chat. The voice chat can be received through the method getGroupCall @user_ids Invited user identifiers //@description A message with information about an invite to a voice chat @group_call_id Identifier of the voice chat. The voice chat can be received through the method getGroupCall @user_ids Invited user identifiers
messageInviteVoiceChatParticipants group_call_id:int32 user_ids:vector<int32> = MessageContent; messageInviteVoiceChatParticipants group_call_id:int32 user_ids:vector<int53> = MessageContent;
//@description A newly created basic group @title Title of the basic group @member_user_ids User identifiers of members in the basic group //@description A newly created basic group @title Title of the basic group @member_user_ids User identifiers of members in the basic group
messageBasicGroupChatCreate title:string member_user_ids:vector<int32> = MessageContent; messageBasicGroupChatCreate title:string member_user_ids:vector<int53> = MessageContent;
//@description A newly created supergroup or channel @title Title of the supergroup or channel //@description A newly created supergroup or channel @title Title of the supergroup or channel
messageSupergroupChatCreate title:string = MessageContent; messageSupergroupChatCreate title:string = MessageContent;
@ -1756,19 +1756,19 @@ messageChatChangePhoto photo:chatPhoto = MessageContent;
messageChatDeletePhoto = MessageContent; messageChatDeletePhoto = MessageContent;
//@description New chat members were added @member_user_ids User identifiers of the new members //@description New chat members were added @member_user_ids User identifiers of the new members
messageChatAddMembers member_user_ids:vector<int32> = MessageContent; messageChatAddMembers member_user_ids:vector<int53> = MessageContent;
//@description A new member joined the chat by invite link //@description A new member joined the chat by invite link
messageChatJoinByLink = MessageContent; messageChatJoinByLink = MessageContent;
//@description A chat member was deleted @user_id User identifier of the deleted chat member //@description A chat member was deleted @user_id User identifier of the deleted chat member
messageChatDeleteMember user_id:int32 = MessageContent; messageChatDeleteMember user_id:int53 = MessageContent;
//@description A basic group was upgraded to a supergroup and was deactivated as the result @supergroup_id Identifier of the supergroup to which the basic group was upgraded //@description A basic group was upgraded to a supergroup and was deactivated as the result @supergroup_id Identifier of the supergroup to which the basic group was upgraded
messageChatUpgradeTo supergroup_id:int32 = MessageContent; messageChatUpgradeTo supergroup_id:int53 = MessageContent;
//@description A supergroup has been created from a basic group @title Title of the newly created supergroup @basic_group_id The identifier of the original basic group //@description A supergroup has been created from a basic group @title Title of the newly created supergroup @basic_group_id The identifier of the original basic group
messageChatUpgradeFrom title:string basic_group_id:int32 = MessageContent; messageChatUpgradeFrom title:string basic_group_id:int53 = MessageContent;
//@description A message has been pinned @message_id Identifier of the pinned message, can be an identifier of a deleted message or 0 //@description A message has been pinned @message_id Identifier of the pinned message, can be an identifier of a deleted message or 0
messagePinMessage message_id:int53 = MessageContent; messagePinMessage message_id:int53 = MessageContent;
@ -1866,7 +1866,7 @@ textEntityTypePreCode language:string = TextEntityType;
textEntityTypeTextUrl url:string = TextEntityType; textEntityTypeTextUrl url:string = TextEntityType;
//@description A text shows instead of a raw mention of the user (e.g., when the user has no username) @user_id Identifier of the mentioned user //@description A text shows instead of a raw mention of the user (e.g., when the user has no username) @user_id Identifier of the mentioned user
textEntityTypeMentionName user_id:int32 = TextEntityType; textEntityTypeMentionName user_id:int53 = TextEntityType;
//@description A media timestamp @media_timestamp Timestamp from which a video/audio/video note/voice note playing should start, in seconds. The media can be in the content or the web page preview of the current message, or in the same places in the replied message //@description A media timestamp @media_timestamp Timestamp from which a video/audio/video note/voice note playing should start, in seconds. The media can be in the content or the web page preview of the current message, or in the same places in the replied message
textEntityTypeMediaTimestamp media_timestamp:int32 = TextEntityType; textEntityTypeMediaTimestamp media_timestamp:int32 = TextEntityType;
@ -1949,7 +1949,7 @@ inputMessageContact contact:contact = InputMessageContent;
inputMessageDice emoji:string clear_draft:Bool = InputMessageContent; inputMessageDice emoji:string clear_draft:Bool = InputMessageContent;
//@description A message with a game; not supported for channels or secret chats @bot_user_id User identifier of the bot that owns the game @game_short_name Short name of the game //@description A message with a game; not supported for channels or secret chats @bot_user_id User identifier of the bot that owns the game @game_short_name Short name of the game
inputMessageGame bot_user_id:int32 game_short_name:string = InputMessageContent; inputMessageGame bot_user_id:int53 game_short_name:string = InputMessageContent;
//@description A message with an invoice; can be used only by bots @invoice Invoice @title Product title; 1-32 characters @param_description Product description; 0-255 characters //@description A message with an invoice; can be used only by bots @invoice Invoice @title Product title; 1-32 characters @param_description Product description; 0-255 characters
//@photo_url Product photo URL; optional @photo_size Product photo size @photo_width Product photo width @photo_height Product photo height //@photo_url Product photo URL; optional @photo_size Product photo size @photo_width Product photo width @photo_height Product photo height
@ -2284,7 +2284,7 @@ callProblemPixelatedVideo = CallProblem;
//@description Describes a call @id Call identifier, not persistent @user_id Peer user identifier @is_outgoing True, if the call is outgoing @is_video True, if the call is a video call @state Call state //@description Describes a call @id Call identifier, not persistent @user_id Peer user identifier @is_outgoing True, if the call is outgoing @is_video True, if the call is a video call @state Call state
call id:int32 user_id:int32 is_outgoing:Bool is_video:Bool state:CallState = Call; call id:int32 user_id:int53 is_outgoing:Bool is_video:Bool state:CallState = Call;
//@description Contains settings for the authentication of the user's phone number //@description Contains settings for the authentication of the user's phone number
@ -2314,7 +2314,7 @@ diceStickersSlotMachine background:sticker lever:sticker left_reel:sticker cente
//@description Represents the result of an ImportContacts request @user_ids User identifiers of the imported contacts in the same order as they were specified in the request; 0 if the contact is not yet a registered user //@description Represents the result of an ImportContacts request @user_ids User identifiers of the imported contacts in the same order as they were specified in the request; 0 if the contact is not yet a registered user
//@importer_count The number of users that imported the corresponding contact; 0 for already registered users or if unavailable //@importer_count The number of users that imported the corresponding contact; 0 for already registered users or if unavailable
importedContacts user_ids:vector<int32> importer_count:vector<int32> = ImportedContacts; importedContacts user_ids:vector<int53> importer_count:vector<int32> = ImportedContacts;
//@description Contains an HTTP URL @url The URL //@description Contains an HTTP URL @url The URL
@ -2462,7 +2462,7 @@ customRequestResult result:string = CustomRequestResult;
//@description Contains one row of the game high score table @position Position in the high score table @user_id User identifier @score User score //@description Contains one row of the game high score table @position Position in the high score table @user_id User identifier @score User score
gameHighScore position:int32 user_id:int32 score:int32 = GameHighScore; gameHighScore position:int32 user_id:int53 score:int32 = GameHighScore;
//@description Contains a list of game high scores @scores A list of game high scores //@description Contains a list of game high scores @scores A list of game high scores
gameHighScores scores:vector<gameHighScore> = GameHighScores; gameHighScores scores:vector<gameHighScore> = GameHighScores;
@ -2495,10 +2495,10 @@ chatEventMemberJoinedByInviteLink invite_link:chatInviteLink = ChatEventAction;
chatEventMemberLeft = ChatEventAction; chatEventMemberLeft = ChatEventAction;
//@description A new chat member was invited @user_id New member user identifier @status New member status //@description A new chat member was invited @user_id New member user identifier @status New member status
chatEventMemberInvited user_id:int32 status:ChatMemberStatus = ChatEventAction; chatEventMemberInvited user_id:int53 status:ChatMemberStatus = ChatEventAction;
//@description A chat member has gained/lost administrator status, or the list of their administrator privileges has changed @user_id Affected chat member user identifier @old_status Previous status of the chat member @new_status New status of the chat member //@description A chat member has gained/lost administrator status, or the list of their administrator privileges has changed @user_id Affected chat member user identifier @old_status Previous status of the chat member @new_status New status of the chat member
chatEventMemberPromoted user_id:int32 old_status:ChatMemberStatus new_status:ChatMemberStatus = ChatEventAction; chatEventMemberPromoted user_id:int53 old_status:ChatMemberStatus new_status:ChatMemberStatus = ChatEventAction;
//@description A chat member was restricted/unrestricted or banned/unbanned, or the list of their restrictions has changed @member_id Affected chat member identifier @old_status Previous status of the chat member @new_status New status of the chat member //@description A chat member was restricted/unrestricted or banned/unbanned, or the list of their restrictions has changed @member_id Affected chat member identifier @old_status Previous status of the chat member @new_status New status of the chat member
chatEventMemberRestricted member_id:MessageSender old_status:ChatMemberStatus new_status:ChatMemberStatus = ChatEventAction; chatEventMemberRestricted member_id:MessageSender old_status:ChatMemberStatus new_status:ChatMemberStatus = ChatEventAction;
@ -2518,9 +2518,6 @@ chatEventUsernameChanged old_username:string new_username:string = ChatEventActi
//@description The chat photo was changed @old_photo Previous chat photo value; may be null @new_photo New chat photo value; may be null //@description The chat photo was changed @old_photo Previous chat photo value; may be null @new_photo New chat photo value; may be null
chatEventPhotoChanged old_photo:chatPhoto new_photo:chatPhoto = ChatEventAction; chatEventPhotoChanged old_photo:chatPhoto new_photo:chatPhoto = ChatEventAction;
//@description The chat theme was changed. This event shouldn't be received until chat themes would be supported in supergroups @old_theme_name Previous chat theme name; empty if the previous theme was default one @new_theme_name New chat theme name; empty if the new theme is default one
chatEventThemeChanged old_theme_name:string new_theme_name:string = ChatEventAction;
//@description The can_invite_users permission of a supergroup chat was toggled @can_invite_users New value of can_invite_users permission //@description The can_invite_users permission of a supergroup chat was toggled @can_invite_users New value of can_invite_users permission
chatEventInvitesToggled can_invite_users:Bool = ChatEventAction; chatEventInvitesToggled can_invite_users:Bool = ChatEventAction;
@ -2570,7 +2567,7 @@ chatEventVoiceChatParticipantVolumeLevelChanged participant_id:MessageSender vol
chatEventVoiceChatMuteNewParticipantsToggled mute_new_participants:Bool = ChatEventAction; chatEventVoiceChatMuteNewParticipantsToggled mute_new_participants:Bool = ChatEventAction;
//@description Represents a chat event @id Chat event identifier @date Point in time (Unix timestamp) when the event happened @user_id Identifier of the user who performed the action that triggered the event @action Action performed by the user //@description Represents a chat event @id Chat event identifier @date Point in time (Unix timestamp) when the event happened @user_id Identifier of the user who performed the action that triggered the event @action Action performed by the user
chatEvent id:int64 date:int32 user_id:int32 action:ChatEventAction = ChatEvent; chatEvent id:int64 date:int32 user_id:int53 action:ChatEventAction = ChatEvent;
//@description Contains a list of chat events @events List of events //@description Contains a list of chat events @events List of events
chatEvents events:vector<chatEvent> = ChatEvents; chatEvents events:vector<chatEvent> = ChatEvents;
@ -2988,7 +2985,7 @@ userPrivacySettingRuleAllowAll = UserPrivacySettingRule;
userPrivacySettingRuleAllowContacts = UserPrivacySettingRule; userPrivacySettingRuleAllowContacts = UserPrivacySettingRule;
//@description A rule to allow certain specified users to do something @user_ids The user identifiers, total number of users in all rules must not exceed 1000 //@description A rule to allow certain specified users to do something @user_ids The user identifiers, total number of users in all rules must not exceed 1000
userPrivacySettingRuleAllowUsers user_ids:vector<int32> = UserPrivacySettingRule; userPrivacySettingRuleAllowUsers user_ids:vector<int53> = UserPrivacySettingRule;
//@description A rule to allow all members of certain specified basic groups and supergroups to doing something @chat_ids The chat identifiers, total number of chats in all rules must not exceed 20 //@description A rule to allow all members of certain specified basic groups and supergroups to doing something @chat_ids The chat identifiers, total number of chats in all rules must not exceed 20
userPrivacySettingRuleAllowChatMembers chat_ids:vector<int53> = UserPrivacySettingRule; userPrivacySettingRuleAllowChatMembers chat_ids:vector<int53> = UserPrivacySettingRule;
@ -3000,7 +2997,7 @@ userPrivacySettingRuleRestrictAll = UserPrivacySettingRule;
userPrivacySettingRuleRestrictContacts = UserPrivacySettingRule; userPrivacySettingRuleRestrictContacts = UserPrivacySettingRule;
//@description A rule to restrict all specified users from doing something @user_ids The user identifiers, total number of users in all rules must not exceed 1000 //@description A rule to restrict all specified users from doing something @user_ids The user identifiers, total number of users in all rules must not exceed 1000
userPrivacySettingRuleRestrictUsers user_ids:vector<int32> = UserPrivacySettingRule; userPrivacySettingRuleRestrictUsers user_ids:vector<int53> = UserPrivacySettingRule;
//@description A rule to restrict all members of specified basic groups and supergroups from doing something @chat_ids The chat identifiers, total number of chats in all rules must not exceed 20 //@description A rule to restrict all members of specified basic groups and supergroups from doing something @chat_ids The chat identifiers, total number of chats in all rules must not exceed 20
userPrivacySettingRuleRestrictChatMembers chat_ids:vector<int53> = UserPrivacySettingRule; userPrivacySettingRuleRestrictChatMembers chat_ids:vector<int53> = UserPrivacySettingRule;
@ -3064,7 +3061,7 @@ sessions sessions:vector<session> = Sessions;
//@last_active_date Point in time (Unix timestamp) when obtained authorization was last used //@last_active_date Point in time (Unix timestamp) when obtained authorization was last used
//@ip IP address from which the user was logged in, in human-readable format //@ip IP address from which the user was logged in, in human-readable format
//@location Human-readable description of a country and a region, from which the user was logged in, based on the IP address //@location Human-readable description of a country and a region, from which the user was logged in, based on the IP address
connectedWebsite id:int64 domain_name:string bot_user_id:int32 browser:string platform:string log_in_date:int32 last_active_date:int32 ip:string location:string = ConnectedWebsite; connectedWebsite id:int64 domain_name:string bot_user_id:int53 browser:string platform:string log_in_date:int32 last_active_date:int32 ip:string location:string = ConnectedWebsite;
//@description Contains a list of websites the current user is logged in with Telegram @websites List of connected websites //@description Contains a list of websites the current user is logged in with Telegram @websites List of connected websites
connectedWebsites websites:vector<connectedWebsite> = ConnectedWebsites; connectedWebsites websites:vector<connectedWebsite> = ConnectedWebsites;
@ -3144,7 +3141,7 @@ internalLinkTypeMessageDraft text:formattedText contains_link:Bool = InternalLin
//@description The link contains a request of Telegram passport data. Call getPassportAuthorizationForm with the given parameters to process the link if the link was received from outside of the app, otherwise ignore it //@description The link contains a request of Telegram passport data. Call getPassportAuthorizationForm with the given parameters to process the link if the link was received from outside of the app, otherwise ignore it
//@bot_user_id User identifier of the service's bot @scope Telegram Passport element types requested by the service @public_key Service's public key @nonce Unique request identifier provided by the service //@bot_user_id User identifier of the service's bot @scope Telegram Passport element types requested by the service @public_key Service's public key @nonce Unique request identifier provided by the service
//@callback_url An HTTP URL to open once the request is finished or canceled with the parameter tg_passport=success or tg_passport=cancel respectively. If empty, then the link tgbot{bot_user_id}://passport/success or tgbot{bot_user_id}://passport/cancel needs to be opened instead //@callback_url An HTTP URL to open once the request is finished or canceled with the parameter tg_passport=success or tg_passport=cancel respectively. If empty, then the link tgbot{bot_user_id}://passport/success or tgbot{bot_user_id}://passport/cancel needs to be opened instead
internalLinkTypePassportDataRequest bot_user_id:int32 scope:string public_key:string nonce:string callback_url:string = InternalLinkType; internalLinkTypePassportDataRequest bot_user_id:int53 scope:string public_key:string nonce:string callback_url:string = InternalLinkType;
//@description The link can be used to confirm ownership of a phone number to prevent account deletion. Call sendPhoneNumberConfirmationCode with the given hash and phone number to process the link //@description The link can be used to confirm ownership of a phone number to prevent account deletion. Call sendPhoneNumberConfirmationCode with the given hash and phone number to process the link
//@hash Hash value from the link @phone_number Phone number value from the link //@hash Hash value from the link @phone_number Phone number value from the link
@ -3363,7 +3360,7 @@ topChatCategoryForwardChats = TopChatCategory;
//@class TMeUrlType @description Describes the type of a URL linking to an internal Telegram entity //@class TMeUrlType @description Describes the type of a URL linking to an internal Telegram entity
//@description A URL linking to a user @user_id Identifier of the user //@description A URL linking to a user @user_id Identifier of the user
tMeUrlTypeUser user_id:int32 = TMeUrlType; tMeUrlTypeUser user_id:int53 = TMeUrlType;
//@description A URL linking to a public supergroup or channel @supergroup_id Identifier of the supergroup or channel //@description A URL linking to a public supergroup or channel @supergroup_id Identifier of the supergroup or channel
tMeUrlTypeSupergroup supergroup_id:int53 = TMeUrlType; tMeUrlTypeSupergroup supergroup_id:int53 = TMeUrlType;
@ -3396,7 +3393,7 @@ suggestedActionCheckPhoneNumber = SuggestedAction;
suggestedActionSeeTicksHint = SuggestedAction; suggestedActionSeeTicksHint = SuggestedAction;
//@description Suggests the user to convert specified supergroup to a broadcast group @supergroup_id Supergroup identifier //@description Suggests the user to convert specified supergroup to a broadcast group @supergroup_id Supergroup identifier
suggestedActionConvertToBroadcastGroup supergroup_id:int32 = SuggestedAction; suggestedActionConvertToBroadcastGroup supergroup_id:int53 = SuggestedAction;
//@description Contains a counter @count Count //@description Contains a counter @count Count
@ -3486,19 +3483,19 @@ chatStatisticsMessageInteractionInfo message_id:int53 view_count:int32 forward_c
//@user_id User identifier //@user_id User identifier
//@sent_message_count Number of sent messages //@sent_message_count Number of sent messages
//@average_character_count Average number of characters in sent messages; 0 if unknown //@average_character_count Average number of characters in sent messages; 0 if unknown
chatStatisticsMessageSenderInfo user_id:int32 sent_message_count:int32 average_character_count:int32 = ChatStatisticsMessageSenderInfo; chatStatisticsMessageSenderInfo user_id:int53 sent_message_count:int32 average_character_count:int32 = ChatStatisticsMessageSenderInfo;
//@description Contains statistics about administrator actions done by a user //@description Contains statistics about administrator actions done by a user
//@user_id Administrator user identifier //@user_id Administrator user identifier
//@deleted_message_count Number of messages deleted by the administrator //@deleted_message_count Number of messages deleted by the administrator
//@banned_user_count Number of users banned by the administrator //@banned_user_count Number of users banned by the administrator
//@restricted_user_count Number of users restricted by the administrator //@restricted_user_count Number of users restricted by the administrator
chatStatisticsAdministratorActionsInfo user_id:int32 deleted_message_count:int32 banned_user_count:int32 restricted_user_count:int32 = ChatStatisticsAdministratorActionsInfo; chatStatisticsAdministratorActionsInfo user_id:int53 deleted_message_count:int32 banned_user_count:int32 restricted_user_count:int32 = ChatStatisticsAdministratorActionsInfo;
//@description Contains statistics about number of new members invited by a user //@description Contains statistics about number of new members invited by a user
//@user_id User identifier //@user_id User identifier
//@added_member_count Number of new members invited by the user //@added_member_count Number of new members invited by the user
chatStatisticsInviterInfo user_id:int32 added_member_count:int32 = ChatStatisticsInviterInfo; chatStatisticsInviterInfo user_id:int53 added_member_count:int32 = ChatStatisticsInviterInfo;
//@class ChatStatistics @description Contains a detailed statistics about a chat //@class ChatStatistics @description Contains a detailed statistics about a chat
@ -3579,7 +3576,7 @@ botCommandScopeChat chat_id:int53 = BotCommandScope;
botCommandScopeChatAdministrators chat_id:int53 = BotCommandScope; botCommandScopeChatAdministrators chat_id:int53 = BotCommandScope;
//@description A scope covering a member of a chat @chat_id Chat identifier @user_id User identifier //@description A scope covering a member of a chat @chat_id Chat identifier @user_id User identifier
botCommandScopeChatMember chat_id:int53 user_id:int32 = BotCommandScope; botCommandScopeChatMember chat_id:int53 user_id:int53 = BotCommandScope;
//@class Update @description Contains notifications about data changes //@class Update @description Contains notifications about data changes
@ -3720,10 +3717,10 @@ updateHavePendingNotifications have_delayed_notifications:Bool have_unreceived_n
updateDeleteMessages chat_id:int53 message_ids:vector<int53> is_permanent:Bool from_cache:Bool = Update; updateDeleteMessages chat_id:int53 message_ids:vector<int53> is_permanent:Bool from_cache:Bool = Update;
//@description User activity in the chat has changed @chat_id Chat identifier @message_thread_id If not 0, a message thread identifier in which the action was performed @user_id Identifier of a user performing an action @action The action description //@description User activity in the chat has changed @chat_id Chat identifier @message_thread_id If not 0, a message thread identifier in which the action was performed @user_id Identifier of a user performing an action @action The action description
updateUserChatAction chat_id:int53 message_thread_id:int53 user_id:int32 action:ChatAction = Update; updateUserChatAction chat_id:int53 message_thread_id:int53 user_id:int53 action:ChatAction = Update;
//@description The user went online or offline @user_id User identifier @status New status of the user //@description The user went online or offline @user_id User identifier @status New status of the user
updateUserStatus user_id:int32 status:UserStatus = Update; updateUserStatus user_id:int53 status:UserStatus = Update;
//@description Some data of a user has changed. This update is guaranteed to come before the user identifier is returned to the application @user New data about the user //@description Some data of a user has changed. This update is guaranteed to come before the user identifier is returned to the application @user New data about the user
updateUser user:user = Update; updateUser user:user = Update;
@ -3738,13 +3735,13 @@ updateSupergroup supergroup:supergroup = Update;
updateSecretChat secret_chat:secretChat = Update; updateSecretChat secret_chat:secretChat = Update;
//@description Some data from userFullInfo has been changed @user_id User identifier @user_full_info New full information about the user //@description Some data from userFullInfo has been changed @user_id User identifier @user_full_info New full information about the user
updateUserFullInfo user_id:int32 user_full_info:userFullInfo = Update; updateUserFullInfo user_id:int53 user_full_info:userFullInfo = Update;
//@description Some data from basicGroupFullInfo has been changed @basic_group_id Identifier of a basic group @basic_group_full_info New full information about the group //@description Some data from basicGroupFullInfo has been changed @basic_group_id Identifier of a basic group @basic_group_full_info New full information about the group
updateBasicGroupFullInfo basic_group_id:int32 basic_group_full_info:basicGroupFullInfo = Update; updateBasicGroupFullInfo basic_group_id:int53 basic_group_full_info:basicGroupFullInfo = Update;
//@description Some data from supergroupFullInfo has been changed @supergroup_id Identifier of the supergroup or channel @supergroup_full_info New full information about the supergroup //@description Some data from supergroupFullInfo has been changed @supergroup_id Identifier of the supergroup or channel @supergroup_full_info New full information about the supergroup
updateSupergroupFullInfo supergroup_id:int32 supergroup_full_info:supergroupFullInfo = Update; updateSupergroupFullInfo supergroup_id:int53 supergroup_full_info:supergroupFullInfo = Update;
//@description Service notification from the server. Upon receiving this the application must show a popup with the content of the notification //@description Service notification from the server. Upon receiving this the application must show a popup with the content of the notification
//@type Notification type. If type begins with "AUTH_KEY_DROP_", then two buttons "Cancel" and "Log out" should be shown under notification; if user presses the second, all local data should be destroyed using Destroy method //@type Notification type. If type begins with "AUTH_KEY_DROP_", then two buttons "Cancel" and "Log out" should be shown under notification; if user presses the second, all local data should be destroyed using Destroy method
@ -3841,27 +3838,27 @@ updateSuggestedActions added_actions:vector<SuggestedAction> removed_actions:vec
//@description A new incoming inline query; for bots only @id Unique query identifier @sender_user_id Identifier of the user who sent the query @user_location User location; may be null //@description A new incoming inline query; for bots only @id Unique query identifier @sender_user_id Identifier of the user who sent the query @user_location User location; may be null
//@chat_type Contains information about the type of the chat, from which the query originated; may be null if unknown @query Text of the query @offset Offset of the first entry to return //@chat_type Contains information about the type of the chat, from which the query originated; may be null if unknown @query Text of the query @offset Offset of the first entry to return
updateNewInlineQuery id:int64 sender_user_id:int32 user_location:location chat_type:ChatType query:string offset:string = Update; updateNewInlineQuery id:int64 sender_user_id:int53 user_location:location chat_type:ChatType query:string offset:string = Update;
//@description The user has chosen a result of an inline query; for bots only @sender_user_id Identifier of the user who sent the query @user_location User location; may be null //@description The user has chosen a result of an inline query; for bots only @sender_user_id Identifier of the user who sent the query @user_location User location; may be null
//@query Text of the query @result_id Identifier of the chosen result @inline_message_id Identifier of the sent inline message, if known //@query Text of the query @result_id Identifier of the chosen result @inline_message_id Identifier of the sent inline message, if known
updateNewChosenInlineResult sender_user_id:int32 user_location:location query:string result_id:string inline_message_id:string = Update; updateNewChosenInlineResult sender_user_id:int53 user_location:location query:string result_id:string inline_message_id:string = Update;
//@description A new incoming callback query; for bots only @id Unique query identifier @sender_user_id Identifier of the user who sent the query //@description A new incoming callback query; for bots only @id Unique query identifier @sender_user_id Identifier of the user who sent the query
//@chat_id Identifier of the chat where the query was sent @message_id Identifier of the message, from which the query originated //@chat_id Identifier of the chat where the query was sent @message_id Identifier of the message, from which the query originated
//@chat_instance Identifier that uniquely corresponds to the chat to which the message was sent @payload Query payload //@chat_instance Identifier that uniquely corresponds to the chat to which the message was sent @payload Query payload
updateNewCallbackQuery id:int64 sender_user_id:int32 chat_id:int53 message_id:int53 chat_instance:int64 payload:CallbackQueryPayload = Update; updateNewCallbackQuery id:int64 sender_user_id:int53 chat_id:int53 message_id:int53 chat_instance:int64 payload:CallbackQueryPayload = Update;
//@description A new incoming callback query from a message sent via a bot; for bots only @id Unique query identifier @sender_user_id Identifier of the user who sent the query @inline_message_id Identifier of the inline message, from which the query originated //@description A new incoming callback query from a message sent via a bot; for bots only @id Unique query identifier @sender_user_id Identifier of the user who sent the query @inline_message_id Identifier of the inline message, from which the query originated
//@chat_instance An identifier uniquely corresponding to the chat a message was sent to @payload Query payload //@chat_instance An identifier uniquely corresponding to the chat a message was sent to @payload Query payload
updateNewInlineCallbackQuery id:int64 sender_user_id:int32 inline_message_id:string chat_instance:int64 payload:CallbackQueryPayload = Update; updateNewInlineCallbackQuery id:int64 sender_user_id:int53 inline_message_id:string chat_instance:int64 payload:CallbackQueryPayload = Update;
//@description A new incoming shipping query; for bots only. Only for invoices with flexible price @id Unique query identifier @sender_user_id Identifier of the user who sent the query @invoice_payload Invoice payload @shipping_address User shipping address //@description A new incoming shipping query; for bots only. Only for invoices with flexible price @id Unique query identifier @sender_user_id Identifier of the user who sent the query @invoice_payload Invoice payload @shipping_address User shipping address
updateNewShippingQuery id:int64 sender_user_id:int32 invoice_payload:string shipping_address:address = Update; updateNewShippingQuery id:int64 sender_user_id:int53 invoice_payload:string shipping_address:address = Update;
//@description A new incoming pre-checkout query; for bots only. Contains full information about a checkout @id Unique query identifier @sender_user_id Identifier of the user who sent the query @currency Currency for the product price @total_amount Total price for the product, in the smallest units of the currency //@description A new incoming pre-checkout query; for bots only. Contains full information about a checkout @id Unique query identifier @sender_user_id Identifier of the user who sent the query @currency Currency for the product price @total_amount Total price for the product, in the smallest units of the currency
//@invoice_payload Invoice payload @shipping_option_id Identifier of a shipping option chosen by the user; may be empty if not applicable @order_info Information about the order; may be null //@invoice_payload Invoice payload @shipping_option_id Identifier of a shipping option chosen by the user; may be empty if not applicable @order_info Information about the order; may be null
updateNewPreCheckoutQuery id:int64 sender_user_id:int32 currency:string total_amount:int53 invoice_payload:bytes shipping_option_id:string order_info:orderInfo = Update; updateNewPreCheckoutQuery id:int64 sender_user_id:int53 currency:string total_amount:int53 invoice_payload:bytes shipping_option_id:string order_info:orderInfo = Update;
//@description A new incoming event; for bots only @event A JSON-serialized event //@description A new incoming event; for bots only @event A JSON-serialized event
updateNewCustomEvent event:string = Update; updateNewCustomEvent event:string = Update;
@ -3873,12 +3870,12 @@ updateNewCustomQuery id:int64 data:string timeout:int32 = Update;
updatePoll poll:poll = Update; updatePoll poll:poll = Update;
//@description A user changed the answer to a poll; for bots only @poll_id Unique poll identifier @user_id The user, who changed the answer to the poll @option_ids 0-based identifiers of answer options, chosen by the user //@description A user changed the answer to a poll; for bots only @poll_id Unique poll identifier @user_id The user, who changed the answer to the poll @option_ids 0-based identifiers of answer options, chosen by the user
updatePollAnswer poll_id:int64 user_id:int32 option_ids:vector<int32> = Update; updatePollAnswer poll_id:int64 user_id:int53 option_ids:vector<int32> = Update;
//@description User rights changed in a chat; for bots only @chat_id Chat identifier @actor_user_id Identifier of the user, changing the rights //@description User rights changed in a chat; for bots only @chat_id Chat identifier @actor_user_id Identifier of the user, changing the rights
//@date Point in time (Unix timestamp) when the user rights was changed @invite_link If user has joined the chat using an invite link, the invite link; may be null //@date Point in time (Unix timestamp) when the user rights was changed @invite_link If user has joined the chat using an invite link, the invite link; may be null
//@old_chat_member Previous chat member @new_chat_member New chat member //@old_chat_member Previous chat member @new_chat_member New chat member
updateChatMember chat_id:int53 actor_user_id:int32 date:int32 invite_link:chatInviteLink old_chat_member:chatMember new_chat_member:chatMember = Update; updateChatMember chat_id:int53 actor_user_id:int53 date:int32 invite_link:chatInviteLink old_chat_member:chatMember new_chat_member:chatMember = Update;
//@description Contains a list of updates @updates List of updates //@description Contains a list of updates @updates List of updates
@ -3948,7 +3945,7 @@ checkAuthenticationCode code:string = Ok;
//@description Requests QR code authentication by scanning a QR code on another logged in device. Works only when the current authorization state is authorizationStateWaitPhoneNumber, //@description Requests QR code authentication by scanning a QR code on another logged in device. Works only when the current authorization state is authorizationStateWaitPhoneNumber,
//-or if there is no pending authentication query and the current authorization state is authorizationStateWaitCode, authorizationStateWaitRegistration, or authorizationStateWaitPassword //-or if there is no pending authentication query and the current authorization state is authorizationStateWaitCode, authorizationStateWaitRegistration, or authorizationStateWaitPassword
//@other_user_ids List of user identifiers of other users currently using the application //@other_user_ids List of user identifiers of other users currently using the application
requestQrCodeAuthentication other_user_ids:vector<int32> = Ok; requestQrCodeAuthentication other_user_ids:vector<int53> = Ok;
//@description Finishes user registration. Works only when the current authorization state is authorizationStateWaitRegistration //@description Finishes user registration. Works only when the current authorization state is authorizationStateWaitRegistration
//@first_name The first name of the user; 1-64 characters @last_name The last name of the user; 0-64 characters //@first_name The first name of the user; 1-64 characters @last_name The last name of the user; 0-64 characters
@ -4039,22 +4036,22 @@ getTemporaryPasswordState = TemporaryPasswordState;
getMe = User; getMe = User;
//@description Returns information about a user by their identifier. This is an offline request if the current user is not a bot @user_id User identifier //@description Returns information about a user by their identifier. This is an offline request if the current user is not a bot @user_id User identifier
getUser user_id:int32 = User; getUser user_id:int53 = User;
//@description Returns full information about a user by their identifier @user_id User identifier //@description Returns full information about a user by their identifier @user_id User identifier
getUserFullInfo user_id:int32 = UserFullInfo; getUserFullInfo user_id:int53 = UserFullInfo;
//@description Returns information about a basic group by its identifier. This is an offline request if the current user is not a bot @basic_group_id Basic group identifier //@description Returns information about a basic group by its identifier. This is an offline request if the current user is not a bot @basic_group_id Basic group identifier
getBasicGroup basic_group_id:int32 = BasicGroup; getBasicGroup basic_group_id:int53 = BasicGroup;
//@description Returns full information about a basic group by its identifier @basic_group_id Basic group identifier //@description Returns full information about a basic group by its identifier @basic_group_id Basic group identifier
getBasicGroupFullInfo basic_group_id:int32 = BasicGroupFullInfo; getBasicGroupFullInfo basic_group_id:int53 = BasicGroupFullInfo;
//@description Returns information about a supergroup or a channel by its identifier. This is an offline request if the current user is not a bot @supergroup_id Supergroup or channel identifier //@description Returns information about a supergroup or a channel by its identifier. This is an offline request if the current user is not a bot @supergroup_id Supergroup or channel identifier
getSupergroup supergroup_id:int32 = Supergroup; getSupergroup supergroup_id:int53 = Supergroup;
//@description Returns full information about a supergroup or a channel by its identifier, cached for up to 1 minute @supergroup_id Supergroup or channel identifier //@description Returns full information about a supergroup or a channel by its identifier, cached for up to 1 minute @supergroup_id Supergroup or channel identifier
getSupergroupFullInfo supergroup_id:int32 = SupergroupFullInfo; getSupergroupFullInfo supergroup_id:int53 = SupergroupFullInfo;
//@description Returns information about a secret chat by its identifier. This is an offline request @secret_chat_id Secret chat identifier //@description Returns information about a secret chat by its identifier. This is an offline request @secret_chat_id Secret chat identifier
getSecretChat secret_chat_id:int32 = SecretChat; getSecretChat secret_chat_id:int32 = SecretChat;
@ -4150,7 +4147,7 @@ getInactiveSupergroupChats = Chats;
//@description Returns a list of common group chats with a given user. Chats are sorted by their type and creation date @user_id User identifier @offset_chat_id Chat identifier starting from which to return chats; use 0 for the first request @limit The maximum number of chats to be returned; up to 100 //@description Returns a list of common group chats with a given user. Chats are sorted by their type and creation date @user_id User identifier @offset_chat_id Chat identifier starting from which to return chats; use 0 for the first request @limit The maximum number of chats to be returned; up to 100
getGroupsInCommon user_id:int32 offset_chat_id:int53 limit:int32 = Chats; getGroupsInCommon user_id:int53 offset_chat_id:int53 limit:int32 = Chats;
//@description Returns messages in a chat. The messages are returned in a reverse chronological order (i.e., in order of decreasing message_id). //@description Returns messages in a chat. The messages are returned in a reverse chronological order (i.e., in order of decreasing message_id).
@ -4291,7 +4288,7 @@ sendMessageAlbum chat_id:int53 message_thread_id:int53 reply_to_message_id:int53
//@description Invites a bot to a chat (if it is not yet a member) and sends it the /start command. Bots can't be invited to a private chat other than the chat with the bot. Bots can't be invited to channels (although they can be added as admins) and secret chats. Returns the sent message //@description Invites a bot to a chat (if it is not yet a member) and sends it the /start command. Bots can't be invited to a private chat other than the chat with the bot. Bots can't be invited to channels (although they can be added as admins) and secret chats. Returns the sent message
//@bot_user_id Identifier of the bot @chat_id Identifier of the target chat @parameter A hidden parameter sent to the bot for deep linking purposes (https://core.telegram.org/bots#deep-linking) //@bot_user_id Identifier of the bot @chat_id Identifier of the target chat @parameter A hidden parameter sent to the bot for deep linking purposes (https://core.telegram.org/bots#deep-linking)
sendBotStartMessage bot_user_id:int32 chat_id:int53 parameter:string = Message; sendBotStartMessage bot_user_id:int53 chat_id:int53 parameter:string = Message;
//@description Sends the result of an inline query as a message. Returns the sent message. Always clears a chat draft message //@description Sends the result of an inline query as a message. Returns the sent message. Always clears a chat draft message
//@chat_id Target chat //@chat_id Target chat
@ -4332,7 +4329,7 @@ addLocalMessage chat_id:int53 sender:MessageSender reply_to_message_id:int53 dis
deleteMessages chat_id:int53 message_ids:vector<int53> revoke:Bool = Ok; deleteMessages chat_id:int53 message_ids:vector<int53> revoke:Bool = Ok;
//@description Deletes all messages sent by the specified user to a chat. Supported only for supergroups; requires can_delete_messages administrator privileges @chat_id Chat identifier @user_id User identifier //@description Deletes all messages sent by the specified user to a chat. Supported only for supergroups; requires can_delete_messages administrator privileges @chat_id Chat identifier @user_id User identifier
deleteChatMessagesFromUser chat_id:int53 user_id:int32 = Ok; deleteChatMessagesFromUser chat_id:int53 user_id:int53 = Ok;
//@description Edits the text of a message (or a text of a game message). Returns the edited message after the edit is completed on the server side //@description Edits the text of a message (or a text of a game message). Returns the edited message after the edit is completed on the server side
@ -4437,18 +4434,18 @@ hideSuggestedAction action:SuggestedAction = Ok;
//@description Returns information about a button of type inlineKeyboardButtonTypeLoginUrl. The method needs to be called when the user presses the button //@description Returns information about a button of type inlineKeyboardButtonTypeLoginUrl. The method needs to be called when the user presses the button
//@chat_id Chat identifier of the message with the button @message_id Message identifier of the message with the button @button_id Button identifier //@chat_id Chat identifier of the message with the button @message_id Message identifier of the message with the button @button_id Button identifier
getLoginUrlInfo chat_id:int53 message_id:int53 button_id:int32 = LoginUrlInfo; getLoginUrlInfo chat_id:int53 message_id:int53 button_id:int53 = LoginUrlInfo;
//@description Returns an HTTP URL which can be used to automatically authorize the user on a website after clicking an inline button of type inlineKeyboardButtonTypeLoginUrl. //@description Returns an HTTP URL which can be used to automatically authorize the user on a website after clicking an inline button of type inlineKeyboardButtonTypeLoginUrl.
//-Use the method getLoginUrlInfo to find whether a prior user confirmation is needed. If an error is returned, then the button must be handled as an ordinary URL button //-Use the method getLoginUrlInfo to find whether a prior user confirmation is needed. If an error is returned, then the button must be handled as an ordinary URL button
//@chat_id Chat identifier of the message with the button @message_id Message identifier of the message with the button @button_id Button identifier //@chat_id Chat identifier of the message with the button @message_id Message identifier of the message with the button @button_id Button identifier
//@allow_write_access True, if the user allowed the bot to send them messages //@allow_write_access True, if the user allowed the bot to send them messages
getLoginUrl chat_id:int53 message_id:int53 button_id:int32 allow_write_access:Bool = HttpUrl; getLoginUrl chat_id:int53 message_id:int53 button_id:int53 allow_write_access:Bool = HttpUrl;
//@description Sends an inline query to a bot and returns its results. Returns an error with code 502 if the bot fails to answer the query before the query timeout expires @bot_user_id The identifier of the target bot //@description Sends an inline query to a bot and returns its results. Returns an error with code 502 if the bot fails to answer the query before the query timeout expires @bot_user_id The identifier of the target bot
//@chat_id Identifier of the chat where the query was sent @user_location Location of the user, only if needed @query Text of the query @offset Offset of the first entry to return //@chat_id Identifier of the chat where the query was sent @user_location Location of the user, only if needed @query Text of the query @offset Offset of the first entry to return
getInlineQueryResults bot_user_id:int32 chat_id:int53 user_location:location query:string offset:string = InlineQueryResults; getInlineQueryResults bot_user_id:int53 chat_id:int53 user_location:location query:string offset:string = InlineQueryResults;
//@description Sets the result of an inline query; for bots only @inline_query_id Identifier of the inline query @is_personal True, if the result of the query can be cached for the specified user //@description Sets the result of an inline query; for bots only @inline_query_id Identifier of the inline query @is_personal True, if the result of the query can be cached for the specified user
//@results The results of the query @cache_time Allowed time to cache the results of the query, in seconds @next_offset Offset for the next inline query; pass an empty string if there are no more results //@results The results of the query @cache_time Allowed time to cache the results of the query, in seconds @next_offset Offset for the next inline query; pass an empty string if there are no more results
@ -4472,17 +4469,17 @@ answerPreCheckoutQuery pre_checkout_query_id:int64 error_message:string = Ok;
//@description Updates the game score of the specified user in the game; for bots only @chat_id The chat to which the message with the game belongs @message_id Identifier of the message @edit_message True, if the message should be edited @user_id User identifier @score The new score //@description Updates the game score of the specified user in the game; for bots only @chat_id The chat to which the message with the game belongs @message_id Identifier of the message @edit_message True, if the message should be edited @user_id User identifier @score The new score
//@force Pass true to update the score even if it decreases. If the score is 0, the user will be deleted from the high score table //@force Pass true to update the score even if it decreases. If the score is 0, the user will be deleted from the high score table
setGameScore chat_id:int53 message_id:int53 edit_message:Bool user_id:int32 score:int32 force:Bool = Message; setGameScore chat_id:int53 message_id:int53 edit_message:Bool user_id:int53 score:int32 force:Bool = Message;
//@description Updates the game score of the specified user in a game; for bots only @inline_message_id Inline message identifier @edit_message True, if the message should be edited @user_id User identifier @score The new score //@description Updates the game score of the specified user in a game; for bots only @inline_message_id Inline message identifier @edit_message True, if the message should be edited @user_id User identifier @score The new score
//@force Pass true to update the score even if it decreases. If the score is 0, the user will be deleted from the high score table //@force Pass true to update the score even if it decreases. If the score is 0, the user will be deleted from the high score table
setInlineGameScore inline_message_id:string edit_message:Bool user_id:int32 score:int32 force:Bool = Ok; setInlineGameScore inline_message_id:string edit_message:Bool user_id:int53 score:int32 force:Bool = Ok;
//@description Returns the high scores for a game and some part of the high score table in the range of the specified user; for bots only @chat_id The chat that contains the message with the game @message_id Identifier of the message @user_id User identifier //@description Returns the high scores for a game and some part of the high score table in the range of the specified user; for bots only @chat_id The chat that contains the message with the game @message_id Identifier of the message @user_id User identifier
getGameHighScores chat_id:int53 message_id:int53 user_id:int32 = GameHighScores; getGameHighScores chat_id:int53 message_id:int53 user_id:int53 = GameHighScores;
//@description Returns game high scores and some part of the high score table in the range of the specified user; for bots only @inline_message_id Inline message identifier @user_id User identifier //@description Returns game high scores and some part of the high score table in the range of the specified user; for bots only @inline_message_id Inline message identifier @user_id User identifier
getInlineGameHighScores inline_message_id:string user_id:int32 = GameHighScores; getInlineGameHighScores inline_message_id:string user_id:int53 = GameHighScores;
//@description Deletes the default reply markup from a chat. Must be called after a one-time keyboard or a ForceReply reply markup has been used. UpdateChatReplyMarkup will be sent if the reply markup will be changed @chat_id Chat identifier //@description Deletes the default reply markup from a chat. Must be called after a one-time keyboard or a ForceReply reply markup has been used. UpdateChatReplyMarkup will be sent if the reply markup will be changed @chat_id Chat identifier
@ -4526,19 +4523,19 @@ readAllChatMentions chat_id:int53 = Ok;
//@description Returns an existing chat corresponding to a given user @user_id User identifier @force If true, the chat will be created without network request. In this case all information about the chat except its type, title and photo can be incorrect //@description Returns an existing chat corresponding to a given user @user_id User identifier @force If true, the chat will be created without network request. In this case all information about the chat except its type, title and photo can be incorrect
createPrivateChat user_id:int32 force:Bool = Chat; createPrivateChat user_id:int53 force:Bool = Chat;
//@description Returns an existing chat corresponding to a known basic group @basic_group_id Basic group identifier @force If true, the chat will be created without network request. In this case all information about the chat except its type, title and photo can be incorrect //@description Returns an existing chat corresponding to a known basic group @basic_group_id Basic group identifier @force If true, the chat will be created without network request. In this case all information about the chat except its type, title and photo can be incorrect
createBasicGroupChat basic_group_id:int32 force:Bool = Chat; createBasicGroupChat basic_group_id:int53 force:Bool = Chat;
//@description Returns an existing chat corresponding to a known supergroup or channel @supergroup_id Supergroup or channel identifier @force If true, the chat will be created without network request. In this case all information about the chat except its type, title and photo can be incorrect //@description Returns an existing chat corresponding to a known supergroup or channel @supergroup_id Supergroup or channel identifier @force If true, the chat will be created without network request. In this case all information about the chat except its type, title and photo can be incorrect
createSupergroupChat supergroup_id:int32 force:Bool = Chat; createSupergroupChat supergroup_id:int53 force:Bool = Chat;
//@description Returns an existing chat corresponding to a known secret chat @secret_chat_id Secret chat identifier //@description Returns an existing chat corresponding to a known secret chat @secret_chat_id Secret chat identifier
createSecretChat secret_chat_id:int32 = Chat; createSecretChat secret_chat_id:int32 = Chat;
//@description Creates a new basic group and sends a corresponding messageBasicGroupChatCreate. Returns the newly created chat @user_ids Identifiers of users to be added to the basic group @title Title of the new basic group; 1-128 characters //@description Creates a new basic group and sends a corresponding messageBasicGroupChatCreate. Returns the newly created chat @user_ids Identifiers of users to be added to the basic group @title Title of the new basic group; 1-128 characters
createNewBasicGroupChat user_ids:vector<int32> title:string = Chat; createNewBasicGroupChat user_ids:vector<int53> title:string = Chat;
//@description Creates a new supergroup or channel and sends a corresponding messageSupergroupChatCreate. Returns the newly created chat //@description Creates a new supergroup or channel and sends a corresponding messageSupergroupChatCreate. Returns the newly created chat
//@title Title of the new chat; 1-128 characters //@title Title of the new chat; 1-128 characters
@ -4549,7 +4546,7 @@ createNewBasicGroupChat user_ids:vector<int32> title:string = Chat;
createNewSupergroupChat title:string is_channel:Bool description:string location:chatLocation for_import:Bool = Chat; createNewSupergroupChat title:string is_channel:Bool description:string location:chatLocation for_import:Bool = Chat;
//@description Creates a new secret chat. Returns the newly created chat @user_id Identifier of the target user //@description Creates a new secret chat. Returns the newly created chat @user_id Identifier of the target user
createNewSecretChat user_id:int32 = Chat; createNewSecretChat user_id:int53 = Chat;
//@description Creates a new supergroup from an existing basic group and sends a corresponding messageChatUpgradeTo and messageChatUpgradeFrom; requires creator privileges. Deactivates the original basic group @chat_id Identifier of the chat to upgrade //@description Creates a new supergroup from an existing basic group and sends a corresponding messageChatUpgradeTo and messageChatUpgradeFrom; requires creator privileges. Deactivates the original basic group @chat_id Identifier of the chat to upgrade
upgradeBasicGroupChatToSupergroupChat chat_id:int53 = Chat; upgradeBasicGroupChatToSupergroupChat chat_id:int53 = Chat;
@ -4655,11 +4652,11 @@ leaveChat chat_id:int53 = Ok;
//@description Adds a new member to a chat. Members can't be added to private or secret chats //@description Adds a new member to a chat. Members can't be added to private or secret chats
//@chat_id Chat identifier @user_id Identifier of the user @forward_limit The number of earlier messages from the chat to be forwarded to the new member; up to 100. Ignored for supergroups and channels //@chat_id Chat identifier @user_id Identifier of the user @forward_limit The number of earlier messages from the chat to be forwarded to the new member; up to 100. Ignored for supergroups and channels
addChatMember chat_id:int53 user_id:int32 forward_limit:int32 = Ok; addChatMember chat_id:int53 user_id:int53 forward_limit:int32 = Ok;
//@description Adds multiple new members to a chat. Currently this method is only available for supergroups and channels. This method can't be used to join a chat. Members can't be added to a channel if it has more than 200 members //@description Adds multiple new members to a chat. Currently this method is only available for supergroups and channels. This method can't be used to join a chat. Members can't be added to a channel if it has more than 200 members
//@chat_id Chat identifier @user_ids Identifiers of the users to be added to the chat. The maximum number of added users is 20 for supergroups and 100 for channels //@chat_id Chat identifier @user_ids Identifiers of the users to be added to the chat. The maximum number of added users is 20 for supergroups and 100 for channels
addChatMembers chat_id:int53 user_ids:vector<int32> = Ok; addChatMembers chat_id:int53 user_ids:vector<int53> = Ok;
//@description Changes the status of a chat member, needs appropriate privileges. This function is currently not suitable for adding new members to the chat and transferring chat ownership; instead, use addChatMember or transferChatOwnership //@description Changes the status of a chat member, needs appropriate privileges. This function is currently not suitable for adding new members to the chat and transferring chat ownership; instead, use addChatMember or transferChatOwnership
//@chat_id Chat identifier @member_id Member identifier. Chats can be only banned and unbanned in supergroups and channels @status The new status of the member in the chat //@chat_id Chat identifier @member_id Member identifier. Chats can be only banned and unbanned in supergroups and channels @status The new status of the member in the chat
@ -4677,7 +4674,7 @@ canTransferOwnership = CanTransferOwnershipResult;
//@description Changes the owner of a chat. The current user must be a current owner of the chat. Use the method canTransferOwnership to check whether the ownership can be transferred from the current session. Available only for supergroups and channel chats //@description Changes the owner of a chat. The current user must be a current owner of the chat. Use the method canTransferOwnership to check whether the ownership can be transferred from the current session. Available only for supergroups and channel chats
//@chat_id Chat identifier @user_id Identifier of the user to which transfer the ownership. The ownership can't be transferred to a bot or to a deleted user @password The password of the current user //@chat_id Chat identifier @user_id Identifier of the user to which transfer the ownership. The ownership can't be transferred to a bot or to a deleted user @password The password of the current user
transferChatOwnership chat_id:int53 user_id:int32 password:string = Ok; transferChatOwnership chat_id:int53 user_id:int53 password:string = Ok;
//@description Returns information about a single member of a chat @chat_id Chat identifier @member_id Member identifier //@description Returns information about a single member of a chat @chat_id Chat identifier @member_id Member identifier
getChatMember chat_id:int53 member_id:MessageSender = ChatMember; getChatMember chat_id:int53 member_id:MessageSender = ChatMember;
@ -4809,7 +4806,7 @@ getChatInviteLinkCounts chat_id:int53 = ChatInviteLinkCounts;
//@offset_date Creation date of an invite link starting after which to return invite links; use 0 to get results from the beginning //@offset_date Creation date of an invite link starting after which to return invite links; use 0 to get results from the beginning
//@offset_invite_link Invite link starting after which to return invite links; use empty string to get results from the beginning //@offset_invite_link Invite link starting after which to return invite links; use empty string to get results from the beginning
//@limit The maximum number of invite links to return //@limit The maximum number of invite links to return
getChatInviteLinks chat_id:int53 creator_user_id:int32 is_revoked:Bool offset_date:int32 offset_invite_link:string limit:int32 = ChatInviteLinks; getChatInviteLinks chat_id:int53 creator_user_id:int53 is_revoked:Bool offset_date:int32 offset_invite_link:string limit:int32 = ChatInviteLinks;
//@description Returns chat members joined a chat by an invite link. Requires administrator privileges and can_invite_users right in the chat for own links and owner privileges for other links @chat_id Chat identifier @invite_link Invite link for which to return chat members //@description Returns chat members joined a chat by an invite link. Requires administrator privileges and can_invite_users right in the chat for own links and owner privileges for other links @chat_id Chat identifier @invite_link Invite link for which to return chat members
//@offset_member A chat member from which to return next chat members; use null to get results from the beginning @limit The maximum number of chat members to return //@offset_member A chat member from which to return next chat members; use null to get results from the beginning @limit The maximum number of chat members to return
@ -4827,7 +4824,7 @@ deleteRevokedChatInviteLink chat_id:int53 invite_link:string = Ok;
//@description Deletes all revoked chat invite links created by a given chat administrator. Requires administrator privileges and can_invite_users right in the chat for own links and owner privileges for other links //@description Deletes all revoked chat invite links created by a given chat administrator. Requires administrator privileges and can_invite_users right in the chat for own links and owner privileges for other links
//@chat_id Chat identifier //@chat_id Chat identifier
//@creator_user_id User identifier of a chat administrator, which links will be deleted. Must be an identifier of the current user for non-owner //@creator_user_id User identifier of a chat administrator, which links will be deleted. Must be an identifier of the current user for non-owner
deleteAllRevokedChatInviteLinks chat_id:int53 creator_user_id:int32 = Ok; deleteAllRevokedChatInviteLinks chat_id:int53 creator_user_id:int53 = Ok;
//@description Checks the validity of an invite link for a chat and returns information about the corresponding chat @invite_link Invite link to be checked //@description Checks the validity of an invite link for a chat and returns information about the corresponding chat @invite_link Invite link to be checked
checkChatInviteLink invite_link:string = ChatInviteLinkInfo; checkChatInviteLink invite_link:string = ChatInviteLinkInfo;
@ -4837,7 +4834,7 @@ joinChatByInviteLink invite_link:string = Chat;
//@description Creates a new call @user_id Identifier of the user to be called @protocol Description of the call protocols supported by the application @is_video True, if a video call needs to be created //@description Creates a new call @user_id Identifier of the user to be called @protocol Description of the call protocols supported by the application @is_video True, if a video call needs to be created
createCall user_id:int32 protocol:callProtocol is_video:Bool = CallId; createCall user_id:int53 protocol:callProtocol is_video:Bool = CallId;
//@description Accepts an incoming call @call_id Call identifier @protocol Description of the call protocols supported by the application //@description Accepts an incoming call @call_id Call identifier @protocol Description of the call protocols supported by the application
acceptCall call_id:int32 protocol:callProtocol = Ok; acceptCall call_id:int32 protocol:callProtocol = Ok;
@ -4911,7 +4908,7 @@ revokeGroupCallInviteLink group_call_id:int32 = Ok;
//@description Invites users to an active group call. Sends a service message of type messageInviteToGroupCall for voice chats //@description Invites users to an active group call. Sends a service message of type messageInviteToGroupCall for voice chats
//@group_call_id Group call identifier @user_ids User identifiers. At most 10 users can be invited simultaneously //@group_call_id Group call identifier @user_ids User identifiers. At most 10 users can be invited simultaneously
inviteGroupCallParticipants group_call_id:int32 user_ids:vector<int32> = Ok; inviteGroupCallParticipants group_call_id:int32 user_ids:vector<int53> = Ok;
//@description Returns invite link to a voice chat in a public chat //@description Returns invite link to a voice chat in a public chat
//@group_call_id Group call identifier //@group_call_id Group call identifier
@ -4996,7 +4993,7 @@ getContacts = Users;
searchContacts query:string limit:int32 = Users; searchContacts query:string limit:int32 = Users;
//@description Removes users from the contact list @user_ids Identifiers of users to be deleted //@description Removes users from the contact list @user_ids Identifiers of users to be deleted
removeContacts user_ids:vector<int32> = Ok; removeContacts user_ids:vector<int53> = Ok;
//@description Returns the total number of imported contacts //@description Returns the total number of imported contacts
getImportedContactCount = Count; getImportedContactCount = Count;
@ -5010,11 +5007,11 @@ clearImportedContacts = Ok;
//@description Shares the phone number of the current user with a mutual contact. Supposed to be called when the user clicks on chatActionBarSharePhoneNumber @user_id Identifier of the user with whom to share the phone number. The user must be a mutual contact //@description Shares the phone number of the current user with a mutual contact. Supposed to be called when the user clicks on chatActionBarSharePhoneNumber @user_id Identifier of the user with whom to share the phone number. The user must be a mutual contact
sharePhoneNumber user_id:int32 = Ok; sharePhoneNumber user_id:int53 = Ok;
//@description Returns the profile photos of a user. The result of this query may be outdated: some photos might have been deleted already @user_id User identifier @offset The number of photos to skip; must be non-negative @limit The maximum number of photos to be returned; up to 100 //@description Returns the profile photos of a user. The result of this query may be outdated: some photos might have been deleted already @user_id User identifier @offset The number of photos to skip; must be non-negative @limit The maximum number of photos to be returned; up to 100
getUserProfilePhotos user_id:int32 offset:int32 limit:int32 = ChatPhotos; getUserProfilePhotos user_id:int53 offset:int32 limit:int32 = ChatPhotos;
//@description Returns stickers from the installed sticker sets that correspond to a given emoji. If the emoji is not empty, favorite and recently used stickers may also be returned @emoji String representation of emoji. If empty, returns all known installed stickers @limit The maximum number of stickers to be returned //@description Returns stickers from the installed sticker sets that correspond to a given emoji. If the emoji is not empty, favorite and recently used stickers may also be returned @emoji String representation of emoji. If empty, returns all known installed stickers @limit The maximum number of stickers to be returned
@ -5184,26 +5181,26 @@ disconnectAllWebsites = Ok;
//@description Changes the username of a supergroup or channel, requires owner privileges in the supergroup or channel @supergroup_id Identifier of the supergroup or channel @username New value of the username. Use an empty string to remove the username //@description Changes the username of a supergroup or channel, requires owner privileges in the supergroup or channel @supergroup_id Identifier of the supergroup or channel @username New value of the username. Use an empty string to remove the username
setSupergroupUsername supergroup_id:int32 username:string = Ok; setSupergroupUsername supergroup_id:int53 username:string = Ok;
//@description Changes the sticker set of a supergroup; requires can_change_info administrator right @supergroup_id Identifier of the supergroup @sticker_set_id New value of the supergroup sticker set identifier. Use 0 to remove the supergroup sticker set //@description Changes the sticker set of a supergroup; requires can_change_info administrator right @supergroup_id Identifier of the supergroup @sticker_set_id New value of the supergroup sticker set identifier. Use 0 to remove the supergroup sticker set
setSupergroupStickerSet supergroup_id:int32 sticker_set_id:int64 = Ok; setSupergroupStickerSet supergroup_id:int53 sticker_set_id:int64 = Ok;
//@description Toggles sender signatures messages sent in a channel; requires can_change_info administrator right @supergroup_id Identifier of the channel @sign_messages New value of sign_messages //@description Toggles sender signatures messages sent in a channel; requires can_change_info administrator right @supergroup_id Identifier of the channel @sign_messages New value of sign_messages
toggleSupergroupSignMessages supergroup_id:int32 sign_messages:Bool = Ok; toggleSupergroupSignMessages supergroup_id:int53 sign_messages:Bool = Ok;
//@description Toggles whether the message history of a supergroup is available to new members; requires can_change_info administrator right @supergroup_id The identifier of the supergroup @is_all_history_available The new value of is_all_history_available //@description Toggles whether the message history of a supergroup is available to new members; requires can_change_info administrator right @supergroup_id The identifier of the supergroup @is_all_history_available The new value of is_all_history_available
toggleSupergroupIsAllHistoryAvailable supergroup_id:int32 is_all_history_available:Bool = Ok; toggleSupergroupIsAllHistoryAvailable supergroup_id:int53 is_all_history_available:Bool = Ok;
//@description Upgrades supergroup to a broadcast group; requires owner privileges in the supergroup @supergroup_id Identifier of the supergroup //@description Upgrades supergroup to a broadcast group; requires owner privileges in the supergroup @supergroup_id Identifier of the supergroup
toggleSupergroupIsBroadcastGroup supergroup_id:int32 = Ok; toggleSupergroupIsBroadcastGroup supergroup_id:int53 = Ok;
//@description Reports some messages from a user in a supergroup as spam; requires administrator rights in the supergroup @supergroup_id Supergroup identifier @user_id User identifier @message_ids Identifiers of messages sent in the supergroup by the user. This list must be non-empty //@description Reports some messages from a user in a supergroup as spam; requires administrator rights in the supergroup @supergroup_id Supergroup identifier @user_id User identifier @message_ids Identifiers of messages sent in the supergroup by the user. This list must be non-empty
reportSupergroupSpam supergroup_id:int32 user_id:int32 message_ids:vector<int53> = Ok; reportSupergroupSpam supergroup_id:int53 user_id:int53 message_ids:vector<int53> = Ok;
//@description Returns information about members or banned users in a supergroup or channel. Can be used only if SupergroupFullInfo.can_get_members == true; additionally, administrator privileges may be required for some filters @supergroup_id Identifier of the supergroup or channel //@description Returns information about members or banned users in a supergroup or channel. Can be used only if SupergroupFullInfo.can_get_members == true; additionally, administrator privileges may be required for some filters @supergroup_id Identifier of the supergroup or channel
//@filter The type of users to return. By default, supergroupMembersFilterRecent @offset Number of users to skip @limit The maximum number of users be returned; up to 200 //@filter The type of users to return. By default, supergroupMembersFilterRecent @offset Number of users to skip @limit The maximum number of users be returned; up to 200
getSupergroupMembers supergroup_id:int32 filter:SupergroupMembersFilter offset:int32 limit:int32 = ChatMembers; getSupergroupMembers supergroup_id:int53 filter:SupergroupMembersFilter offset:int32 limit:int32 = ChatMembers;
//@description Closes a secret chat, effectively transferring its state to secretChatStateClosed @secret_chat_id Secret chat identifier //@description Closes a secret chat, effectively transferring its state to secretChatStateClosed @secret_chat_id Secret chat identifier
@ -5213,7 +5210,7 @@ closeSecretChat secret_chat_id:int32 = Ok;
//@description Returns a list of service actions taken by chat members and administrators in the last 48 hours. Available only for supergroups and channels. Requires administrator rights. Returns results in reverse chronological order (i. e., in order of decreasing event_id) //@description Returns a list of service actions taken by chat members and administrators in the last 48 hours. Available only for supergroups and channels. Requires administrator rights. Returns results in reverse chronological order (i. e., in order of decreasing event_id)
//@chat_id Chat identifier @query Search query by which to filter events @from_event_id Identifier of an event from which to return results. Use 0 to get results from the latest events @limit The maximum number of events to return; up to 100 //@chat_id Chat identifier @query Search query by which to filter events @from_event_id Identifier of an event from which to return results. Use 0 to get results from the latest events @limit The maximum number of events to return; up to 100
//@filters The types of events to return. By default, all types will be returned @user_ids User identifiers by which to filter events. By default, events relating to all users will be returned //@filters The types of events to return. By default, all types will be returned @user_ids User identifiers by which to filter events. By default, events relating to all users will be returned
getChatEventLog chat_id:int53 query:string from_event_id:int64 limit:int32 filters:chatEventLogFilters user_ids:vector<int32> = ChatEvents; getChatEventLog chat_id:int53 query:string from_event_id:int64 limit:int32 filters:chatEventLogFilters user_ids:vector<int53> = ChatEvents;
//@description Returns an invoice payment form. This method should be called when the user presses inlineKeyboardButtonBuy @chat_id Chat identifier of the Invoice message @message_id Message identifier @theme Preferred payment form theme //@description Returns an invoice payment form. This method should be called when the user presses inlineKeyboardButtonBuy @chat_id Chat identifier of the Invoice message @message_id Message identifier @theme Preferred payment form theme
@ -5295,7 +5292,7 @@ deleteLanguagePack language_pack_id:string = Ok;
//@description Registers the currently used device for receiving push notifications. Returns a globally unique identifier of the push notification subscription @device_token Device token @other_user_ids List of user identifiers of other users currently using the application //@description Registers the currently used device for receiving push notifications. Returns a globally unique identifier of the push notification subscription @device_token Device token @other_user_ids List of user identifiers of other users currently using the application
registerDevice device_token:DeviceToken other_user_ids:vector<int32> = PushReceiverId; registerDevice device_token:DeviceToken other_user_ids:vector<int53> = PushReceiverId;
//@description Handles a push notification. Returns error with code 406 if the push notification is not supported and connection to the server is required to fetch new data. Can be called before authorization //@description Handles a push notification. Returns error with code 406 if the push notification is not supported and connection to the server is required to fetch new data. Can be called before authorization
//@payload JSON-encoded push notification payload with all fields sent by the server, and "google.sent_time" and "google.notification.sound" fields added //@payload JSON-encoded push notification payload with all fields sent by the server, and "google.sent_time" and "google.notification.sound" fields added
@ -5418,7 +5415,7 @@ setPassportElement element:InputPassportElement password:string = PassportElemen
deletePassportElement type:PassportElementType = Ok; deletePassportElement type:PassportElementType = Ok;
//@description Informs the user that some of the elements in their Telegram Passport contain errors; for bots only. The user will not be able to resend the elements, until the errors are fixed @user_id User identifier @errors The errors //@description Informs the user that some of the elements in their Telegram Passport contain errors; for bots only. The user will not be able to resend the elements, until the errors are fixed @user_id User identifier @errors The errors
setPassportElementErrors user_id:int32 errors:vector<inputPassportElementError> = Ok; setPassportElementErrors user_id:int53 errors:vector<inputPassportElementError> = Ok;
//@description Returns an IETF language tag of the language preferred in the country, which should be used to fill native fields in Telegram Passport personal details. Returns a 404 error if unknown @country_code A two-letter ISO 3166-1 alpha-2 country code //@description Returns an IETF language tag of the language preferred in the country, which should be used to fill native fields in Telegram Passport personal details. Returns a 404 error if unknown @country_code A two-letter ISO 3166-1 alpha-2 country code
@ -5447,7 +5444,7 @@ checkEmailAddressVerificationCode code:string = Ok;
//@description Returns a Telegram Passport authorization form for sharing data with a service @bot_user_id User identifier of the service's bot @scope Telegram Passport element types requested by the service @public_key Service's public key @nonce Unique request identifier provided by the service //@description Returns a Telegram Passport authorization form for sharing data with a service @bot_user_id User identifier of the service's bot @scope Telegram Passport element types requested by the service @public_key Service's public key @nonce Unique request identifier provided by the service
getPassportAuthorizationForm bot_user_id:int32 scope:string public_key:string nonce:string = PassportAuthorizationForm; getPassportAuthorizationForm bot_user_id:int53 scope:string public_key:string nonce:string = PassportAuthorizationForm;
//@description Returns already available Telegram Passport elements suitable for completing a Telegram Passport authorization form. Result can be received only once for each authorization form @autorization_form_id Authorization form identifier @password Password of the current user //@description Returns already available Telegram Passport elements suitable for completing a Telegram Passport authorization form. Result can be received only once for each authorization form @autorization_form_id Authorization form identifier @password Password of the current user
getPassportAuthorizationFormAvailableElements autorization_form_id:int32 password:string = PassportElementsWithErrors; getPassportAuthorizationFormAvailableElements autorization_form_id:int32 password:string = PassportElementsWithErrors;
@ -5472,7 +5469,7 @@ setBotUpdatesStatus pending_update_count:int32 error_message:string = Ok;
//@description Uploads a PNG image with a sticker; returns the uploaded file @user_id Sticker file owner; ignored for regular users @sticker Sticker file to upload //@description Uploads a PNG image with a sticker; returns the uploaded file @user_id Sticker file owner; ignored for regular users @sticker Sticker file to upload
uploadStickerFile user_id:int32 sticker:InputSticker = File; uploadStickerFile user_id:int53 sticker:InputSticker = File;
//@description Returns a suggested name for a new sticker set with a given title @title Sticker set title; 1-64 characters //@description Returns a suggested name for a new sticker set with a given title @title Sticker set title; 1-64 characters
getSuggestedStickerSetName title:string = Text; getSuggestedStickerSetName title:string = Text;
@ -5487,16 +5484,16 @@ checkStickerSetName name:string = CheckStickerSetNameResult;
//@is_masks True, if stickers are masks. Animated stickers can't be masks //@is_masks True, if stickers are masks. Animated stickers can't be masks
//@stickers List of stickers to be added to the set; must be non-empty. All stickers must be of the same type. For animated stickers, uploadStickerFile must be used before the sticker is shown //@stickers List of stickers to be added to the set; must be non-empty. All stickers must be of the same type. For animated stickers, uploadStickerFile must be used before the sticker is shown
//@source Source of the sticker set; may be empty if unknown //@source Source of the sticker set; may be empty if unknown
createNewStickerSet user_id:int32 title:string name:string is_masks:Bool stickers:vector<InputSticker> source:string = StickerSet; createNewStickerSet user_id:int53 title:string name:string is_masks:Bool stickers:vector<InputSticker> source:string = StickerSet;
//@description Adds a new sticker to a set; for bots only. Returns the sticker set //@description Adds a new sticker to a set; for bots only. Returns the sticker set
//@user_id Sticker set owner @name Sticker set name @sticker Sticker to add to the set //@user_id Sticker set owner @name Sticker set name @sticker Sticker to add to the set
addStickerToSet user_id:int32 name:string sticker:InputSticker = StickerSet; addStickerToSet user_id:int53 name:string sticker:InputSticker = StickerSet;
//@description Sets a sticker set thumbnail; for bots only. Returns the sticker set //@description Sets a sticker set thumbnail; for bots only. Returns the sticker set
//@user_id Sticker set owner @name Sticker set name //@user_id Sticker set owner @name Sticker set name
//@thumbnail Thumbnail to set in PNG or TGS format. Animated thumbnail must be set for animated sticker sets and only for them. Pass a zero InputFileId to delete the thumbnail //@thumbnail Thumbnail to set in PNG or TGS format. Animated thumbnail must be set for animated sticker sets and only for them. Pass a zero InputFileId to delete the thumbnail
setStickerSetThumbnail user_id:int32 name:string thumbnail:InputFile = StickerSet; setStickerSetThumbnail user_id:int53 name:string thumbnail:InputFile = StickerSet;
//@description Changes the position of a sticker in the set to which it belongs; for bots only. The sticker set must have been created by the bot //@description Changes the position of a sticker in the set to which it belongs; for bots only. The sticker set must have been created by the bot
//@sticker Sticker @position New position of the sticker in the set, zero-based //@sticker Sticker @position New position of the sticker in the set, zero-based

View File

@ -31,16 +31,16 @@ test.useConfigSimple = help.ConfigSimple;
inputPeerEmpty#7f3b18ea = InputPeer; inputPeerEmpty#7f3b18ea = InputPeer;
inputPeerSelf#7da07ec9 = InputPeer; inputPeerSelf#7da07ec9 = InputPeer;
inputPeerChat#179be863 chat_id:int = InputPeer; inputPeerChat#35a95cb9 chat_id:long = InputPeer;
inputPeerUser#7b8e7de6 user_id:int access_hash:long = InputPeer; inputPeerUser#dde8a54c user_id:long access_hash:long = InputPeer;
inputPeerChannel#20adaef8 channel_id:int access_hash:long = InputPeer; inputPeerChannel#27bcbbfc channel_id:long access_hash:long = InputPeer;
inputPeerUserFromMessage#17bae2e6 peer:InputPeer msg_id:int user_id:int = InputPeer; inputPeerUserFromMessage#a87b0a1c peer:InputPeer msg_id:int user_id:long = InputPeer;
inputPeerChannelFromMessage#9c95f7bb peer:InputPeer msg_id:int channel_id:int = InputPeer; inputPeerChannelFromMessage#bd2a0840 peer:InputPeer msg_id:int channel_id:long = InputPeer;
inputUserEmpty#b98886cf = InputUser; inputUserEmpty#b98886cf = InputUser;
inputUserSelf#f7c1b13f = InputUser; inputUserSelf#f7c1b13f = InputUser;
inputUser#d8292816 user_id:int access_hash:long = InputUser; inputUser#f21158c6 user_id:long access_hash:long = InputUser;
inputUserFromMessage#2d117597 peer:InputPeer msg_id:int user_id:int = InputUser; inputUserFromMessage#1da448e2 peer:InputPeer msg_id:int user_id:long = InputUser;
inputPhoneContact#f392b7f4 client_id:long phone:string first_name:string last_name:string = InputContact; inputPhoneContact#f392b7f4 client_id:long phone:string first_name:string last_name:string = InputContact;
@ -84,9 +84,9 @@ inputPeerPhotoFileLocation#37257e99 flags:# big:flags.0?true peer:InputPeer phot
inputStickerSetThumb#9d84f3db stickerset:InputStickerSet thumb_version:int = InputFileLocation; inputStickerSetThumb#9d84f3db stickerset:InputStickerSet thumb_version:int = InputFileLocation;
inputGroupCallStream#598a92a flags:# call:InputGroupCall time_ms:long scale:int video_channel:flags.0?int video_quality:flags.0?int = InputFileLocation; inputGroupCallStream#598a92a flags:# call:InputGroupCall time_ms:long scale:int video_channel:flags.0?int video_quality:flags.0?int = InputFileLocation;
peerUser#9db1bc6d user_id:int = Peer; peerUser#59511722 user_id:long = Peer;
peerChat#bad0e5bb chat_id:int = Peer; peerChat#36c6019a chat_id:long = Peer;
peerChannel#bddde532 channel_id:int = Peer; peerChannel#a2a5371e channel_id:long = Peer;
storage.fileUnknown#aa963b05 = storage.FileType; storage.fileUnknown#aa963b05 = storage.FileType;
storage.filePartial#40bc6f52 = storage.FileType; storage.filePartial#40bc6f52 = storage.FileType;
@ -99,8 +99,8 @@ storage.fileMov#4b09ebbc = storage.FileType;
storage.fileMp4#b3cea0e4 = storage.FileType; storage.fileMp4#b3cea0e4 = storage.FileType;
storage.fileWebp#1081464c = storage.FileType; storage.fileWebp#1081464c = storage.FileType;
userEmpty#200250ba id:int = User; userEmpty#d3bc4b7a id:long = User;
user#938458c1 flags:# self:flags.10?true contact:flags.11?true mutual_contact:flags.12?true deleted:flags.13?true bot:flags.14?true bot_chat_history:flags.15?true bot_nochats:flags.16?true verified:flags.17?true restricted:flags.18?true min:flags.20?true bot_inline_geo:flags.21?true support:flags.23?true scam:flags.24?true apply_min_photo:flags.25?true fake:flags.26?true id:int access_hash:flags.0?long first_name:flags.1?string last_name:flags.2?string username:flags.3?string phone:flags.4?string photo:flags.5?UserProfilePhoto status:flags.6?UserStatus bot_info_version:flags.14?int restriction_reason:flags.18?Vector<RestrictionReason> bot_inline_placeholder:flags.19?string lang_code:flags.22?string = User; user#3ff6ecb0 flags:# self:flags.10?true contact:flags.11?true mutual_contact:flags.12?true deleted:flags.13?true bot:flags.14?true bot_chat_history:flags.15?true bot_nochats:flags.16?true verified:flags.17?true restricted:flags.18?true min:flags.20?true bot_inline_geo:flags.21?true support:flags.23?true scam:flags.24?true apply_min_photo:flags.25?true fake:flags.26?true id:long access_hash:flags.0?long first_name:flags.1?string last_name:flags.2?string username:flags.3?string phone:flags.4?string photo:flags.5?UserProfilePhoto status:flags.6?UserStatus bot_info_version:flags.14?int restriction_reason:flags.18?Vector<RestrictionReason> bot_inline_placeholder:flags.19?string lang_code:flags.22?string = User;
userProfilePhotoEmpty#4f11bae1 = UserProfilePhoto; userProfilePhotoEmpty#4f11bae1 = UserProfilePhoto;
userProfilePhoto#82d1f706 flags:# has_video:flags.0?true photo_id:long stripped_thumb:flags.1?bytes dc_id:int = UserProfilePhoto; userProfilePhoto#82d1f706 flags:# has_video:flags.0?true photo_id:long stripped_thumb:flags.1?bytes dc_id:int = UserProfilePhoto;
@ -112,33 +112,33 @@ userStatusRecently#e26f42f1 = UserStatus;
userStatusLastWeek#7bf09fc = UserStatus; userStatusLastWeek#7bf09fc = UserStatus;
userStatusLastMonth#77ebc742 = UserStatus; userStatusLastMonth#77ebc742 = UserStatus;
chatEmpty#9ba2d800 id:int = Chat; chatEmpty#29562865 id:long = Chat;
chat#3bda1bde flags:# creator:flags.0?true kicked:flags.1?true left:flags.2?true deactivated:flags.5?true call_active:flags.23?true call_not_empty:flags.24?true id:int title:string photo:ChatPhoto participants_count:int date:int version:int migrated_to:flags.6?InputChannel admin_rights:flags.14?ChatAdminRights default_banned_rights:flags.18?ChatBannedRights = Chat; chat#41cbf256 flags:# creator:flags.0?true kicked:flags.1?true left:flags.2?true deactivated:flags.5?true call_active:flags.23?true call_not_empty:flags.24?true id:long title:string photo:ChatPhoto participants_count:int date:int version:int migrated_to:flags.6?InputChannel admin_rights:flags.14?ChatAdminRights default_banned_rights:flags.18?ChatBannedRights = Chat;
chatForbidden#7328bdb id:int title:string = Chat; chatForbidden#6592a1a7 id:long title:string = Chat;
channel#d31a961e flags:# creator:flags.0?true left:flags.2?true broadcast:flags.5?true verified:flags.7?true megagroup:flags.8?true restricted:flags.9?true signatures:flags.11?true min:flags.12?true scam:flags.19?true has_link:flags.20?true has_geo:flags.21?true slowmode_enabled:flags.22?true call_active:flags.23?true call_not_empty:flags.24?true fake:flags.25?true gigagroup:flags.26?true id:int access_hash:flags.13?long title:string username:flags.6?string photo:ChatPhoto date:int version:int restriction_reason:flags.9?Vector<RestrictionReason> admin_rights:flags.14?ChatAdminRights banned_rights:flags.15?ChatBannedRights default_banned_rights:flags.18?ChatBannedRights participants_count:flags.17?int = Chat; channel#8261ac61 flags:# creator:flags.0?true left:flags.2?true broadcast:flags.5?true verified:flags.7?true megagroup:flags.8?true restricted:flags.9?true signatures:flags.11?true min:flags.12?true scam:flags.19?true has_link:flags.20?true has_geo:flags.21?true slowmode_enabled:flags.22?true call_active:flags.23?true call_not_empty:flags.24?true fake:flags.25?true gigagroup:flags.26?true id:long access_hash:flags.13?long title:string username:flags.6?string photo:ChatPhoto date:int restriction_reason:flags.9?Vector<RestrictionReason> admin_rights:flags.14?ChatAdminRights banned_rights:flags.15?ChatBannedRights default_banned_rights:flags.18?ChatBannedRights participants_count:flags.17?int = Chat;
channelForbidden#289da732 flags:# broadcast:flags.5?true megagroup:flags.8?true id:int access_hash:long title:string until_date:flags.16?int = Chat; channelForbidden#17d493d5 flags:# broadcast:flags.5?true megagroup:flags.8?true id:long access_hash:long title:string until_date:flags.16?int = Chat;
chatFull#49a0a5d9 flags:# can_set_username:flags.7?true has_scheduled:flags.8?true id:int about:string participants:ChatParticipants chat_photo:flags.2?Photo notify_settings:PeerNotifySettings exported_invite:flags.13?ExportedChatInvite bot_info:flags.3?Vector<BotInfo> pinned_msg_id:flags.6?int folder_id:flags.11?int call:flags.12?InputGroupCall ttl_period:flags.14?int groupcall_default_join_as:flags.15?Peer theme_emoticon:flags.16?string = ChatFull; chatFull#4dbdc099 flags:# can_set_username:flags.7?true has_scheduled:flags.8?true id:long about:string participants:ChatParticipants chat_photo:flags.2?Photo notify_settings:PeerNotifySettings exported_invite:flags.13?ExportedChatInvite bot_info:flags.3?Vector<BotInfo> pinned_msg_id:flags.6?int folder_id:flags.11?int call:flags.12?InputGroupCall ttl_period:flags.14?int groupcall_default_join_as:flags.15?Peer theme_emoticon:flags.16?string = ChatFull;
channelFull#2f532f3c flags:# can_view_participants:flags.3?true can_set_username:flags.6?true can_set_stickers:flags.7?true hidden_prehistory:flags.10?true can_set_location:flags.16?true has_scheduled:flags.19?true can_view_stats:flags.20?true blocked:flags.22?true id:int about:string participants_count:flags.0?int admins_count:flags.1?int kicked_count:flags.2?int banned_count:flags.2?int online_count:flags.13?int read_inbox_max_id:int read_outbox_max_id:int unread_count:int chat_photo:Photo notify_settings:PeerNotifySettings exported_invite:flags.23?ExportedChatInvite bot_info:Vector<BotInfo> migrated_from_chat_id:flags.4?int migrated_from_max_id:flags.4?int pinned_msg_id:flags.5?int stickerset:flags.8?StickerSet available_min_id:flags.9?int folder_id:flags.11?int linked_chat_id:flags.14?int location:flags.15?ChannelLocation slowmode_seconds:flags.17?int slowmode_next_send_date:flags.18?int stats_dc:flags.12?int pts:int call:flags.21?InputGroupCall ttl_period:flags.24?int pending_suggestions:flags.25?Vector<string> groupcall_default_join_as:flags.26?Peer theme_emoticon:flags.27?string = ChatFull; channelFull#e9b27a17 flags:# can_view_participants:flags.3?true can_set_username:flags.6?true can_set_stickers:flags.7?true hidden_prehistory:flags.10?true can_set_location:flags.16?true has_scheduled:flags.19?true can_view_stats:flags.20?true blocked:flags.22?true id:long about:string participants_count:flags.0?int admins_count:flags.1?int kicked_count:flags.2?int banned_count:flags.2?int online_count:flags.13?int read_inbox_max_id:int read_outbox_max_id:int unread_count:int chat_photo:Photo notify_settings:PeerNotifySettings exported_invite:flags.23?ExportedChatInvite bot_info:Vector<BotInfo> migrated_from_chat_id:flags.4?long migrated_from_max_id:flags.4?int pinned_msg_id:flags.5?int stickerset:flags.8?StickerSet available_min_id:flags.9?int folder_id:flags.11?int linked_chat_id:flags.14?long location:flags.15?ChannelLocation slowmode_seconds:flags.17?int slowmode_next_send_date:flags.18?int stats_dc:flags.12?int pts:int call:flags.21?InputGroupCall ttl_period:flags.24?int pending_suggestions:flags.25?Vector<string> groupcall_default_join_as:flags.26?Peer theme_emoticon:flags.27?string = ChatFull;
chatParticipant#c8d7493e user_id:int inviter_id:int date:int = ChatParticipant; chatParticipant#c02d4007 user_id:long inviter_id:long date:int = ChatParticipant;
chatParticipantCreator#da13538a user_id:int = ChatParticipant; chatParticipantCreator#e46bcee4 user_id:long = ChatParticipant;
chatParticipantAdmin#e2d6e436 user_id:int inviter_id:int date:int = ChatParticipant; chatParticipantAdmin#a0933f5b user_id:long inviter_id:long date:int = ChatParticipant;
chatParticipantsForbidden#fc900c2b flags:# chat_id:int self_participant:flags.0?ChatParticipant = ChatParticipants; chatParticipantsForbidden#8763d3e1 flags:# chat_id:long self_participant:flags.0?ChatParticipant = ChatParticipants;
chatParticipants#3f460fed chat_id:int participants:Vector<ChatParticipant> version:int = ChatParticipants; chatParticipants#3cbc93f8 chat_id:long participants:Vector<ChatParticipant> version:int = ChatParticipants;
chatPhotoEmpty#37c1011c = ChatPhoto; chatPhotoEmpty#37c1011c = ChatPhoto;
chatPhoto#1c6e1c11 flags:# has_video:flags.0?true photo_id:long stripped_thumb:flags.1?bytes dc_id:int = ChatPhoto; chatPhoto#1c6e1c11 flags:# has_video:flags.0?true photo_id:long stripped_thumb:flags.1?bytes dc_id:int = ChatPhoto;
messageEmpty#90a6ca84 flags:# id:int peer_id:flags.0?Peer = Message; messageEmpty#90a6ca84 flags:# id:int peer_id:flags.0?Peer = Message;
message#bce383d2 flags:# out:flags.1?true mentioned:flags.4?true media_unread:flags.5?true silent:flags.13?true post:flags.14?true from_scheduled:flags.18?true legacy:flags.19?true edit_hide:flags.21?true pinned:flags.24?true id:int from_id:flags.8?Peer peer_id:Peer fwd_from:flags.2?MessageFwdHeader via_bot_id:flags.11?int reply_to:flags.3?MessageReplyHeader date:int message:string media:flags.9?MessageMedia reply_markup:flags.6?ReplyMarkup entities:flags.7?Vector<MessageEntity> views:flags.10?int forwards:flags.10?int replies:flags.23?MessageReplies edit_date:flags.15?int post_author:flags.16?string grouped_id:flags.17?long restriction_reason:flags.22?Vector<RestrictionReason> ttl_period:flags.25?int = Message; message#85d6cbe2 flags:# out:flags.1?true mentioned:flags.4?true media_unread:flags.5?true silent:flags.13?true post:flags.14?true from_scheduled:flags.18?true legacy:flags.19?true edit_hide:flags.21?true pinned:flags.24?true id:int from_id:flags.8?Peer peer_id:Peer fwd_from:flags.2?MessageFwdHeader via_bot_id:flags.11?long reply_to:flags.3?MessageReplyHeader date:int message:string media:flags.9?MessageMedia reply_markup:flags.6?ReplyMarkup entities:flags.7?Vector<MessageEntity> views:flags.10?int forwards:flags.10?int replies:flags.23?MessageReplies edit_date:flags.15?int post_author:flags.16?string grouped_id:flags.17?long restriction_reason:flags.22?Vector<RestrictionReason> ttl_period:flags.25?int = Message;
messageService#2b085862 flags:# out:flags.1?true mentioned:flags.4?true media_unread:flags.5?true silent:flags.13?true post:flags.14?true legacy:flags.19?true id:int from_id:flags.8?Peer peer_id:Peer reply_to:flags.3?MessageReplyHeader date:int action:MessageAction ttl_period:flags.25?int = Message; messageService#2b085862 flags:# out:flags.1?true mentioned:flags.4?true media_unread:flags.5?true silent:flags.13?true post:flags.14?true legacy:flags.19?true id:int from_id:flags.8?Peer peer_id:Peer reply_to:flags.3?MessageReplyHeader date:int action:MessageAction ttl_period:flags.25?int = Message;
messageMediaEmpty#3ded6320 = MessageMedia; messageMediaEmpty#3ded6320 = MessageMedia;
messageMediaPhoto#695150d7 flags:# photo:flags.0?Photo ttl_seconds:flags.2?int = MessageMedia; messageMediaPhoto#695150d7 flags:# photo:flags.0?Photo ttl_seconds:flags.2?int = MessageMedia;
messageMediaGeo#56e0d474 geo:GeoPoint = MessageMedia; messageMediaGeo#56e0d474 geo:GeoPoint = MessageMedia;
messageMediaContact#cbf24940 phone_number:string first_name:string last_name:string vcard:string user_id:int = MessageMedia; messageMediaContact#70322949 phone_number:string first_name:string last_name:string vcard:string user_id:long = MessageMedia;
messageMediaUnsupported#9f84f49e = MessageMedia; messageMediaUnsupported#9f84f49e = MessageMedia;
messageMediaDocument#9cb070d7 flags:# document:flags.0?Document ttl_seconds:flags.2?int = MessageMedia; messageMediaDocument#9cb070d7 flags:# document:flags.0?Document ttl_seconds:flags.2?int = MessageMedia;
messageMediaWebPage#a32dd600 webpage:WebPage = MessageMedia; messageMediaWebPage#a32dd600 webpage:WebPage = MessageMedia;
@ -150,16 +150,16 @@ messageMediaPoll#4bd6e798 poll:Poll results:PollResults = MessageMedia;
messageMediaDice#3f7ee58b value:int emoticon:string = MessageMedia; messageMediaDice#3f7ee58b value:int emoticon:string = MessageMedia;
messageActionEmpty#b6aef7b0 = MessageAction; messageActionEmpty#b6aef7b0 = MessageAction;
messageActionChatCreate#a6638b9a title:string users:Vector<int> = MessageAction; messageActionChatCreate#bd47cbad title:string users:Vector<long> = MessageAction;
messageActionChatEditTitle#b5a1ce5a title:string = MessageAction; messageActionChatEditTitle#b5a1ce5a title:string = MessageAction;
messageActionChatEditPhoto#7fcb13a8 photo:Photo = MessageAction; messageActionChatEditPhoto#7fcb13a8 photo:Photo = MessageAction;
messageActionChatDeletePhoto#95e3fbef = MessageAction; messageActionChatDeletePhoto#95e3fbef = MessageAction;
messageActionChatAddUser#488a7337 users:Vector<int> = MessageAction; messageActionChatAddUser#15cefd00 users:Vector<long> = MessageAction;
messageActionChatDeleteUser#b2ae9b0c user_id:int = MessageAction; messageActionChatDeleteUser#a43f30cc user_id:long = MessageAction;
messageActionChatJoinedByLink#f89cf5e8 inviter_id:int = MessageAction; messageActionChatJoinedByLink#31224c3 inviter_id:long = MessageAction;
messageActionChannelCreate#95d2ac92 title:string = MessageAction; messageActionChannelCreate#95d2ac92 title:string = MessageAction;
messageActionChatMigrateTo#51bdb021 channel_id:int = MessageAction; messageActionChatMigrateTo#e1037f92 channel_id:long = MessageAction;
messageActionChannelMigrateFrom#b055eaee title:string chat_id:int = MessageAction; messageActionChannelMigrateFrom#ea3948e9 title:string chat_id:long = MessageAction;
messageActionPinMessage#94bd38ed = MessageAction; messageActionPinMessage#94bd38ed = MessageAction;
messageActionHistoryClear#9fbab604 = MessageAction; messageActionHistoryClear#9fbab604 = MessageAction;
messageActionGameScore#92a72876 game_id:long score:int = MessageAction; messageActionGameScore#92a72876 game_id:long score:int = MessageAction;
@ -174,7 +174,7 @@ messageActionSecureValuesSent#d95c6154 types:Vector<SecureValueType> = MessageAc
messageActionContactSignUp#f3f25f76 = MessageAction; messageActionContactSignUp#f3f25f76 = MessageAction;
messageActionGeoProximityReached#98e0d697 from_id:Peer to_id:Peer distance:int = MessageAction; messageActionGeoProximityReached#98e0d697 from_id:Peer to_id:Peer distance:int = MessageAction;
messageActionGroupCall#7a0d7f42 flags:# call:InputGroupCall duration:flags.0?int = MessageAction; messageActionGroupCall#7a0d7f42 flags:# call:InputGroupCall duration:flags.0?int = MessageAction;
messageActionInviteToGroupCall#76b9f11a call:InputGroupCall users:Vector<int> = MessageAction; messageActionInviteToGroupCall#502f92f7 call:InputGroupCall users:Vector<long> = MessageAction;
messageActionSetMessagesTTL#aa1afbfd period:int = MessageAction; messageActionSetMessagesTTL#aa1afbfd period:int = MessageAction;
messageActionGroupCallScheduled#b3a07661 call:InputGroupCall schedule_date:int = MessageAction; messageActionGroupCallScheduled#b3a07661 call:InputGroupCall schedule_date:int = MessageAction;
messageActionSetChatTheme#aa786345 emoticon:string = MessageAction; messageActionSetChatTheme#aa786345 emoticon:string = MessageAction;
@ -200,7 +200,7 @@ auth.sentCode#5e002502 flags:# type:auth.SentCodeType phone_code_hash:string nex
auth.authorization#cd050916 flags:# tmp_sessions:flags.0?int user:User = auth.Authorization; auth.authorization#cd050916 flags:# tmp_sessions:flags.0?int user:User = auth.Authorization;
auth.authorizationSignUpRequired#44747e9a flags:# terms_of_service:flags.0?help.TermsOfService = auth.Authorization; auth.authorizationSignUpRequired#44747e9a flags:# terms_of_service:flags.0?help.TermsOfService = auth.Authorization;
auth.exportedAuthorization#df969c2d id:int bytes:bytes = auth.ExportedAuthorization; auth.exportedAuthorization#b434e2b8 id:long bytes:bytes = auth.ExportedAuthorization;
inputNotifyPeer#b8bc5b0c peer:InputPeer = InputNotifyPeer; inputNotifyPeer#b8bc5b0c peer:InputPeer = InputNotifyPeer;
inputNotifyUsers#193b4417 = InputNotifyPeer; inputNotifyUsers#193b4417 = InputNotifyPeer;
@ -227,11 +227,11 @@ inputReportReasonFake#f5ddd6e7 = ReportReason;
userFull#d697ff05 flags:# blocked:flags.0?true phone_calls_available:flags.4?true phone_calls_private:flags.5?true can_pin_message:flags.7?true has_scheduled:flags.12?true video_calls_available:flags.13?true user:User about:flags.1?string settings:PeerSettings profile_photo:flags.2?Photo notify_settings:PeerNotifySettings bot_info:flags.3?BotInfo pinned_msg_id:flags.6?int common_chats_count:int folder_id:flags.11?int ttl_period:flags.14?int theme_emoticon:flags.15?string = UserFull; userFull#d697ff05 flags:# blocked:flags.0?true phone_calls_available:flags.4?true phone_calls_private:flags.5?true can_pin_message:flags.7?true has_scheduled:flags.12?true video_calls_available:flags.13?true user:User about:flags.1?string settings:PeerSettings profile_photo:flags.2?Photo notify_settings:PeerNotifySettings bot_info:flags.3?BotInfo pinned_msg_id:flags.6?int common_chats_count:int folder_id:flags.11?int ttl_period:flags.14?int theme_emoticon:flags.15?string = UserFull;
contact#f911c994 user_id:int mutual:Bool = Contact; contact#145ade0b user_id:long mutual:Bool = Contact;
importedContact#d0028438 user_id:int client_id:long = ImportedContact; importedContact#c13e3c50 user_id:long client_id:long = ImportedContact;
contactStatus#d3680c61 user_id:int status:UserStatus = ContactStatus; contactStatus#16d9703b user_id:long status:UserStatus = ContactStatus;
contacts.contactsNotModified#b74ba9d2 = contacts.Contacts; contacts.contactsNotModified#b74ba9d2 = contacts.Contacts;
contacts.contacts#eae87e42 contacts:Vector<Contact> saved_count:int users:Vector<User> = contacts.Contacts; contacts.contacts#eae87e42 contacts:Vector<Contact> saved_count:int users:Vector<User> = contacts.Contacts;
@ -278,64 +278,64 @@ inputMessagesFilterPinned#1bb00451 = MessagesFilter;
updateNewMessage#1f2b0afd message:Message pts:int pts_count:int = Update; updateNewMessage#1f2b0afd message:Message pts:int pts_count:int = Update;
updateMessageID#4e90bfd6 id:int random_id:long = Update; updateMessageID#4e90bfd6 id:int random_id:long = Update;
updateDeleteMessages#a20db0e5 messages:Vector<int> pts:int pts_count:int = Update; updateDeleteMessages#a20db0e5 messages:Vector<int> pts:int pts_count:int = Update;
updateUserTyping#5c486927 user_id:int action:SendMessageAction = Update; updateUserTyping#c01e857f user_id:long action:SendMessageAction = Update;
updateChatUserTyping#86cadb6c chat_id:int from_id:Peer action:SendMessageAction = Update; updateChatUserTyping#83487af0 chat_id:long from_id:Peer action:SendMessageAction = Update;
updateChatParticipants#7761198 participants:ChatParticipants = Update; updateChatParticipants#7761198 participants:ChatParticipants = Update;
updateUserStatus#1bfbd823 user_id:int status:UserStatus = Update; updateUserStatus#e5bdf8de user_id:long status:UserStatus = Update;
updateUserName#a7332b73 user_id:int first_name:string last_name:string username:string = Update; updateUserName#c3f202e0 user_id:long first_name:string last_name:string username:string = Update;
updateUserPhoto#95313b0c user_id:int date:int photo:UserProfilePhoto previous:Bool = Update; updateUserPhoto#f227868c user_id:long date:int photo:UserProfilePhoto previous:Bool = Update;
updateNewEncryptedMessage#12bcbd9a message:EncryptedMessage qts:int = Update; updateNewEncryptedMessage#12bcbd9a message:EncryptedMessage qts:int = Update;
updateEncryptedChatTyping#1710f156 chat_id:int = Update; updateEncryptedChatTyping#1710f156 chat_id:int = Update;
updateEncryption#b4a2e88d chat:EncryptedChat date:int = Update; updateEncryption#b4a2e88d chat:EncryptedChat date:int = Update;
updateEncryptedMessagesRead#38fe25b7 chat_id:int max_date:int date:int = Update; updateEncryptedMessagesRead#38fe25b7 chat_id:int max_date:int date:int = Update;
updateChatParticipantAdd#ea4b0e5c chat_id:int user_id:int inviter_id:int date:int version:int = Update; updateChatParticipantAdd#3dda5451 chat_id:long user_id:long inviter_id:long date:int version:int = Update;
updateChatParticipantDelete#6e5f8c22 chat_id:int user_id:int version:int = Update; updateChatParticipantDelete#e32f3d77 chat_id:long user_id:long version:int = Update;
updateDcOptions#8e5e9873 dc_options:Vector<DcOption> = Update; updateDcOptions#8e5e9873 dc_options:Vector<DcOption> = Update;
updateNotifySettings#bec268ef peer:NotifyPeer notify_settings:PeerNotifySettings = Update; updateNotifySettings#bec268ef peer:NotifyPeer notify_settings:PeerNotifySettings = Update;
updateServiceNotification#ebe46819 flags:# popup:flags.0?true inbox_date:flags.1?int type:string message:string media:MessageMedia entities:Vector<MessageEntity> = Update; updateServiceNotification#ebe46819 flags:# popup:flags.0?true inbox_date:flags.1?int type:string message:string media:MessageMedia entities:Vector<MessageEntity> = Update;
updatePrivacy#ee3b272a key:PrivacyKey rules:Vector<PrivacyRule> = Update; updatePrivacy#ee3b272a key:PrivacyKey rules:Vector<PrivacyRule> = Update;
updateUserPhone#12b9417b user_id:int phone:string = Update; updateUserPhone#5492a13 user_id:long phone:string = Update;
updateReadHistoryInbox#9c974fdf flags:# folder_id:flags.0?int peer:Peer max_id:int still_unread_count:int pts:int pts_count:int = Update; updateReadHistoryInbox#9c974fdf flags:# folder_id:flags.0?int peer:Peer max_id:int still_unread_count:int pts:int pts_count:int = Update;
updateReadHistoryOutbox#2f2f21bf peer:Peer max_id:int pts:int pts_count:int = Update; updateReadHistoryOutbox#2f2f21bf peer:Peer max_id:int pts:int pts_count:int = Update;
updateWebPage#7f891213 webpage:WebPage pts:int pts_count:int = Update; updateWebPage#7f891213 webpage:WebPage pts:int pts_count:int = Update;
updateReadMessagesContents#68c13933 messages:Vector<int> pts:int pts_count:int = Update; updateReadMessagesContents#68c13933 messages:Vector<int> pts:int pts_count:int = Update;
updateChannelTooLong#eb0467fb flags:# channel_id:int pts:flags.0?int = Update; updateChannelTooLong#108d941f flags:# channel_id:long pts:flags.0?int = Update;
updateChannel#b6d45656 channel_id:int = Update; updateChannel#635b4c09 channel_id:long = Update;
updateNewChannelMessage#62ba04d9 message:Message pts:int pts_count:int = Update; updateNewChannelMessage#62ba04d9 message:Message pts:int pts_count:int = Update;
updateReadChannelInbox#330b5424 flags:# folder_id:flags.0?int channel_id:int max_id:int still_unread_count:int pts:int = Update; updateReadChannelInbox#922e6e10 flags:# folder_id:flags.0?int channel_id:long max_id:int still_unread_count:int pts:int = Update;
updateDeleteChannelMessages#c37521c9 channel_id:int messages:Vector<int> pts:int pts_count:int = Update; updateDeleteChannelMessages#c32d5b12 channel_id:long messages:Vector<int> pts:int pts_count:int = Update;
updateChannelMessageViews#98a12b4b channel_id:int id:int views:int = Update; updateChannelMessageViews#f226ac08 channel_id:long id:int views:int = Update;
updateChatParticipantAdmin#b6901959 chat_id:int user_id:int is_admin:Bool version:int = Update; updateChatParticipantAdmin#d7ca61a2 chat_id:long user_id:long is_admin:Bool version:int = Update;
updateNewStickerSet#688a30aa stickerset:messages.StickerSet = Update; updateNewStickerSet#688a30aa stickerset:messages.StickerSet = Update;
updateStickerSetsOrder#bb2d201 flags:# masks:flags.0?true order:Vector<long> = Update; updateStickerSetsOrder#bb2d201 flags:# masks:flags.0?true order:Vector<long> = Update;
updateStickerSets#43ae3dec = Update; updateStickerSets#43ae3dec = Update;
updateSavedGifs#9375341e = Update; updateSavedGifs#9375341e = Update;
updateBotInlineQuery#3f2038db flags:# query_id:long user_id:int query:string geo:flags.0?GeoPoint peer_type:flags.1?InlineQueryPeerType offset:string = Update; updateBotInlineQuery#496f379c flags:# query_id:long user_id:long query:string geo:flags.0?GeoPoint peer_type:flags.1?InlineQueryPeerType offset:string = Update;
updateBotInlineSend#e48f964 flags:# user_id:int query:string geo:flags.0?GeoPoint id:string msg_id:flags.1?InputBotInlineMessageID = Update; updateBotInlineSend#12f12a07 flags:# user_id:long query:string geo:flags.0?GeoPoint id:string msg_id:flags.1?InputBotInlineMessageID = Update;
updateEditChannelMessage#1b3f4df7 message:Message pts:int pts_count:int = Update; updateEditChannelMessage#1b3f4df7 message:Message pts:int pts_count:int = Update;
updateBotCallbackQuery#e73547e1 flags:# query_id:long user_id:int peer:Peer msg_id:int chat_instance:long data:flags.0?bytes game_short_name:flags.1?string = Update; updateBotCallbackQuery#b9cfc48d flags:# query_id:long user_id:long peer:Peer msg_id:int chat_instance:long data:flags.0?bytes game_short_name:flags.1?string = Update;
updateEditMessage#e40370a3 message:Message pts:int pts_count:int = Update; updateEditMessage#e40370a3 message:Message pts:int pts_count:int = Update;
updateInlineBotCallbackQuery#f9d27a5a flags:# query_id:long user_id:int msg_id:InputBotInlineMessageID chat_instance:long data:flags.0?bytes game_short_name:flags.1?string = Update; updateInlineBotCallbackQuery#691e9052 flags:# query_id:long user_id:long msg_id:InputBotInlineMessageID chat_instance:long data:flags.0?bytes game_short_name:flags.1?string = Update;
updateReadChannelOutbox#25d6c9c7 channel_id:int max_id:int = Update; updateReadChannelOutbox#b75f99a9 channel_id:long max_id:int = Update;
updateDraftMessage#ee2bb969 peer:Peer draft:DraftMessage = Update; updateDraftMessage#ee2bb969 peer:Peer draft:DraftMessage = Update;
updateReadFeaturedStickers#571d2742 = Update; updateReadFeaturedStickers#571d2742 = Update;
updateRecentStickers#9a422c20 = Update; updateRecentStickers#9a422c20 = Update;
updateConfig#a229dd06 = Update; updateConfig#a229dd06 = Update;
updatePtsChanged#3354678f = Update; updatePtsChanged#3354678f = Update;
updateChannelWebPage#40771900 channel_id:int webpage:WebPage pts:int pts_count:int = Update; updateChannelWebPage#2f2ba99f channel_id:long webpage:WebPage pts:int pts_count:int = Update;
updateDialogPinned#6e6fe51c flags:# pinned:flags.0?true folder_id:flags.1?int peer:DialogPeer = Update; updateDialogPinned#6e6fe51c flags:# pinned:flags.0?true folder_id:flags.1?int peer:DialogPeer = Update;
updatePinnedDialogs#fa0f3ca2 flags:# folder_id:flags.1?int order:flags.0?Vector<DialogPeer> = Update; updatePinnedDialogs#fa0f3ca2 flags:# folder_id:flags.1?int order:flags.0?Vector<DialogPeer> = Update;
updateBotWebhookJSON#8317c0c3 data:DataJSON = Update; updateBotWebhookJSON#8317c0c3 data:DataJSON = Update;
updateBotWebhookJSONQuery#9b9240a6 query_id:long data:DataJSON timeout:int = Update; updateBotWebhookJSONQuery#9b9240a6 query_id:long data:DataJSON timeout:int = Update;
updateBotShippingQuery#e0cdc940 query_id:long user_id:int payload:bytes shipping_address:PostAddress = Update; updateBotShippingQuery#b5aefd7d query_id:long user_id:long payload:bytes shipping_address:PostAddress = Update;
updateBotPrecheckoutQuery#5d2f3aa9 flags:# query_id:long user_id:int payload:bytes info:flags.0?PaymentRequestedInfo shipping_option_id:flags.1?string currency:string total_amount:long = Update; updateBotPrecheckoutQuery#8caa9a96 flags:# query_id:long user_id:long payload:bytes info:flags.0?PaymentRequestedInfo shipping_option_id:flags.1?string currency:string total_amount:long = Update;
updatePhoneCall#ab0f6b1e phone_call:PhoneCall = Update; updatePhoneCall#ab0f6b1e phone_call:PhoneCall = Update;
updateLangPackTooLong#46560264 lang_code:string = Update; updateLangPackTooLong#46560264 lang_code:string = Update;
updateLangPack#56022f4d difference:LangPackDifference = Update; updateLangPack#56022f4d difference:LangPackDifference = Update;
updateFavedStickers#e511996d = Update; updateFavedStickers#e511996d = Update;
updateChannelReadMessagesContents#89893b45 channel_id:int messages:Vector<int> = Update; updateChannelReadMessagesContents#44bdd535 channel_id:long messages:Vector<int> = Update;
updateContactsReset#7084a7be = Update; updateContactsReset#7084a7be = Update;
updateChannelAvailableMessages#70db6837 channel_id:int available_min_id:int = Update; updateChannelAvailableMessages#b23fc698 channel_id:long available_min_id:int = Update;
updateDialogUnreadMark#e16459c3 flags:# unread:flags.0?true peer:DialogPeer = Update; updateDialogUnreadMark#e16459c3 flags:# unread:flags.0?true peer:DialogPeer = Update;
updateMessagePoll#aca1657b flags:# poll_id:long poll:flags.0?Poll results:PollResults = Update; updateMessagePoll#aca1657b flags:# poll_id:long poll:flags.0?Poll results:PollResults = Update;
updateChatDefaultBannedRights#54c01850 peer:Peer default_banned_rights:ChatBannedRights version:int = Update; updateChatDefaultBannedRights#54c01850 peer:Peer default_banned_rights:ChatBannedRights version:int = Update;
@ -347,27 +347,27 @@ updateDeleteScheduledMessages#90866cee peer:Peer messages:Vector<int> = Update;
updateTheme#8216fba3 theme:Theme = Update; updateTheme#8216fba3 theme:Theme = Update;
updateGeoLiveViewed#871fb939 peer:Peer msg_id:int = Update; updateGeoLiveViewed#871fb939 peer:Peer msg_id:int = Update;
updateLoginToken#564fe691 = Update; updateLoginToken#564fe691 = Update;
updateMessagePollVote#37f69f0b poll_id:long user_id:int options:Vector<bytes> qts:int = Update; updateMessagePollVote#106395c9 poll_id:long user_id:long options:Vector<bytes> qts:int = Update;
updateDialogFilter#26ffde7d flags:# id:int filter:flags.0?DialogFilter = Update; updateDialogFilter#26ffde7d flags:# id:int filter:flags.0?DialogFilter = Update;
updateDialogFilterOrder#a5d72105 order:Vector<int> = Update; updateDialogFilterOrder#a5d72105 order:Vector<int> = Update;
updateDialogFilters#3504914f = Update; updateDialogFilters#3504914f = Update;
updatePhoneCallSignalingData#2661bf09 phone_call_id:long data:bytes = Update; updatePhoneCallSignalingData#2661bf09 phone_call_id:long data:bytes = Update;
updateChannelMessageForwards#6e8a84df channel_id:int id:int forwards:int = Update; updateChannelMessageForwards#d29a27f4 channel_id:long id:int forwards:int = Update;
updateReadChannelDiscussionInbox#1cc7de54 flags:# channel_id:int top_msg_id:int read_max_id:int broadcast_id:flags.0?int broadcast_post:flags.0?int = Update; updateReadChannelDiscussionInbox#d6b19546 flags:# channel_id:long top_msg_id:int read_max_id:int broadcast_id:flags.0?long broadcast_post:flags.0?int = Update;
updateReadChannelDiscussionOutbox#4638a26c channel_id:int top_msg_id:int read_max_id:int = Update; updateReadChannelDiscussionOutbox#695c9e7c channel_id:long top_msg_id:int read_max_id:int = Update;
updatePeerBlocked#246a4b22 peer_id:Peer blocked:Bool = Update; updatePeerBlocked#246a4b22 peer_id:Peer blocked:Bool = Update;
updateChannelUserTyping#6b171718 flags:# channel_id:int top_msg_id:flags.0?int from_id:Peer action:SendMessageAction = Update; updateChannelUserTyping#8c88c923 flags:# channel_id:long top_msg_id:flags.0?int from_id:Peer action:SendMessageAction = Update;
updatePinnedMessages#ed85eab5 flags:# pinned:flags.0?true peer:Peer messages:Vector<int> pts:int pts_count:int = Update; updatePinnedMessages#ed85eab5 flags:# pinned:flags.0?true peer:Peer messages:Vector<int> pts:int pts_count:int = Update;
updatePinnedChannelMessages#8588878b flags:# pinned:flags.0?true channel_id:int messages:Vector<int> pts:int pts_count:int = Update; updatePinnedChannelMessages#5bb98608 flags:# pinned:flags.0?true channel_id:long messages:Vector<int> pts:int pts_count:int = Update;
updateChat#1330a196 chat_id:int = Update; updateChat#f89a6a4e chat_id:long = Update;
updateGroupCallParticipants#f2ebdb4e call:InputGroupCall participants:Vector<GroupCallParticipant> version:int = Update; updateGroupCallParticipants#f2ebdb4e call:InputGroupCall participants:Vector<GroupCallParticipant> version:int = Update;
updateGroupCall#a45eb99b chat_id:int call:GroupCall = Update; updateGroupCall#14b24500 chat_id:long call:GroupCall = Update;
updatePeerHistoryTTL#bb9bb9a5 flags:# peer:Peer ttl_period:flags.0?int = Update; updatePeerHistoryTTL#bb9bb9a5 flags:# peer:Peer ttl_period:flags.0?int = Update;
updateChatParticipant#f3b3781f flags:# chat_id:int date:int actor_id:int user_id:int prev_participant:flags.0?ChatParticipant new_participant:flags.1?ChatParticipant invite:flags.2?ExportedChatInvite qts:int = Update; updateChatParticipant#d087663a flags:# chat_id:long date:int actor_id:long user_id:long prev_participant:flags.0?ChatParticipant new_participant:flags.1?ChatParticipant invite:flags.2?ExportedChatInvite qts:int = Update;
updateChannelParticipant#7fecb1ec flags:# channel_id:int date:int actor_id:int user_id:int prev_participant:flags.0?ChannelParticipant new_participant:flags.1?ChannelParticipant invite:flags.2?ExportedChatInvite qts:int = Update; updateChannelParticipant#985d3abb flags:# channel_id:long date:int actor_id:long user_id:long prev_participant:flags.0?ChannelParticipant new_participant:flags.1?ChannelParticipant invite:flags.2?ExportedChatInvite qts:int = Update;
updateBotStopped#7f9488a user_id:int date:int stopped:Bool qts:int = Update; updateBotStopped#c4870a49 user_id:long date:int stopped:Bool qts:int = Update;
updateGroupCallConnection#b783982 flags:# presentation:flags.0?true params:DataJSON = Update; updateGroupCallConnection#b783982 flags:# presentation:flags.0?true params:DataJSON = Update;
updateBotCommands#cf7e0873 peer:Peer bot_id:int commands:Vector<BotCommand> = Update; updateBotCommands#4d712f2e peer:Peer bot_id:long commands:Vector<BotCommand> = Update;
updates.state#a56c2a3e pts:int qts:int date:int seq:int unread_count:int = updates.State; updates.state#a56c2a3e pts:int qts:int date:int seq:int unread_count:int = updates.State;
@ -377,8 +377,8 @@ updates.differenceSlice#a8fb1981 new_messages:Vector<Message> new_encrypted_mess
updates.differenceTooLong#4afe8f6d pts:int = updates.Difference; updates.differenceTooLong#4afe8f6d pts:int = updates.Difference;
updatesTooLong#e317af7e = Updates; updatesTooLong#e317af7e = Updates;
updateShortMessage#faeff833 flags:# out:flags.1?true mentioned:flags.4?true media_unread:flags.5?true silent:flags.13?true id:int user_id:int message:string pts:int pts_count:int date:int fwd_from:flags.2?MessageFwdHeader via_bot_id:flags.11?int reply_to:flags.3?MessageReplyHeader entities:flags.7?Vector<MessageEntity> ttl_period:flags.25?int = Updates; updateShortMessage#313bc7f8 flags:# out:flags.1?true mentioned:flags.4?true media_unread:flags.5?true silent:flags.13?true id:int user_id:long message:string pts:int pts_count:int date:int fwd_from:flags.2?MessageFwdHeader via_bot_id:flags.11?long reply_to:flags.3?MessageReplyHeader entities:flags.7?Vector<MessageEntity> ttl_period:flags.25?int = Updates;
updateShortChatMessage#1157b858 flags:# out:flags.1?true mentioned:flags.4?true media_unread:flags.5?true silent:flags.13?true id:int from_id:int chat_id:int message:string pts:int pts_count:int date:int fwd_from:flags.2?MessageFwdHeader via_bot_id:flags.11?int reply_to:flags.3?MessageReplyHeader entities:flags.7?Vector<MessageEntity> ttl_period:flags.25?int = Updates; updateShortChatMessage#4d6deea5 flags:# out:flags.1?true mentioned:flags.4?true media_unread:flags.5?true silent:flags.13?true id:int from_id:long chat_id:long message:string pts:int pts_count:int date:int fwd_from:flags.2?MessageFwdHeader via_bot_id:flags.11?long reply_to:flags.3?MessageReplyHeader entities:flags.7?Vector<MessageEntity> ttl_period:flags.25?int = Updates;
updateShort#78d4dec1 update:Update date:int = Updates; updateShort#78d4dec1 update:Update date:int = Updates;
updatesCombined#725b04c3 updates:Vector<Update> users:Vector<User> chats:Vector<Chat> date:int seq_start:int seq:int = Updates; updatesCombined#725b04c3 updates:Vector<Update> users:Vector<User> chats:Vector<Chat> date:int seq_start:int seq:int = Updates;
updates#74ae4240 updates:Vector<Update> users:Vector<User> chats:Vector<Chat> date:int seq:int = Updates; updates#74ae4240 updates:Vector<Update> users:Vector<User> chats:Vector<Chat> date:int seq:int = Updates;
@ -404,9 +404,9 @@ help.noAppUpdate#c45a6536 = help.AppUpdate;
help.inviteText#18cb9f78 message:string = help.InviteText; help.inviteText#18cb9f78 message:string = help.InviteText;
encryptedChatEmpty#ab7ec0a0 id:int = EncryptedChat; encryptedChatEmpty#ab7ec0a0 id:int = EncryptedChat;
encryptedChatWaiting#3bf703dc id:int access_hash:long date:int admin_id:int participant_id:int = EncryptedChat; encryptedChatWaiting#66b25953 id:int access_hash:long date:int admin_id:long participant_id:long = EncryptedChat;
encryptedChatRequested#62718a82 flags:# folder_id:flags.0?int id:int access_hash:long date:int admin_id:int participant_id:int g_a:bytes = EncryptedChat; encryptedChatRequested#48f1d94c flags:# folder_id:flags.0?int id:int access_hash:long date:int admin_id:long participant_id:long g_a:bytes = EncryptedChat;
encryptedChat#fa56ce36 id:int access_hash:long date:int admin_id:int participant_id:int g_a_or_b:bytes key_fingerprint:long = EncryptedChat; encryptedChat#61f0d4c7 id:int access_hash:long date:int admin_id:long participant_id:long g_a_or_b:bytes key_fingerprint:long = EncryptedChat;
encryptedChatDiscarded#1e1c7c45 flags:# history_deleted:flags.0?true id:int = EncryptedChat; encryptedChatDiscarded#1e1c7c45 flags:# history_deleted:flags.0?true id:int = EncryptedChat;
inputEncryptedChat#f141b5e1 chat_id:int access_hash:long = InputEncryptedChat; inputEncryptedChat#f141b5e1 chat_id:int access_hash:long = InputEncryptedChat;
@ -457,6 +457,8 @@ sendMessageUploadRoundAction#243e1c66 progress:int = SendMessageAction;
speakingInGroupCallAction#d92c2285 = SendMessageAction; speakingInGroupCallAction#d92c2285 = SendMessageAction;
sendMessageHistoryImportAction#dbda9246 progress:int = SendMessageAction; sendMessageHistoryImportAction#dbda9246 progress:int = SendMessageAction;
sendMessageChooseStickerAction#b05ac6b1 = SendMessageAction; sendMessageChooseStickerAction#b05ac6b1 = SendMessageAction;
sendMessageEmojiInteraction#25972bcb emoticon:string msg_id:int interaction:DataJSON = SendMessageAction;
sendMessageEmojiInteractionSeen#b665902e emoticon:string = SendMessageAction;
contacts.found#b3134d9d my_results:Vector<Peer> results:Vector<Peer> chats:Vector<Chat> users:Vector<User> = contacts.Found; contacts.found#b3134d9d my_results:Vector<Peer> results:Vector<Peer> chats:Vector<Chat> users:Vector<User> = contacts.Found;
@ -484,17 +486,17 @@ inputPrivacyValueAllowUsers#131cc67f users:Vector<InputUser> = InputPrivacyRule;
inputPrivacyValueDisallowContacts#ba52007 = InputPrivacyRule; inputPrivacyValueDisallowContacts#ba52007 = InputPrivacyRule;
inputPrivacyValueDisallowAll#d66b66c9 = InputPrivacyRule; inputPrivacyValueDisallowAll#d66b66c9 = InputPrivacyRule;
inputPrivacyValueDisallowUsers#90110467 users:Vector<InputUser> = InputPrivacyRule; inputPrivacyValueDisallowUsers#90110467 users:Vector<InputUser> = InputPrivacyRule;
inputPrivacyValueAllowChatParticipants#4c81c1ba chats:Vector<int> = InputPrivacyRule; inputPrivacyValueAllowChatParticipants#840649cf chats:Vector<long> = InputPrivacyRule;
inputPrivacyValueDisallowChatParticipants#d82363af chats:Vector<int> = InputPrivacyRule; inputPrivacyValueDisallowChatParticipants#e94f0f86 chats:Vector<long> = InputPrivacyRule;
privacyValueAllowContacts#fffe1bac = PrivacyRule; privacyValueAllowContacts#fffe1bac = PrivacyRule;
privacyValueAllowAll#65427b82 = PrivacyRule; privacyValueAllowAll#65427b82 = PrivacyRule;
privacyValueAllowUsers#4d5bbe0c users:Vector<int> = PrivacyRule; privacyValueAllowUsers#b8905fb2 users:Vector<long> = PrivacyRule;
privacyValueDisallowContacts#f888fa1a = PrivacyRule; privacyValueDisallowContacts#f888fa1a = PrivacyRule;
privacyValueDisallowAll#8b73e763 = PrivacyRule; privacyValueDisallowAll#8b73e763 = PrivacyRule;
privacyValueDisallowUsers#c7f49b7 users:Vector<int> = PrivacyRule; privacyValueDisallowUsers#e4621141 users:Vector<long> = PrivacyRule;
privacyValueAllowChatParticipants#18be796b chats:Vector<int> = PrivacyRule; privacyValueAllowChatParticipants#6b134e8e chats:Vector<long> = PrivacyRule;
privacyValueDisallowChatParticipants#acae0690 chats:Vector<int> = PrivacyRule; privacyValueDisallowChatParticipants#41c87565 chats:Vector<long> = PrivacyRule;
account.privacyRules#50a04e45 rules:Vector<PrivacyRule> chats:Vector<Chat> users:Vector<User> = account.PrivacyRules; account.privacyRules#50a04e45 rules:Vector<PrivacyRule> chats:Vector<Chat> users:Vector<User> = account.PrivacyRules;
@ -509,12 +511,12 @@ documentAttributeFilename#15590068 file_name:string = DocumentAttribute;
documentAttributeHasStickers#9801d2f7 = DocumentAttribute; documentAttributeHasStickers#9801d2f7 = DocumentAttribute;
messages.stickersNotModified#f1749a22 = messages.Stickers; messages.stickersNotModified#f1749a22 = messages.Stickers;
messages.stickers#e4599bbd hash:int stickers:Vector<Document> = messages.Stickers; messages.stickers#30a6ec7e hash:long stickers:Vector<Document> = messages.Stickers;
stickerPack#12b299d4 emoticon:string documents:Vector<long> = StickerPack; stickerPack#12b299d4 emoticon:string documents:Vector<long> = StickerPack;
messages.allStickersNotModified#e86602c3 = messages.AllStickers; messages.allStickersNotModified#e86602c3 = messages.AllStickers;
messages.allStickers#edfd405f hash:int sets:Vector<StickerSet> = messages.AllStickers; messages.allStickers#cdbbcebb hash:long sets:Vector<StickerSet> = messages.AllStickers;
messages.affectedMessages#84d19185 pts:int pts_count:int = messages.AffectedMessages; messages.affectedMessages#84d19185 pts:int pts_count:int = messages.AffectedMessages;
@ -537,7 +539,7 @@ auth.passwordRecovery#137948a5 email_pattern:string = auth.PasswordRecovery;
receivedNotifyMessage#a384b779 id:int flags:int = ReceivedNotifyMessage; receivedNotifyMessage#a384b779 id:int flags:int = ReceivedNotifyMessage;
chatInviteExported#6e24fc9d flags:# revoked:flags.0?true permanent:flags.5?true link:string admin_id:int date:int start_date:flags.4?int expire_date:flags.1?int usage_limit:flags.2?int usage:flags.3?int = ExportedChatInvite; chatInviteExported#b18105e8 flags:# revoked:flags.0?true permanent:flags.5?true link:string admin_id:long date:int start_date:flags.4?int expire_date:flags.1?int usage_limit:flags.2?int usage:flags.3?int = ExportedChatInvite;
chatInviteAlready#5a686d7c chat:Chat = ChatInvite; chatInviteAlready#5a686d7c chat:Chat = ChatInvite;
chatInvite#dfc2f58e flags:# channel:flags.0?true broadcast:flags.1?true public:flags.2?true megagroup:flags.3?true title:string photo:Photo participants_count:int participants:flags.4?Vector<User> = ChatInvite; chatInvite#dfc2f58e flags:# channel:flags.0?true broadcast:flags.1?true public:flags.2?true megagroup:flags.3?true title:string photo:Photo participants_count:int participants:flags.4?Vector<User> = ChatInvite;
@ -548,6 +550,7 @@ inputStickerSetID#9de7a269 id:long access_hash:long = InputStickerSet;
inputStickerSetShortName#861cc8a0 short_name:string = InputStickerSet; inputStickerSetShortName#861cc8a0 short_name:string = InputStickerSet;
inputStickerSetAnimatedEmoji#28703c8 = InputStickerSet; inputStickerSetAnimatedEmoji#28703c8 = InputStickerSet;
inputStickerSetDice#e67f520e emoticon:string = InputStickerSet; inputStickerSetDice#e67f520e emoticon:string = InputStickerSet;
inputStickerSetAnimatedEmojiAnimations#cde3739 = InputStickerSet;
stickerSet#d7df217a flags:# archived:flags.1?true official:flags.2?true masks:flags.3?true animated:flags.5?true installed_date:flags.0?int id:long access_hash:long title:string short_name:string thumbs:flags.4?Vector<PhotoSize> thumb_dc_id:flags.4?int thumb_version:flags.4?int count:int hash:int = StickerSet; stickerSet#d7df217a flags:# archived:flags.1?true official:flags.2?true masks:flags.3?true animated:flags.5?true installed_date:flags.0?int id:long access_hash:long title:string short_name:string thumbs:flags.4?Vector<PhotoSize> thumb_dc_id:flags.4?int thumb_version:flags.4?int count:int hash:int = StickerSet;
@ -555,7 +558,7 @@ messages.stickerSet#b60a24a6 set:StickerSet packs:Vector<StickerPack> documents:
botCommand#c27ac8c7 command:string description:string = BotCommand; botCommand#c27ac8c7 command:string description:string = BotCommand;
botInfo#98e81d3a user_id:int description:string commands:Vector<BotCommand> = BotInfo; botInfo#1b74b335 user_id:long description:string commands:Vector<BotCommand> = BotInfo;
keyboardButton#a2fa4880 text:string = KeyboardButton; keyboardButton#a2fa4880 text:string = KeyboardButton;
keyboardButtonUrl#258aff05 text:string url:string = KeyboardButton; keyboardButtonUrl#258aff05 text:string url:string = KeyboardButton;
@ -587,7 +590,7 @@ messageEntityItalic#826f8b60 offset:int length:int = MessageEntity;
messageEntityCode#28a20571 offset:int length:int = MessageEntity; messageEntityCode#28a20571 offset:int length:int = MessageEntity;
messageEntityPre#73924be0 offset:int length:int language:string = MessageEntity; messageEntityPre#73924be0 offset:int length:int language:string = MessageEntity;
messageEntityTextUrl#76a6d327 offset:int length:int url:string = MessageEntity; messageEntityTextUrl#76a6d327 offset:int length:int url:string = MessageEntity;
messageEntityMentionName#352dca58 offset:int length:int user_id:int = MessageEntity; messageEntityMentionName#dc7b1140 offset:int length:int user_id:long = MessageEntity;
inputMessageEntityMentionName#208e68c9 offset:int length:int user_id:InputUser = MessageEntity; inputMessageEntityMentionName#208e68c9 offset:int length:int user_id:InputUser = MessageEntity;
messageEntityPhone#9b69e34b offset:int length:int = MessageEntity; messageEntityPhone#9b69e34b offset:int length:int = MessageEntity;
messageEntityCashtag#4c4e743f offset:int length:int = MessageEntity; messageEntityCashtag#4c4e743f offset:int length:int = MessageEntity;
@ -597,8 +600,8 @@ messageEntityBlockquote#20df5d0 offset:int length:int = MessageEntity;
messageEntityBankCard#761e6af4 offset:int length:int = MessageEntity; messageEntityBankCard#761e6af4 offset:int length:int = MessageEntity;
inputChannelEmpty#ee8c1e86 = InputChannel; inputChannelEmpty#ee8c1e86 = InputChannel;
inputChannel#afeb712e channel_id:int access_hash:long = InputChannel; inputChannel#f35aec28 channel_id:long access_hash:long = InputChannel;
inputChannelFromMessage#2a286531 peer:InputPeer msg_id:int channel_id:int = InputChannel; inputChannelFromMessage#5b934f9d peer:InputPeer msg_id:int channel_id:long = InputChannel;
contacts.resolvedPeer#7f077ad9 peer:Peer chats:Vector<Chat> users:Vector<User> = contacts.ResolvedPeer; contacts.resolvedPeer#7f077ad9 peer:Peer chats:Vector<Chat> users:Vector<User> = contacts.ResolvedPeer;
@ -611,11 +614,11 @@ updates.channelDifference#2064674e flags:# final:flags.0?true pts:int timeout:fl
channelMessagesFilterEmpty#94d42ee7 = ChannelMessagesFilter; channelMessagesFilterEmpty#94d42ee7 = ChannelMessagesFilter;
channelMessagesFilter#cd77d957 flags:# exclude_new_messages:flags.1?true ranges:Vector<MessageRange> = ChannelMessagesFilter; channelMessagesFilter#cd77d957 flags:# exclude_new_messages:flags.1?true ranges:Vector<MessageRange> = ChannelMessagesFilter;
channelParticipant#15ebac1d user_id:int date:int = ChannelParticipant; channelParticipant#c00c07c0 user_id:long date:int = ChannelParticipant;
channelParticipantSelf#a3289a6d user_id:int inviter_id:int date:int = ChannelParticipant; channelParticipantSelf#28a8bc67 user_id:long inviter_id:long date:int = ChannelParticipant;
channelParticipantCreator#447dca4b flags:# user_id:int admin_rights:ChatAdminRights rank:flags.0?string = ChannelParticipant; channelParticipantCreator#2fe601d3 flags:# user_id:long admin_rights:ChatAdminRights rank:flags.0?string = ChannelParticipant;
channelParticipantAdmin#ccbebbaf flags:# can_edit:flags.0?true self:flags.1?true user_id:int inviter_id:flags.1?int promoted_by:int date:int admin_rights:ChatAdminRights rank:flags.2?string = ChannelParticipant; channelParticipantAdmin#34c3bb53 flags:# can_edit:flags.0?true self:flags.1?true user_id:long inviter_id:flags.1?long promoted_by:long date:int admin_rights:ChatAdminRights rank:flags.2?string = ChannelParticipant;
channelParticipantBanned#50a1dfd6 flags:# left:flags.0?true peer:Peer kicked_by:int date:int banned_rights:ChatBannedRights = ChannelParticipant; channelParticipantBanned#6df8014e flags:# left:flags.0?true peer:Peer kicked_by:long date:int banned_rights:ChatBannedRights = ChannelParticipant;
channelParticipantLeft#1b03f006 peer:Peer = ChannelParticipant; channelParticipantLeft#1b03f006 peer:Peer = ChannelParticipant;
channelParticipantsRecent#de3f3c79 = ChannelParticipantsFilter; channelParticipantsRecent#de3f3c79 = ChannelParticipantsFilter;
@ -635,7 +638,7 @@ channels.channelParticipant#dfb80317 participant:ChannelParticipant chats:Vector
help.termsOfService#780a0310 flags:# popup:flags.0?true id:DataJSON text:string entities:Vector<MessageEntity> min_age_confirm:flags.1?int = help.TermsOfService; help.termsOfService#780a0310 flags:# popup:flags.0?true id:DataJSON text:string entities:Vector<MessageEntity> min_age_confirm:flags.1?int = help.TermsOfService;
messages.savedGifsNotModified#e8025ca2 = messages.SavedGifs; messages.savedGifsNotModified#e8025ca2 = messages.SavedGifs;
messages.savedGifs#2e0709a5 hash:int gifs:Vector<Document> = messages.SavedGifs; messages.savedGifs#84a02a0d hash:long gifs:Vector<Document> = messages.SavedGifs;
inputBotInlineMessageMediaAuto#3380c786 flags:# message:string entities:flags.1?Vector<MessageEntity> reply_markup:flags.2?ReplyMarkup = InputBotInlineMessage; inputBotInlineMessageMediaAuto#3380c786 flags:# message:string entities:flags.1?Vector<MessageEntity> reply_markup:flags.2?ReplyMarkup = InputBotInlineMessage;
inputBotInlineMessageText#3dcd7a87 flags:# no_webpage:flags.0?true message:string entities:flags.1?Vector<MessageEntity> reply_markup:flags.2?ReplyMarkup = InputBotInlineMessage; inputBotInlineMessageText#3dcd7a87 flags:# no_webpage:flags.0?true message:string entities:flags.1?Vector<MessageEntity> reply_markup:flags.2?ReplyMarkup = InputBotInlineMessage;
@ -680,6 +683,7 @@ messages.botCallbackAnswer#36585ea4 flags:# alert:flags.1?true has_url:flags.3?t
messages.messageEditData#26b5dde6 flags:# caption:flags.0?true = messages.MessageEditData; messages.messageEditData#26b5dde6 flags:# caption:flags.0?true = messages.MessageEditData;
inputBotInlineMessageID#890c3d89 dc_id:int id:long access_hash:long = InputBotInlineMessageID; inputBotInlineMessageID#890c3d89 dc_id:int id:long access_hash:long = InputBotInlineMessageID;
inputBotInlineMessageID64#b6d915d7 dc_id:int owner_id:long id:int access_hash:long = InputBotInlineMessageID;
inlineBotSwitchPM#3c20629f text:string start_param:string = InlineBotSwitchPM; inlineBotSwitchPM#3c20629f text:string start_param:string = InlineBotSwitchPM;
@ -706,10 +710,10 @@ draftMessageEmpty#1b0c841a flags:# date:flags.0?int = DraftMessage;
draftMessage#fd8e711f flags:# no_webpage:flags.1?true reply_to_msg_id:flags.0?int message:string entities:flags.3?Vector<MessageEntity> date:int = DraftMessage; draftMessage#fd8e711f flags:# no_webpage:flags.1?true reply_to_msg_id:flags.0?int message:string entities:flags.3?Vector<MessageEntity> date:int = DraftMessage;
messages.featuredStickersNotModified#c6dc0c66 count:int = messages.FeaturedStickers; messages.featuredStickersNotModified#c6dc0c66 count:int = messages.FeaturedStickers;
messages.featuredStickers#b6abc341 hash:int count:int sets:Vector<StickerSetCovered> unread:Vector<long> = messages.FeaturedStickers; messages.featuredStickers#84c02310 hash:long count:int sets:Vector<StickerSetCovered> unread:Vector<long> = messages.FeaturedStickers;
messages.recentStickersNotModified#b17f890 = messages.RecentStickers; messages.recentStickersNotModified#b17f890 = messages.RecentStickers;
messages.recentStickers#22f3afb3 hash:int packs:Vector<StickerPack> stickers:Vector<Document> dates:Vector<int> = messages.RecentStickers; messages.recentStickers#88d37c56 hash:long packs:Vector<StickerPack> stickers:Vector<Document> dates:Vector<int> = messages.RecentStickers;
messages.archivedStickers#4fcba9c8 count:int sets:Vector<StickerSetCovered> = messages.ArchivedStickers; messages.archivedStickers#4fcba9c8 count:int sets:Vector<StickerSetCovered> = messages.ArchivedStickers;
@ -729,7 +733,7 @@ game#bdf9653b flags:# id:long access_hash:long short_name:string title:string de
inputGameID#32c3e77 id:long access_hash:long = InputGame; inputGameID#32c3e77 id:long access_hash:long = InputGame;
inputGameShortName#c331e80a bot_id:InputUser short_name:string = InputGame; inputGameShortName#c331e80a bot_id:InputUser short_name:string = InputGame;
highScore#58fffcd0 pos:int user_id:int score:int = HighScore; highScore#73a379eb pos:int user_id:long score:int = HighScore;
messages.highScores#9a3bfd99 scores:Vector<HighScore> users:Vector<User> = messages.HighScores; messages.highScores#9a3bfd99 scores:Vector<HighScore> users:Vector<User> = messages.HighScores;
@ -809,14 +813,14 @@ inputWebFileGeoPointLocation#9f2221c9 geo_point:InputGeoPoint access_hash:long w
upload.webFile#21e753bc size:int mime_type:string file_type:storage.FileType mtime:int bytes:bytes = upload.WebFile; upload.webFile#21e753bc size:int mime_type:string file_type:storage.FileType mtime:int bytes:bytes = upload.WebFile;
payments.paymentForm#8d0b2415 flags:# can_save_credentials:flags.2?true password_missing:flags.3?true form_id:long bot_id:int invoice:Invoice provider_id:int url:string native_provider:flags.4?string native_params:flags.4?DataJSON saved_info:flags.0?PaymentRequestedInfo saved_credentials:flags.1?PaymentSavedCredentials users:Vector<User> = payments.PaymentForm; payments.paymentForm#1694761b flags:# can_save_credentials:flags.2?true password_missing:flags.3?true form_id:long bot_id:long invoice:Invoice provider_id:long url:string native_provider:flags.4?string native_params:flags.4?DataJSON saved_info:flags.0?PaymentRequestedInfo saved_credentials:flags.1?PaymentSavedCredentials users:Vector<User> = payments.PaymentForm;
payments.validatedRequestedInfo#d1451883 flags:# id:flags.0?string shipping_options:flags.1?Vector<ShippingOption> = payments.ValidatedRequestedInfo; payments.validatedRequestedInfo#d1451883 flags:# id:flags.0?string shipping_options:flags.1?Vector<ShippingOption> = payments.ValidatedRequestedInfo;
payments.paymentResult#4e5f810d updates:Updates = payments.PaymentResult; payments.paymentResult#4e5f810d updates:Updates = payments.PaymentResult;
payments.paymentVerificationNeeded#d8411139 url:string = payments.PaymentResult; payments.paymentVerificationNeeded#d8411139 url:string = payments.PaymentResult;
payments.paymentReceipt#10b555d0 flags:# date:int bot_id:int provider_id:int title:string description:string photo:flags.2?WebDocument invoice:Invoice info:flags.0?PaymentRequestedInfo shipping:flags.1?ShippingOption tip_amount:flags.3?long currency:string total_amount:long credentials_title:string users:Vector<User> = payments.PaymentReceipt; payments.paymentReceipt#70c4fe03 flags:# date:int bot_id:long provider_id:long title:string description:string photo:flags.2?WebDocument invoice:Invoice info:flags.0?PaymentRequestedInfo shipping:flags.1?ShippingOption tip_amount:flags.3?long currency:string total_amount:long credentials_title:string users:Vector<User> = payments.PaymentReceipt;
payments.savedInfo#fb8fe43c flags:# has_saved_credentials:flags.1?true saved_info:flags.0?PaymentRequestedInfo = payments.SavedInfo; payments.savedInfo#fb8fe43c flags:# has_saved_credentials:flags.1?true saved_info:flags.0?PaymentRequestedInfo = payments.SavedInfo;
@ -834,10 +838,10 @@ inputStickerSetItem#ffa0a496 flags:# document:InputDocument emoji:string mask_co
inputPhoneCall#1e36fded id:long access_hash:long = InputPhoneCall; inputPhoneCall#1e36fded id:long access_hash:long = InputPhoneCall;
phoneCallEmpty#5366c915 id:long = PhoneCall; phoneCallEmpty#5366c915 id:long = PhoneCall;
phoneCallWaiting#1b8f4ad1 flags:# video:flags.6?true id:long access_hash:long date:int admin_id:int participant_id:int protocol:PhoneCallProtocol receive_date:flags.0?int = PhoneCall; phoneCallWaiting#c5226f17 flags:# video:flags.6?true id:long access_hash:long date:int admin_id:long participant_id:long protocol:PhoneCallProtocol receive_date:flags.0?int = PhoneCall;
phoneCallRequested#87eabb53 flags:# video:flags.6?true id:long access_hash:long date:int admin_id:int participant_id:int g_a_hash:bytes protocol:PhoneCallProtocol = PhoneCall; phoneCallRequested#14b0ed0c flags:# video:flags.6?true id:long access_hash:long date:int admin_id:long participant_id:long g_a_hash:bytes protocol:PhoneCallProtocol = PhoneCall;
phoneCallAccepted#997c454a flags:# video:flags.6?true id:long access_hash:long date:int admin_id:int participant_id:int g_b:bytes protocol:PhoneCallProtocol = PhoneCall; phoneCallAccepted#3660c311 flags:# video:flags.6?true id:long access_hash:long date:int admin_id:long participant_id:long g_b:bytes protocol:PhoneCallProtocol = PhoneCall;
phoneCall#8742ae7f flags:# p2p_allowed:flags.5?true video:flags.6?true id:long access_hash:long date:int admin_id:int participant_id:int g_a_or_b:bytes key_fingerprint:long protocol:PhoneCallProtocol connections:Vector<PhoneConnection> start_date:int = PhoneCall; phoneCall#967f7c67 flags:# p2p_allowed:flags.5?true video:flags.6?true id:long access_hash:long date:int admin_id:long participant_id:long g_a_or_b:bytes key_fingerprint:long protocol:PhoneCallProtocol connections:Vector<PhoneConnection> start_date:int = PhoneCall;
phoneCallDiscarded#50ca4de1 flags:# need_rating:flags.2?true need_debug:flags.3?true video:flags.6?true id:long reason:flags.0?PhoneCallDiscardReason duration:flags.1?int = PhoneCall; phoneCallDiscarded#50ca4de1 flags:# need_rating:flags.2?true need_debug:flags.3?true video:flags.6?true id:long reason:flags.0?PhoneCallDiscardReason duration:flags.1?int = PhoneCall;
phoneConnection#9d4c17c0 id:long ip:string ipv6:string port:int peer_tag:bytes = PhoneConnection; phoneConnection#9d4c17c0 id:long ip:string ipv6:string port:int peer_tag:bytes = PhoneConnection;
@ -880,7 +884,7 @@ channelAdminLogEventActionChangeStickerSet#b1c3caa7 prev_stickerset:InputSticker
channelAdminLogEventActionTogglePreHistoryHidden#5f5c95f1 new_value:Bool = ChannelAdminLogEventAction; channelAdminLogEventActionTogglePreHistoryHidden#5f5c95f1 new_value:Bool = ChannelAdminLogEventAction;
channelAdminLogEventActionDefaultBannedRights#2df5fc0a prev_banned_rights:ChatBannedRights new_banned_rights:ChatBannedRights = ChannelAdminLogEventAction; channelAdminLogEventActionDefaultBannedRights#2df5fc0a prev_banned_rights:ChatBannedRights new_banned_rights:ChatBannedRights = ChannelAdminLogEventAction;
channelAdminLogEventActionStopPoll#8f079643 message:Message = ChannelAdminLogEventAction; channelAdminLogEventActionStopPoll#8f079643 message:Message = ChannelAdminLogEventAction;
channelAdminLogEventActionChangeLinkedChat#a26f881b prev_value:int new_value:int = ChannelAdminLogEventAction; channelAdminLogEventActionChangeLinkedChat#50c7ac8 prev_value:long new_value:long = ChannelAdminLogEventAction;
channelAdminLogEventActionChangeLocation#e6b76ae prev_value:ChannelLocation new_value:ChannelLocation = ChannelAdminLogEventAction; channelAdminLogEventActionChangeLocation#e6b76ae prev_value:ChannelLocation new_value:ChannelLocation = ChannelAdminLogEventAction;
channelAdminLogEventActionToggleSlowMode#53909779 prev_value:int new_value:int = ChannelAdminLogEventAction; channelAdminLogEventActionToggleSlowMode#53909779 prev_value:int new_value:int = ChannelAdminLogEventAction;
channelAdminLogEventActionStartGroupCall#23209745 call:InputGroupCall = ChannelAdminLogEventAction; channelAdminLogEventActionStartGroupCall#23209745 call:InputGroupCall = ChannelAdminLogEventAction;
@ -894,9 +898,8 @@ channelAdminLogEventActionExportedInviteRevoke#410a134e invite:ExportedChatInvit
channelAdminLogEventActionExportedInviteEdit#e90ebb59 prev_invite:ExportedChatInvite new_invite:ExportedChatInvite = ChannelAdminLogEventAction; channelAdminLogEventActionExportedInviteEdit#e90ebb59 prev_invite:ExportedChatInvite new_invite:ExportedChatInvite = ChannelAdminLogEventAction;
channelAdminLogEventActionParticipantVolume#3e7f6847 participant:GroupCallParticipant = ChannelAdminLogEventAction; channelAdminLogEventActionParticipantVolume#3e7f6847 participant:GroupCallParticipant = ChannelAdminLogEventAction;
channelAdminLogEventActionChangeHistoryTTL#6e941a38 prev_value:int new_value:int = ChannelAdminLogEventAction; channelAdminLogEventActionChangeHistoryTTL#6e941a38 prev_value:int new_value:int = ChannelAdminLogEventAction;
channelAdminLogEventActionChangeTheme#fe69018d prev_value:string new_value:string = ChannelAdminLogEventAction;
channelAdminLogEvent#3b5a3e40 id:long date:int user_id:int action:ChannelAdminLogEventAction = ChannelAdminLogEvent; channelAdminLogEvent#1fad68cd id:long date:int user_id:long action:ChannelAdminLogEventAction = ChannelAdminLogEvent;
channels.adminLogResults#ed8af74d events:Vector<ChannelAdminLogEvent> chats:Vector<Chat> users:Vector<User> = channels.AdminLogResults; channels.adminLogResults#ed8af74d events:Vector<ChannelAdminLogEvent> chats:Vector<Chat> users:Vector<User> = channels.AdminLogResults;
@ -905,11 +908,11 @@ channelAdminLogEventsFilter#ea107ae4 flags:# join:flags.0?true leave:flags.1?tru
popularContact#5ce14175 client_id:long importers:int = PopularContact; popularContact#5ce14175 client_id:long importers:int = PopularContact;
messages.favedStickersNotModified#9e8fa6d3 = messages.FavedStickers; messages.favedStickersNotModified#9e8fa6d3 = messages.FavedStickers;
messages.favedStickers#f37f2f16 hash:int packs:Vector<StickerPack> stickers:Vector<Document> = messages.FavedStickers; messages.favedStickers#2cb51097 hash:long packs:Vector<StickerPack> stickers:Vector<Document> = messages.FavedStickers;
recentMeUrlUnknown#46e1d13d url:string = RecentMeUrl; recentMeUrlUnknown#46e1d13d url:string = RecentMeUrl;
recentMeUrlUser#8dbc3336 url:string user_id:int = RecentMeUrl; recentMeUrlUser#b92c09e2 url:string user_id:long = RecentMeUrl;
recentMeUrlChat#a01b22f9 url:string chat_id:int = RecentMeUrl; recentMeUrlChat#b2da71d2 url:string chat_id:long = RecentMeUrl;
recentMeUrlChatInvite#eb49081d url:string chat_invite:ChatInvite = RecentMeUrl; recentMeUrlChatInvite#eb49081d url:string chat_invite:ChatInvite = RecentMeUrl;
recentMeUrlStickerSet#bc0a57dc url:string set:StickerSetCovered = RecentMeUrl; recentMeUrlStickerSet#bc0a57dc url:string set:StickerSetCovered = RecentMeUrl;
@ -917,7 +920,7 @@ help.recentMeUrls#e0310d7 urls:Vector<RecentMeUrl> chats:Vector<Chat> users:Vect
inputSingleMedia#1cc6e91f flags:# media:InputMedia random_id:long message:string entities:flags.0?Vector<MessageEntity> = InputSingleMedia; inputSingleMedia#1cc6e91f flags:# media:InputMedia random_id:long message:string entities:flags.0?Vector<MessageEntity> = InputSingleMedia;
webAuthorization#cac943f2 hash:long bot_id:int domain:string browser:string platform:string date_created:int date_active:int ip:string region:string = WebAuthorization; webAuthorization#a6f8f452 hash:long bot_id:long domain:string browser:string platform:string date_created:int date_active:int ip:string region:string = WebAuthorization;
account.webAuthorizations#ed56c9fc authorizations:Vector<WebAuthorization> users:Vector<User> = account.WebAuthorizations; account.webAuthorizations#ed56c9fc authorizations:Vector<WebAuthorization> users:Vector<User> = account.WebAuthorizations;
@ -933,7 +936,7 @@ dialogPeer#e56dbf05 peer:Peer = DialogPeer;
dialogPeerFolder#514519e2 folder_id:int = DialogPeer; dialogPeerFolder#514519e2 folder_id:int = DialogPeer;
messages.foundStickerSetsNotModified#d54b65d = messages.FoundStickerSets; messages.foundStickerSetsNotModified#d54b65d = messages.FoundStickerSets;
messages.foundStickerSets#5108d648 hash:int sets:Vector<StickerSetCovered> = messages.FoundStickerSets; messages.foundStickerSets#8af09dd2 hash:long sets:Vector<StickerSetCovered> = messages.FoundStickerSets;
fileHash#6242c773 offset:int limit:int hash:bytes = FileHash; fileHash#6242c773 offset:int limit:int hash:bytes = FileHash;
@ -1052,7 +1055,7 @@ poll#86e18161 id:long flags:# closed:flags.0?true public_voters:flags.1?true mul
pollAnswerVoters#3b6ddad2 flags:# chosen:flags.0?true correct:flags.1?true option:bytes voters:int = PollAnswerVoters; pollAnswerVoters#3b6ddad2 flags:# chosen:flags.0?true correct:flags.1?true option:bytes voters:int = PollAnswerVoters;
pollResults#badcc1a3 flags:# min:flags.0?true results:flags.1?Vector<PollAnswerVoters> total_voters:flags.2?int recent_voters:flags.3?Vector<int> solution:flags.4?string solution_entities:flags.4?Vector<MessageEntity> = PollResults; pollResults#dcb82ea3 flags:# min:flags.0?true results:flags.1?Vector<PollAnswerVoters> total_voters:flags.2?int recent_voters:flags.3?Vector<long> solution:flags.4?string solution_entities:flags.4?Vector<MessageEntity> = PollResults;
chatOnlines#f041e250 onlines:int = ChatOnlines; chatOnlines#f041e250 onlines:int = ChatOnlines;
@ -1067,7 +1070,7 @@ inputWallPaperSlug#72091c80 slug:string = InputWallPaper;
inputWallPaperNoFile#967a462e id:long = InputWallPaper; inputWallPaperNoFile#967a462e id:long = InputWallPaper;
account.wallPapersNotModified#1c199183 = account.WallPapers; account.wallPapersNotModified#1c199183 = account.WallPapers;
account.wallPapers#702b65a9 hash:int wallpapers:Vector<WallPaper> = account.WallPapers; account.wallPapers#cdc3858c hash:long wallpapers:Vector<WallPaper> = account.WallPapers;
codeSettings#debebe83 flags:# allow_flashcall:flags.0?true current_number:flags.1?true allow_app_hash:flags.4?true = CodeSettings; codeSettings#debebe83 flags:# allow_flashcall:flags.0?true current_number:flags.1?true allow_app_hash:flags.4?true = CodeSettings;
@ -1112,7 +1115,7 @@ inputThemeSlug#f5890df1 slug:string = InputTheme;
theme#e802b8dc flags:# creator:flags.0?true default:flags.1?true for_chat:flags.5?true id:long access_hash:long slug:string title:string document:flags.2?Document settings:flags.3?ThemeSettings installs_count:flags.4?int = Theme; theme#e802b8dc flags:# creator:flags.0?true default:flags.1?true for_chat:flags.5?true id:long access_hash:long slug:string title:string document:flags.2?Document settings:flags.3?ThemeSettings installs_count:flags.4?int = Theme;
account.themesNotModified#f41eb622 = account.Themes; account.themesNotModified#f41eb622 = account.Themes;
account.themes#7f676421 hash:int themes:Vector<Theme> = account.Themes; account.themes#9a3d8c6d hash:long themes:Vector<Theme> = account.Themes;
auth.loginToken#629f1980 expires:int token:bytes = auth.LoginToken; auth.loginToken#629f1980 expires:int token:bytes = auth.LoginToken;
auth.loginTokenMigrateTo#68e9916 dc_id:int token:bytes = auth.LoginToken; auth.loginTokenMigrateTo#68e9916 dc_id:int token:bytes = auth.LoginToken;
@ -1128,15 +1131,15 @@ baseThemeNight#b7b31ea8 = BaseTheme;
baseThemeTinted#6d5f77ee = BaseTheme; baseThemeTinted#6d5f77ee = BaseTheme;
baseThemeArctic#5b11125a = BaseTheme; baseThemeArctic#5b11125a = BaseTheme;
inputThemeSettings#ff38f912 flags:# message_colors_animated:flags.2?true base_theme:BaseTheme accent_color:int message_colors:flags.0?Vector<int> wallpaper:flags.1?InputWallPaper wallpaper_settings:flags.1?WallPaperSettings = InputThemeSettings; inputThemeSettings#8fde504f flags:# message_colors_animated:flags.2?true base_theme:BaseTheme accent_color:int outbox_accent_color:flags.3?int message_colors:flags.0?Vector<int> wallpaper:flags.1?InputWallPaper wallpaper_settings:flags.1?WallPaperSettings = InputThemeSettings;
themeSettings#8db4e76c flags:# message_colors_animated:flags.2?true base_theme:BaseTheme accent_color:int message_colors:flags.0?Vector<int> wallpaper:flags.1?WallPaper = ThemeSettings; themeSettings#fa58b6d4 flags:# message_colors_animated:flags.2?true base_theme:BaseTheme accent_color:int outbox_accent_color:flags.3?int message_colors:flags.0?Vector<int> wallpaper:flags.1?WallPaper = ThemeSettings;
webPageAttributeTheme#54b56617 flags:# documents:flags.0?Vector<Document> settings:flags.1?ThemeSettings = WebPageAttribute; webPageAttributeTheme#54b56617 flags:# documents:flags.0?Vector<Document> settings:flags.1?ThemeSettings = WebPageAttribute;
messageUserVote#a28e5559 user_id:int option:bytes date:int = MessageUserVote; messageUserVote#34d247b4 user_id:long option:bytes date:int = MessageUserVote;
messageUserVoteInputOption#36377430 user_id:int date:int = MessageUserVote; messageUserVoteInputOption#3ca5b0ec user_id:long date:int = MessageUserVote;
messageUserVoteMultiple#e8fe0de user_id:int options:Vector<bytes> date:int = MessageUserVote; messageUserVoteMultiple#8a65e557 user_id:long options:Vector<bytes> date:int = MessageUserVote;
messages.votesList#823f649 flags:# count:int votes:Vector<MessageUserVote> users:Vector<User> next_offset:flags.0?string = messages.VotesList; messages.votesList#823f649 flags:# count:int votes:Vector<MessageUserVote> users:Vector<User> next_offset:flags.0?string = messages.VotesList;
@ -1167,11 +1170,11 @@ help.promoData#8c39793f flags:# proxy:flags.0?true expires:int peer:Peer chats:V
videoSize#de33b094 flags:# type:string w:int h:int size:int video_start_ts:flags.0?double = VideoSize; videoSize#de33b094 flags:# type:string w:int h:int size:int video_start_ts:flags.0?double = VideoSize;
statsGroupTopPoster#18f3d0f7 user_id:int messages:int avg_chars:int = StatsGroupTopPoster; statsGroupTopPoster#9d04af9b user_id:long messages:int avg_chars:int = StatsGroupTopPoster;
statsGroupTopAdmin#6014f412 user_id:int deleted:int kicked:int banned:int = StatsGroupTopAdmin; statsGroupTopAdmin#d7584c87 user_id:long deleted:int kicked:int banned:int = StatsGroupTopAdmin;
statsGroupTopInviter#31962a4c user_id:int invitations:int = StatsGroupTopInviter; statsGroupTopInviter#535f779d user_id:long invitations:int = StatsGroupTopInviter;
stats.megagroupStats#ef7ff916 period:StatsDateRangeDays members:StatsAbsValueAndPrev messages:StatsAbsValueAndPrev viewers:StatsAbsValueAndPrev posters:StatsAbsValueAndPrev growth_graph:StatsGraph members_graph:StatsGraph new_members_by_source_graph:StatsGraph languages_graph:StatsGraph messages_graph:StatsGraph actions_graph:StatsGraph top_hours_graph:StatsGraph weekdays_graph:StatsGraph top_posters:Vector<StatsGroupTopPoster> top_admins:Vector<StatsGroupTopAdmin> top_inviters:Vector<StatsGroupTopInviter> users:Vector<User> = stats.MegagroupStats; stats.megagroupStats#ef7ff916 period:StatsDateRangeDays members:StatsAbsValueAndPrev messages:StatsAbsValueAndPrev viewers:StatsAbsValueAndPrev posters:StatsAbsValueAndPrev growth_graph:StatsGraph members_graph:StatsGraph new_members_by_source_graph:StatsGraph languages_graph:StatsGraph messages_graph:StatsGraph actions_graph:StatsGraph top_hours_graph:StatsGraph weekdays_graph:StatsGraph top_posters:Vector<StatsGroupTopPoster> top_admins:Vector<StatsGroupTopAdmin> top_inviters:Vector<StatsGroupTopInviter> users:Vector<User> = stats.MegagroupStats;
@ -1192,7 +1195,7 @@ messages.discussionMessage#a6341782 flags:# messages:Vector<Message> max_id:flag
messageReplyHeader#a6d57763 flags:# reply_to_msg_id:int reply_to_peer_id:flags.0?Peer reply_to_top_id:flags.1?int = MessageReplyHeader; messageReplyHeader#a6d57763 flags:# reply_to_msg_id:int reply_to_peer_id:flags.0?Peer reply_to_top_id:flags.1?int = MessageReplyHeader;
messageReplies#4128faac flags:# comments:flags.0?true replies:int replies_pts:int recent_repliers:flags.1?Vector<Peer> channel_id:flags.0?int max_id:flags.2?int read_max_id:flags.3?int = MessageReplies; messageReplies#83d60fc2 flags:# comments:flags.0?true replies:int replies_pts:int recent_repliers:flags.1?Vector<Peer> channel_id:flags.0?long max_id:flags.2?int read_max_id:flags.3?int = MessageReplies;
peerBlocked#e8fd8014 peer_id:Peer date:int = PeerBlocked; peerBlocked#e8fd8014 peer_id:Peer date:int = PeerBlocked;
@ -1221,7 +1224,7 @@ messages.historyImportParsed#5e0fb7b9 flags:# pm:flags.0?true group:flags.1?true
messages.affectedFoundMessages#ef8d3e6c pts:int pts_count:int offset:int messages:Vector<int> = messages.AffectedFoundMessages; messages.affectedFoundMessages#ef8d3e6c pts:int pts_count:int offset:int messages:Vector<int> = messages.AffectedFoundMessages;
chatInviteImporter#1e3e6680 user_id:int date:int = ChatInviteImporter; chatInviteImporter#b5cd5f4 user_id:long date:int = ChatInviteImporter;
messages.exportedChatInvites#bdc62dcc count:int invites:Vector<ExportedChatInvite> users:Vector<User> = messages.ExportedChatInvites; messages.exportedChatInvites#bdc62dcc count:int invites:Vector<ExportedChatInvite> users:Vector<User> = messages.ExportedChatInvites;
@ -1230,7 +1233,7 @@ messages.exportedChatInviteReplaced#222600ef invite:ExportedChatInvite new_invit
messages.chatInviteImporters#81b6b00a count:int importers:Vector<ChatInviteImporter> users:Vector<User> = messages.ChatInviteImporters; messages.chatInviteImporters#81b6b00a count:int importers:Vector<ChatInviteImporter> users:Vector<User> = messages.ChatInviteImporters;
chatAdminWithInvites#dfd2330f admin_id:int invites_count:int revoked_invites_count:int = ChatAdminWithInvites; chatAdminWithInvites#f2ecef23 admin_id:long invites_count:int revoked_invites_count:int = ChatAdminWithInvites;
messages.chatAdminsWithInvites#b69b72d7 admins:Vector<ChatAdminWithInvites> users:Vector<User> = messages.ChatAdminsWithInvites; messages.chatAdminsWithInvites#b69b72d7 admins:Vector<ChatAdminWithInvites> users:Vector<User> = messages.ChatAdminsWithInvites;
@ -1283,7 +1286,7 @@ auth.signIn#bcd51581 phone_number:string phone_code_hash:string phone_code:strin
auth.logOut#5717da40 = Bool; auth.logOut#5717da40 = Bool;
auth.resetAuthorizations#9fab0d1a = Bool; auth.resetAuthorizations#9fab0d1a = Bool;
auth.exportAuthorization#e5bfffcd dc_id:int = auth.ExportedAuthorization; auth.exportAuthorization#e5bfffcd dc_id:int = auth.ExportedAuthorization;
auth.importAuthorization#e3ef9613 id:int bytes:bytes = auth.Authorization; auth.importAuthorization#a57a7dad id:long bytes:bytes = auth.Authorization;
auth.bindTempAuthKey#cdd42a05 perm_auth_key_id:long nonce:long expires_at:int encrypted_message:bytes = Bool; auth.bindTempAuthKey#cdd42a05 perm_auth_key_id:long nonce:long expires_at:int encrypted_message:bytes = Bool;
auth.importBotAuthorization#67a3ff2c flags:int api_id:int api_hash:string bot_auth_token:string = auth.Authorization; auth.importBotAuthorization#67a3ff2c flags:int api_id:int api_hash:string bot_auth_token:string = auth.Authorization;
auth.checkPassword#d18b4d16 password:InputCheckPasswordSRP = auth.Authorization; auth.checkPassword#d18b4d16 password:InputCheckPasswordSRP = auth.Authorization;
@ -1292,19 +1295,19 @@ auth.recoverPassword#37096c70 flags:# code:string new_settings:flags.0?account.P
auth.resendCode#3ef1a9bf phone_number:string phone_code_hash:string = auth.SentCode; auth.resendCode#3ef1a9bf phone_number:string phone_code_hash:string = auth.SentCode;
auth.cancelCode#1f040578 phone_number:string phone_code_hash:string = Bool; auth.cancelCode#1f040578 phone_number:string phone_code_hash:string = Bool;
auth.dropTempAuthKeys#8e48a188 except_auth_keys:Vector<long> = Bool; auth.dropTempAuthKeys#8e48a188 except_auth_keys:Vector<long> = Bool;
auth.exportLoginToken#b1b41517 api_id:int api_hash:string except_ids:Vector<int> = auth.LoginToken; auth.exportLoginToken#b7e085fe api_id:int api_hash:string except_ids:Vector<long> = auth.LoginToken;
auth.importLoginToken#95ac5ce4 token:bytes = auth.LoginToken; auth.importLoginToken#95ac5ce4 token:bytes = auth.LoginToken;
auth.acceptLoginToken#e894ad4d token:bytes = Authorization; auth.acceptLoginToken#e894ad4d token:bytes = Authorization;
auth.checkRecoveryPassword#d36bf79 code:string = Bool; auth.checkRecoveryPassword#d36bf79 code:string = Bool;
account.registerDevice#68976c6f flags:# no_muted:flags.0?true token_type:int token:string app_sandbox:Bool secret:bytes other_uids:Vector<int> = Bool; account.registerDevice#ec86017a flags:# no_muted:flags.0?true token_type:int token:string app_sandbox:Bool secret:bytes other_uids:Vector<long> = Bool;
account.unregisterDevice#3076c4bf token_type:int token:string other_uids:Vector<int> = Bool; account.unregisterDevice#6a0d3206 token_type:int token:string other_uids:Vector<long> = Bool;
account.updateNotifySettings#84be5b93 peer:InputNotifyPeer settings:InputPeerNotifySettings = Bool; account.updateNotifySettings#84be5b93 peer:InputNotifyPeer settings:InputPeerNotifySettings = Bool;
account.getNotifySettings#12b3ad31 peer:InputNotifyPeer = PeerNotifySettings; account.getNotifySettings#12b3ad31 peer:InputNotifyPeer = PeerNotifySettings;
account.resetNotifySettings#db7e1747 = Bool; account.resetNotifySettings#db7e1747 = Bool;
account.updateProfile#78515775 flags:# first_name:flags.0?string last_name:flags.1?string about:flags.2?string = User; account.updateProfile#78515775 flags:# first_name:flags.0?string last_name:flags.1?string about:flags.2?string = User;
account.updateStatus#6628562c offline:Bool = Bool; account.updateStatus#6628562c offline:Bool = Bool;
account.getWallPapers#aabb1763 hash:int = account.WallPapers; account.getWallPapers#7967d36 hash:long = account.WallPapers;
account.reportPeer#c5ba3d86 peer:InputPeer reason:ReportReason message:string = Bool; account.reportPeer#c5ba3d86 peer:InputPeer reason:ReportReason message:string = Bool;
account.checkUsername#2714d86c username:string = Bool; account.checkUsername#2714d86c username:string = Bool;
account.updateUsername#3e0bdd7c username:string = User; account.updateUsername#3e0bdd7c username:string = User;
@ -1331,8 +1334,8 @@ account.getAllSecureValues#b288bc7d = Vector<SecureValue>;
account.getSecureValue#73665bc2 types:Vector<SecureValueType> = Vector<SecureValue>; account.getSecureValue#73665bc2 types:Vector<SecureValueType> = Vector<SecureValue>;
account.saveSecureValue#899fe31d value:InputSecureValue secure_secret_id:long = SecureValue; account.saveSecureValue#899fe31d value:InputSecureValue secure_secret_id:long = SecureValue;
account.deleteSecureValue#b880bc4b types:Vector<SecureValueType> = Bool; account.deleteSecureValue#b880bc4b types:Vector<SecureValueType> = Bool;
account.getAuthorizationForm#b86ba8e1 bot_id:int scope:string public_key:string = account.AuthorizationForm; account.getAuthorizationForm#a929597a bot_id:long scope:string public_key:string = account.AuthorizationForm;
account.acceptAuthorization#e7027c94 bot_id:int scope:string public_key:string value_hashes:Vector<SecureValueHash> credentials:SecureCredentialsEncrypted = Bool; account.acceptAuthorization#f3ed4c73 bot_id:long scope:string public_key:string value_hashes:Vector<SecureValueHash> credentials:SecureCredentialsEncrypted = Bool;
account.sendVerifyPhoneCode#a5a356f9 phone_number:string settings:CodeSettings = auth.SentCode; account.sendVerifyPhoneCode#a5a356f9 phone_number:string settings:CodeSettings = auth.SentCode;
account.verifyPhone#4dd3a7f6 phone_number:string phone_code_hash:string phone_code:string = Bool; account.verifyPhone#4dd3a7f6 phone_number:string phone_code_hash:string phone_code:string = Bool;
account.sendVerifyEmailCode#7011509f email:string = account.SentEmailCode; account.sendVerifyEmailCode#7011509f email:string = account.SentEmailCode;
@ -1358,7 +1361,7 @@ account.updateTheme#5cb367d5 flags:# format:string theme:InputTheme slug:flags.0
account.saveTheme#f257106c theme:InputTheme unsave:Bool = Bool; account.saveTheme#f257106c theme:InputTheme unsave:Bool = Bool;
account.installTheme#7ae43737 flags:# dark:flags.0?true format:flags.1?string theme:flags.1?InputTheme = Bool; account.installTheme#7ae43737 flags:# dark:flags.0?true format:flags.1?string theme:flags.1?InputTheme = Bool;
account.getTheme#8d9d742b format:string theme:InputTheme document_id:long = Theme; account.getTheme#8d9d742b format:string theme:InputTheme document_id:long = Theme;
account.getThemes#285946f8 format:string hash:int = account.Themes; account.getThemes#7206e458 format:string hash:long = account.Themes;
account.setContentSettings#b574b16b flags:# sensitive_enabled:flags.0?true = Bool; account.setContentSettings#b574b16b flags:# sensitive_enabled:flags.0?true = Bool;
account.getContentSettings#8b9b4dae = account.ContentSettings; account.getContentSettings#8b9b4dae = account.ContentSettings;
account.getMultiWallPapers#65ad71dc wallpapers:Vector<InputWallPaper> = Vector<WallPaper>; account.getMultiWallPapers#65ad71dc wallpapers:Vector<InputWallPaper> = Vector<WallPaper>;
@ -1373,9 +1376,9 @@ users.getUsers#d91a548 id:Vector<InputUser> = Vector<User>;
users.getFullUser#ca30a5b1 id:InputUser = UserFull; users.getFullUser#ca30a5b1 id:InputUser = UserFull;
users.setSecureValueErrors#90c894b5 id:InputUser errors:Vector<SecureValueError> = Bool; users.setSecureValueErrors#90c894b5 id:InputUser errors:Vector<SecureValueError> = Bool;
contacts.getContactIDs#2caa4a42 hash:int = Vector<int>; contacts.getContactIDs#7adc669d hash:long = Vector<int>;
contacts.getStatuses#c4a353ee = Vector<ContactStatus>; contacts.getStatuses#c4a353ee = Vector<ContactStatus>;
contacts.getContacts#c023849f hash:int = contacts.Contacts; contacts.getContacts#5dd69e12 hash:long = contacts.Contacts;
contacts.importContacts#2c800be5 contacts:Vector<InputContact> = contacts.ImportedContacts; contacts.importContacts#2c800be5 contacts:Vector<InputContact> = contacts.ImportedContacts;
contacts.deleteContacts#96a0e00 id:Vector<InputUser> = Updates; contacts.deleteContacts#96a0e00 id:Vector<InputUser> = Updates;
contacts.deleteByPhones#1013fd9e phones:Vector<string> = Bool; contacts.deleteByPhones#1013fd9e phones:Vector<string> = Bool;
@ -1384,7 +1387,7 @@ contacts.unblock#bea65d50 id:InputPeer = Bool;
contacts.getBlocked#f57c350f offset:int limit:int = contacts.Blocked; contacts.getBlocked#f57c350f offset:int limit:int = contacts.Blocked;
contacts.search#11f812d8 q:string limit:int = contacts.Found; contacts.search#11f812d8 q:string limit:int = contacts.Found;
contacts.resolveUsername#f93ccba3 username:string = contacts.ResolvedPeer; contacts.resolveUsername#f93ccba3 username:string = contacts.ResolvedPeer;
contacts.getTopPeers#d4982db5 flags:# correspondents:flags.0?true bots_pm:flags.1?true bots_inline:flags.2?true phone_calls:flags.3?true forward_users:flags.4?true forward_chats:flags.5?true groups:flags.10?true channels:flags.15?true offset:int limit:int hash:int = contacts.TopPeers; contacts.getTopPeers#973478b6 flags:# correspondents:flags.0?true bots_pm:flags.1?true bots_inline:flags.2?true phone_calls:flags.3?true forward_users:flags.4?true forward_chats:flags.5?true groups:flags.10?true channels:flags.15?true offset:int limit:int hash:long = contacts.TopPeers;
contacts.resetTopPeerRating#1ae373ac category:TopPeerCategory peer:InputPeer = Bool; contacts.resetTopPeerRating#1ae373ac category:TopPeerCategory peer:InputPeer = Bool;
contacts.resetSaved#879537f1 = Bool; contacts.resetSaved#879537f1 = Bool;
contacts.getSaved#82f1e39f = Vector<SavedContact>; contacts.getSaved#82f1e39f = Vector<SavedContact>;
@ -1395,9 +1398,9 @@ contacts.getLocated#d348bc44 flags:# background:flags.1?true geo_point:InputGeoP
contacts.blockFromReplies#29a8962c flags:# delete_message:flags.0?true delete_history:flags.1?true report_spam:flags.2?true msg_id:int = Updates; contacts.blockFromReplies#29a8962c flags:# delete_message:flags.0?true delete_history:flags.1?true report_spam:flags.2?true msg_id:int = Updates;
messages.getMessages#63c66506 id:Vector<InputMessage> = messages.Messages; messages.getMessages#63c66506 id:Vector<InputMessage> = messages.Messages;
messages.getDialogs#a0ee3b73 flags:# exclude_pinned:flags.0?true folder_id:flags.1?int offset_date:int offset_id:int offset_peer:InputPeer limit:int hash:int = messages.Dialogs; messages.getDialogs#a0f4cb4f flags:# exclude_pinned:flags.0?true folder_id:flags.1?int offset_date:int offset_id:int offset_peer:InputPeer limit:int hash:long = messages.Dialogs;
messages.getHistory#dcbb8260 peer:InputPeer offset_id:int offset_date:int add_offset:int limit:int max_id:int min_id:int hash:int = messages.Messages; messages.getHistory#4423e6c5 peer:InputPeer offset_id:int offset_date:int add_offset:int limit:int max_id:int min_id:int hash:long = messages.Messages;
messages.search#c352eec flags:# peer:InputPeer q:string from_id:flags.0?InputPeer top_msg_id:flags.1?int filter:MessagesFilter min_date:int max_date:int offset_id:int add_offset:int limit:int max_id:int min_id:int hash:int = messages.Messages; messages.search#a0fda762 flags:# peer:InputPeer q:string from_id:flags.0?InputPeer top_msg_id:flags.1?int filter:MessagesFilter min_date:int max_date:int offset_id:int add_offset:int limit:int max_id:int min_id:int hash:long = messages.Messages;
messages.readHistory#e306d3a peer:InputPeer max_id:int = messages.AffectedMessages; messages.readHistory#e306d3a peer:InputPeer max_id:int = messages.AffectedMessages;
messages.deleteHistory#1c015b09 flags:# just_clear:flags.0?true revoke:flags.1?true peer:InputPeer max_id:int = messages.AffectedHistory; messages.deleteHistory#1c015b09 flags:# just_clear:flags.0?true revoke:flags.1?true peer:InputPeer max_id:int = messages.AffectedHistory;
messages.deleteMessages#e58e95d2 flags:# revoke:flags.0?true id:Vector<int> = messages.AffectedMessages; messages.deleteMessages#e58e95d2 flags:# revoke:flags.0?true id:Vector<int> = messages.AffectedMessages;
@ -1409,12 +1412,12 @@ messages.forwardMessages#d9fee60e flags:# silent:flags.5?true background:flags.6
messages.reportSpam#cf1592db peer:InputPeer = Bool; messages.reportSpam#cf1592db peer:InputPeer = Bool;
messages.getPeerSettings#3672e09c peer:InputPeer = PeerSettings; messages.getPeerSettings#3672e09c peer:InputPeer = PeerSettings;
messages.report#8953ab4e peer:InputPeer id:Vector<int> reason:ReportReason message:string = Bool; messages.report#8953ab4e peer:InputPeer id:Vector<int> reason:ReportReason message:string = Bool;
messages.getChats#3c6aa187 id:Vector<int> = messages.Chats; messages.getChats#49e9528f id:Vector<long> = messages.Chats;
messages.getFullChat#3b831c66 chat_id:int = messages.ChatFull; messages.getFullChat#aeb00b34 chat_id:long = messages.ChatFull;
messages.editChatTitle#dc452855 chat_id:int title:string = Updates; messages.editChatTitle#73783ffd chat_id:long title:string = Updates;
messages.editChatPhoto#ca4c79d8 chat_id:int photo:InputChatPhoto = Updates; messages.editChatPhoto#35ddd674 chat_id:long photo:InputChatPhoto = Updates;
messages.addChatUser#f9a0aa09 chat_id:int user_id:InputUser fwd_limit:int = Updates; messages.addChatUser#f24753e3 chat_id:long user_id:InputUser fwd_limit:int = Updates;
messages.deleteChatUser#c534459a flags:# revoke_history:flags.0?true chat_id:int user_id:InputUser = Updates; messages.deleteChatUser#a2185cab flags:# revoke_history:flags.0?true chat_id:long user_id:InputUser = Updates;
messages.createChat#9cb126e users:Vector<InputUser> title:string = Updates; messages.createChat#9cb126e users:Vector<InputUser> title:string = Updates;
messages.getDhConfig#26cf8950 version:int random_length:int = messages.DhConfig; messages.getDhConfig#26cf8950 version:int random_length:int = messages.DhConfig;
messages.requestEncryption#f64daf43 user_id:InputUser random_id:int g_a:bytes = EncryptedChat; messages.requestEncryption#f64daf43 user_id:InputUser random_id:int g_a:bytes = EncryptedChat;
@ -1428,8 +1431,8 @@ messages.sendEncryptedService#32d439a4 peer:InputEncryptedChat random_id:long da
messages.receivedQueue#55a5bb66 max_qts:int = Vector<long>; messages.receivedQueue#55a5bb66 max_qts:int = Vector<long>;
messages.reportEncryptedSpam#4b0c8c0f peer:InputEncryptedChat = Bool; messages.reportEncryptedSpam#4b0c8c0f peer:InputEncryptedChat = Bool;
messages.readMessageContents#36a73f77 id:Vector<int> = messages.AffectedMessages; messages.readMessageContents#36a73f77 id:Vector<int> = messages.AffectedMessages;
messages.getStickers#43d4f2c emoticon:string hash:int = messages.Stickers; messages.getStickers#d5a5d3a1 emoticon:string hash:long = messages.Stickers;
messages.getAllStickers#1c9618b1 hash:int = messages.AllStickers; messages.getAllStickers#b8a0a1a8 hash:long = messages.AllStickers;
messages.getWebPagePreview#8b68b0cc flags:# message:string entities:flags.3?Vector<MessageEntity> = MessageMedia; messages.getWebPagePreview#8b68b0cc flags:# message:string entities:flags.3?Vector<MessageEntity> = MessageMedia;
messages.exportChatInvite#14b9bcd7 flags:# legacy_revoke_permanent:flags.2?true peer:InputPeer expire_date:flags.0?int usage_limit:flags.1?int = ExportedChatInvite; messages.exportChatInvite#14b9bcd7 flags:# legacy_revoke_permanent:flags.2?true peer:InputPeer expire_date:flags.0?int usage_limit:flags.1?int = ExportedChatInvite;
messages.checkChatInvite#3eadb1bb hash:string = ChatInvite; messages.checkChatInvite#3eadb1bb hash:string = ChatInvite;
@ -1439,12 +1442,12 @@ messages.installStickerSet#c78fe460 stickerset:InputStickerSet archived:Bool = m
messages.uninstallStickerSet#f96e55de stickerset:InputStickerSet = Bool; messages.uninstallStickerSet#f96e55de stickerset:InputStickerSet = Bool;
messages.startBot#e6df7378 bot:InputUser peer:InputPeer random_id:long start_param:string = Updates; messages.startBot#e6df7378 bot:InputUser peer:InputPeer random_id:long start_param:string = Updates;
messages.getMessagesViews#5784d3e1 peer:InputPeer id:Vector<int> increment:Bool = messages.MessageViews; messages.getMessagesViews#5784d3e1 peer:InputPeer id:Vector<int> increment:Bool = messages.MessageViews;
messages.editChatAdmin#a9e69f2e chat_id:int user_id:InputUser is_admin:Bool = Bool; messages.editChatAdmin#a85bd1c2 chat_id:long user_id:InputUser is_admin:Bool = Bool;
messages.migrateChat#15a3b8e3 chat_id:int = Updates; messages.migrateChat#a2875319 chat_id:long = Updates;
messages.searchGlobal#4bc6589a flags:# folder_id:flags.0?int q:string filter:MessagesFilter min_date:int max_date:int offset_rate:int offset_peer:InputPeer offset_id:int limit:int = messages.Messages; messages.searchGlobal#4bc6589a flags:# folder_id:flags.0?int q:string filter:MessagesFilter min_date:int max_date:int offset_rate:int offset_peer:InputPeer offset_id:int limit:int = messages.Messages;
messages.reorderStickerSets#78337739 flags:# masks:flags.0?true order:Vector<long> = Bool; messages.reorderStickerSets#78337739 flags:# masks:flags.0?true order:Vector<long> = Bool;
messages.getDocumentByHash#338e2464 sha256:bytes size:int mime_type:string = Document; messages.getDocumentByHash#338e2464 sha256:bytes size:int mime_type:string = Document;
messages.getSavedGifs#83bf3d52 hash:int = messages.SavedGifs; messages.getSavedGifs#5cf09635 hash:long = messages.SavedGifs;
messages.saveGif#327a30cb id:InputDocument unsave:Bool = Bool; messages.saveGif#327a30cb id:InputDocument unsave:Bool = Bool;
messages.getInlineBotResults#514e999d flags:# bot:InputUser peer:InputPeer geo_point:flags.0?InputGeoPoint query:string offset:string = messages.BotResults; messages.getInlineBotResults#514e999d flags:# bot:InputUser peer:InputPeer geo_point:flags.0?InputGeoPoint query:string offset:string = messages.BotResults;
messages.setInlineBotResults#eb5ea206 flags:# gallery:flags.0?true private:flags.1?true query_id:long results:Vector<InputBotInlineResult> cache_time:int next_offset:flags.2?string switch_pm:flags.3?InlineBotSwitchPM = Bool; messages.setInlineBotResults#eb5ea206 flags:# gallery:flags.0?true private:flags.1?true query_id:long results:Vector<InputBotInlineResult> cache_time:int next_offset:flags.2?string switch_pm:flags.3?InlineBotSwitchPM = Bool;
@ -1457,20 +1460,20 @@ messages.setBotCallbackAnswer#d58f130a flags:# alert:flags.1?true query_id:long
messages.getPeerDialogs#e470bcfd peers:Vector<InputDialogPeer> = messages.PeerDialogs; messages.getPeerDialogs#e470bcfd peers:Vector<InputDialogPeer> = messages.PeerDialogs;
messages.saveDraft#bc39e14b flags:# no_webpage:flags.1?true reply_to_msg_id:flags.0?int peer:InputPeer message:string entities:flags.3?Vector<MessageEntity> = Bool; messages.saveDraft#bc39e14b flags:# no_webpage:flags.1?true reply_to_msg_id:flags.0?int peer:InputPeer message:string entities:flags.3?Vector<MessageEntity> = Bool;
messages.getAllDrafts#6a3f8d65 = Updates; messages.getAllDrafts#6a3f8d65 = Updates;
messages.getFeaturedStickers#2dacca4f hash:int = messages.FeaturedStickers; messages.getFeaturedStickers#64780b14 hash:long = messages.FeaturedStickers;
messages.readFeaturedStickers#5b118126 id:Vector<long> = Bool; messages.readFeaturedStickers#5b118126 id:Vector<long> = Bool;
messages.getRecentStickers#5ea192c9 flags:# attached:flags.0?true hash:int = messages.RecentStickers; messages.getRecentStickers#9da9403b flags:# attached:flags.0?true hash:long = messages.RecentStickers;
messages.saveRecentSticker#392718f8 flags:# attached:flags.0?true id:InputDocument unsave:Bool = Bool; messages.saveRecentSticker#392718f8 flags:# attached:flags.0?true id:InputDocument unsave:Bool = Bool;
messages.clearRecentStickers#8999602d flags:# attached:flags.0?true = Bool; messages.clearRecentStickers#8999602d flags:# attached:flags.0?true = Bool;
messages.getArchivedStickers#57f17692 flags:# masks:flags.0?true offset_id:long limit:int = messages.ArchivedStickers; messages.getArchivedStickers#57f17692 flags:# masks:flags.0?true offset_id:long limit:int = messages.ArchivedStickers;
messages.getMaskStickers#65b8c79f hash:int = messages.AllStickers; messages.getMaskStickers#640f82b8 hash:long = messages.AllStickers;
messages.getAttachedStickers#cc5b67cc media:InputStickeredMedia = Vector<StickerSetCovered>; messages.getAttachedStickers#cc5b67cc media:InputStickeredMedia = Vector<StickerSetCovered>;
messages.setGameScore#8ef8ecc0 flags:# edit_message:flags.0?true force:flags.1?true peer:InputPeer id:int user_id:InputUser score:int = Updates; messages.setGameScore#8ef8ecc0 flags:# edit_message:flags.0?true force:flags.1?true peer:InputPeer id:int user_id:InputUser score:int = Updates;
messages.setInlineGameScore#15ad9f64 flags:# edit_message:flags.0?true force:flags.1?true id:InputBotInlineMessageID user_id:InputUser score:int = Bool; messages.setInlineGameScore#15ad9f64 flags:# edit_message:flags.0?true force:flags.1?true id:InputBotInlineMessageID user_id:InputUser score:int = Bool;
messages.getGameHighScores#e822649d peer:InputPeer id:int user_id:InputUser = messages.HighScores; messages.getGameHighScores#e822649d peer:InputPeer id:int user_id:InputUser = messages.HighScores;
messages.getInlineGameHighScores#f635e1b id:InputBotInlineMessageID user_id:InputUser = messages.HighScores; messages.getInlineGameHighScores#f635e1b id:InputBotInlineMessageID user_id:InputUser = messages.HighScores;
messages.getCommonChats#d0a48c4 user_id:InputUser max_id:int limit:int = messages.Chats; messages.getCommonChats#e40ca104 user_id:InputUser max_id:long limit:int = messages.Chats;
messages.getAllChats#eba80ff0 except_ids:Vector<int> = messages.Chats; messages.getAllChats#875f74be except_ids:Vector<long> = messages.Chats;
messages.getWebPage#32ca8f91 url:string hash:int = WebPage; messages.getWebPage#32ca8f91 url:string hash:int = WebPage;
messages.toggleDialogPin#a731e257 flags:# pinned:flags.0?true peer:InputDialogPeer = Bool; messages.toggleDialogPin#a731e257 flags:# pinned:flags.0?true peer:InputDialogPeer = Bool;
messages.reorderPinnedDialogs#3b1adf37 flags:# force:flags.0?true folder_id:int order:Vector<InputDialogPeer> = Bool; messages.reorderPinnedDialogs#3b1adf37 flags:# force:flags.0?true folder_id:int order:Vector<InputDialogPeer> = Bool;
@ -1479,14 +1482,14 @@ messages.setBotShippingResults#e5f672fa flags:# query_id:long error:flags.0?stri
messages.setBotPrecheckoutResults#9c2dd95 flags:# success:flags.1?true query_id:long error:flags.0?string = Bool; messages.setBotPrecheckoutResults#9c2dd95 flags:# success:flags.1?true query_id:long error:flags.0?string = Bool;
messages.uploadMedia#519bc2b1 peer:InputPeer media:InputMedia = MessageMedia; messages.uploadMedia#519bc2b1 peer:InputPeer media:InputMedia = MessageMedia;
messages.sendScreenshotNotification#c97df020 peer:InputPeer reply_to_msg_id:int random_id:long = Updates; messages.sendScreenshotNotification#c97df020 peer:InputPeer reply_to_msg_id:int random_id:long = Updates;
messages.getFavedStickers#21ce0b0e hash:int = messages.FavedStickers; messages.getFavedStickers#4f1aaa9 hash:long = messages.FavedStickers;
messages.faveSticker#b9ffc55b id:InputDocument unfave:Bool = Bool; messages.faveSticker#b9ffc55b id:InputDocument unfave:Bool = Bool;
messages.getUnreadMentions#46578472 peer:InputPeer offset_id:int add_offset:int limit:int max_id:int min_id:int = messages.Messages; messages.getUnreadMentions#46578472 peer:InputPeer offset_id:int add_offset:int limit:int max_id:int min_id:int = messages.Messages;
messages.readMentions#f0189d3 peer:InputPeer = messages.AffectedHistory; messages.readMentions#f0189d3 peer:InputPeer = messages.AffectedHistory;
messages.getRecentLocations#bbc45b09 peer:InputPeer limit:int hash:int = messages.Messages; messages.getRecentLocations#702a40e0 peer:InputPeer limit:int hash:long = messages.Messages;
messages.sendMultiMedia#cc0110cb flags:# silent:flags.5?true background:flags.6?true clear_draft:flags.7?true peer:InputPeer reply_to_msg_id:flags.0?int multi_media:Vector<InputSingleMedia> schedule_date:flags.10?int = Updates; messages.sendMultiMedia#cc0110cb flags:# silent:flags.5?true background:flags.6?true clear_draft:flags.7?true peer:InputPeer reply_to_msg_id:flags.0?int multi_media:Vector<InputSingleMedia> schedule_date:flags.10?int = Updates;
messages.uploadEncryptedFile#5057c497 peer:InputEncryptedChat file:InputEncryptedFile = EncryptedFile; messages.uploadEncryptedFile#5057c497 peer:InputEncryptedChat file:InputEncryptedFile = EncryptedFile;
messages.searchStickerSets#c2b7d08b flags:# exclude_featured:flags.0?true q:string hash:int = messages.FoundStickerSets; messages.searchStickerSets#35705b8a flags:# exclude_featured:flags.0?true q:string hash:long = messages.FoundStickerSets;
messages.getSplitRanges#1cff7e08 = Vector<MessageRange>; messages.getSplitRanges#1cff7e08 = Vector<MessageRange>;
messages.markDialogUnread#c286d98f flags:# unread:flags.0?true peer:InputDialogPeer = Bool; messages.markDialogUnread#c286d98f flags:# unread:flags.0?true peer:InputDialogPeer = Bool;
messages.getDialogUnreadMarks#22e24e22 = Vector<DialogPeer>; messages.getDialogUnreadMarks#22e24e22 = Vector<DialogPeer>;
@ -1506,7 +1509,7 @@ messages.getSearchCounters#732eef00 peer:InputPeer filters:Vector<MessagesFilter
messages.requestUrlAuth#198fb446 flags:# peer:flags.1?InputPeer msg_id:flags.1?int button_id:flags.1?int url:flags.2?string = UrlAuthResult; messages.requestUrlAuth#198fb446 flags:# peer:flags.1?InputPeer msg_id:flags.1?int button_id:flags.1?int url:flags.2?string = UrlAuthResult;
messages.acceptUrlAuth#b12c7125 flags:# write_allowed:flags.0?true peer:flags.1?InputPeer msg_id:flags.1?int button_id:flags.1?int url:flags.2?string = UrlAuthResult; messages.acceptUrlAuth#b12c7125 flags:# write_allowed:flags.0?true peer:flags.1?InputPeer msg_id:flags.1?int button_id:flags.1?int url:flags.2?string = UrlAuthResult;
messages.hidePeerSettingsBar#4facb138 peer:InputPeer = Bool; messages.hidePeerSettingsBar#4facb138 peer:InputPeer = Bool;
messages.getScheduledHistory#e2c2685b peer:InputPeer hash:int = messages.Messages; messages.getScheduledHistory#f516760b peer:InputPeer hash:long = messages.Messages;
messages.getScheduledMessages#bdbb0464 peer:InputPeer id:Vector<int> = messages.Messages; messages.getScheduledMessages#bdbb0464 peer:InputPeer id:Vector<int> = messages.Messages;
messages.sendScheduledMessages#bd38850a peer:InputPeer id:Vector<int> = Updates; messages.sendScheduledMessages#bd38850a peer:InputPeer id:Vector<int> = Updates;
messages.deleteScheduledMessages#59ae2b16 peer:InputPeer id:Vector<int> = Updates; messages.deleteScheduledMessages#59ae2b16 peer:InputPeer id:Vector<int> = Updates;
@ -1516,12 +1519,12 @@ messages.getDialogFilters#f19ed96d = Vector<DialogFilter>;
messages.getSuggestedDialogFilters#a29cd42c = Vector<DialogFilterSuggested>; messages.getSuggestedDialogFilters#a29cd42c = Vector<DialogFilterSuggested>;
messages.updateDialogFilter#1ad4a04a flags:# id:int filter:flags.0?DialogFilter = Bool; messages.updateDialogFilter#1ad4a04a flags:# id:int filter:flags.0?DialogFilter = Bool;
messages.updateDialogFiltersOrder#c563c1e4 order:Vector<int> = Bool; messages.updateDialogFiltersOrder#c563c1e4 order:Vector<int> = Bool;
messages.getOldFeaturedStickers#5fe7025b offset:int limit:int hash:int = messages.FeaturedStickers; messages.getOldFeaturedStickers#7ed094a1 offset:int limit:int hash:long = messages.FeaturedStickers;
messages.getReplies#24b581ba peer:InputPeer msg_id:int offset_id:int offset_date:int add_offset:int limit:int max_id:int min_id:int hash:int = messages.Messages; messages.getReplies#22ddd30c peer:InputPeer msg_id:int offset_id:int offset_date:int add_offset:int limit:int max_id:int min_id:int hash:long = messages.Messages;
messages.getDiscussionMessage#446972fd peer:InputPeer msg_id:int = messages.DiscussionMessage; messages.getDiscussionMessage#446972fd peer:InputPeer msg_id:int = messages.DiscussionMessage;
messages.readDiscussion#f731a9f4 peer:InputPeer msg_id:int read_max_id:int = Bool; messages.readDiscussion#f731a9f4 peer:InputPeer msg_id:int read_max_id:int = Bool;
messages.unpinAllMessages#f025bc8b peer:InputPeer = messages.AffectedHistory; messages.unpinAllMessages#f025bc8b peer:InputPeer = messages.AffectedHistory;
messages.deleteChat#83247d11 chat_id:int = Bool; messages.deleteChat#5bd0ee50 chat_id:long = Bool;
messages.deletePhoneCallHistory#f9cbe409 flags:# revoke:flags.0?true = messages.AffectedFoundMessages; messages.deletePhoneCallHistory#f9cbe409 flags:# revoke:flags.0?true = messages.AffectedFoundMessages;
messages.checkHistoryImport#43fe19f3 import_head:string = messages.HistoryImportParsed; messages.checkHistoryImport#43fe19f3 import_head:string = messages.HistoryImportParsed;
messages.initHistoryImport#34090c3b peer:InputPeer file:InputFile media_count:int = messages.HistoryImport; messages.initHistoryImport#34090c3b peer:InputPeer file:InputFile media_count:int = messages.HistoryImport;
@ -1537,6 +1540,7 @@ messages.getChatInviteImporters#26fb7289 peer:InputPeer link:string offset_date:
messages.setHistoryTTL#b80e5fe4 peer:InputPeer period:int = Updates; messages.setHistoryTTL#b80e5fe4 peer:InputPeer period:int = Updates;
messages.checkHistoryImportPeer#5dc60f03 peer:InputPeer = messages.CheckedHistoryImportPeer; messages.checkHistoryImportPeer#5dc60f03 peer:InputPeer = messages.CheckedHistoryImportPeer;
messages.setChatTheme#e63be13f peer:InputPeer emoticon:string = Updates; messages.setChatTheme#e63be13f peer:InputPeer emoticon:string = Updates;
messages.getMessageReadParticipants#2c6f97b7 peer:InputPeer msg_id:int = Vector<long>;
updates.getState#edd4882a = updates.State; updates.getState#edd4882a = updates.State;
updates.getDifference#25939651 flags:# pts:int pts_total_limit:flags.0?int date:int qts:int = updates.Difference; updates.getDifference#25939651 flags:# pts:int pts_total_limit:flags.0?int date:int qts:int = updates.Difference;
@ -1584,7 +1588,7 @@ channels.deleteMessages#84c1fd4e channel:InputChannel id:Vector<int> = messages.
channels.deleteUserHistory#d10dd71b channel:InputChannel user_id:InputUser = messages.AffectedHistory; channels.deleteUserHistory#d10dd71b channel:InputChannel user_id:InputUser = messages.AffectedHistory;
channels.reportSpam#fe087810 channel:InputChannel user_id:InputUser id:Vector<int> = Bool; channels.reportSpam#fe087810 channel:InputChannel user_id:InputUser id:Vector<int> = Bool;
channels.getMessages#ad8c9a23 channel:InputChannel id:Vector<InputMessage> = messages.Messages; channels.getMessages#ad8c9a23 channel:InputChannel id:Vector<InputMessage> = messages.Messages;
channels.getParticipants#123e05e9 channel:InputChannel filter:ChannelParticipantsFilter offset:int limit:int hash:int = channels.ChannelParticipants; channels.getParticipants#77ced9d0 channel:InputChannel filter:ChannelParticipantsFilter offset:int limit:int hash:long = channels.ChannelParticipants;
channels.getParticipant#a0ab6cc6 channel:InputChannel participant:InputPeer = channels.ChannelParticipant; channels.getParticipant#a0ab6cc6 channel:InputChannel participant:InputPeer = channels.ChannelParticipant;
channels.getChannels#a7f6bbb id:Vector<InputChannel> = messages.Chats; channels.getChannels#a7f6bbb id:Vector<InputChannel> = messages.Chats;
channels.getFullChannel#8736a09 channel:InputChannel = messages.ChatFull; channels.getFullChannel#8736a09 channel:InputChannel = messages.ChatFull;

View File

@ -42,7 +42,7 @@ class GetSavedGifsQuery final : public Td::ResultHandler {
bool is_repair_ = false; bool is_repair_ = false;
public: public:
void send(bool is_repair, int32 hash) { void send(bool is_repair, int64 hash) {
is_repair_ = is_repair; is_repair_ = is_repair;
LOG(INFO) << "Send get saved animations request with hash = " << hash; LOG(INFO) << "Send get saved animations request with hash = " << hash;
send_query(G()->net_query_creator().create(telegram_api::messages_getSavedGifs(hash))); send_query(G()->net_query_creator().create(telegram_api::messages_getSavedGifs(hash)));
@ -664,9 +664,9 @@ void AnimationsManager::on_get_saved_animations_failed(bool is_repair, Status er
} }
} }
int32 AnimationsManager::get_saved_animations_hash(const char *source) const { int64 AnimationsManager::get_saved_animations_hash(const char *source) const {
vector<uint32> numbers; vector<uint64> numbers;
numbers.reserve(saved_animation_ids_.size() * 2); numbers.reserve(saved_animation_ids_.size());
for (auto animation_id : saved_animation_ids_) { for (auto animation_id : saved_animation_ids_) {
auto animation = get_animation(animation_id); auto animation = get_animation(animation_id);
CHECK(animation != nullptr); CHECK(animation != nullptr);
@ -676,9 +676,7 @@ int32 AnimationsManager::get_saved_animations_hash(const char *source) const {
LOG(ERROR) << "Saved animation remote location is not document: " << source << " " << file_view.remote_location(); LOG(ERROR) << "Saved animation remote location is not document: " << source << " " << file_view.remote_location();
continue; continue;
} }
auto id = static_cast<uint64>(file_view.remote_location().get_id()); numbers.push_back(file_view.remote_location().get_id());
numbers.push_back(static_cast<uint32>(id >> 32));
numbers.push_back(static_cast<uint32>(id & 0xFFFFFFFF));
} }
return get_vector_hash(numbers); return get_vector_hash(numbers);
} }

View File

@ -116,7 +116,7 @@ class AnimationsManager final : public Actor {
FileId on_get_animation(unique_ptr<Animation> new_animation, bool replace); FileId on_get_animation(unique_ptr<Animation> new_animation, bool replace);
int32 get_saved_animations_hash(const char *source) const; int64 get_saved_animations_hash(const char *source) const;
void add_saved_animation_impl(FileId animation_id, bool add_on_server, Promise<Unit> &&promise); void add_saved_animation_impl(FileId animation_id, bool add_on_server, Promise<Unit> &&promise);

View File

@ -202,7 +202,7 @@ void CallbackQueriesManager::on_new_query(int32 flags, int64 callback_query_id,
void CallbackQueriesManager::on_new_inline_query( void CallbackQueriesManager::on_new_inline_query(
int32 flags, int64 callback_query_id, UserId sender_user_id, int32 flags, int64 callback_query_id, UserId sender_user_id,
tl_object_ptr<telegram_api::inputBotInlineMessageID> &&inline_message_id, BufferSlice &&data, int64 chat_instance, tl_object_ptr<telegram_api::InputBotInlineMessageID> &&inline_message_id, BufferSlice &&data, int64 chat_instance,
string &&game_short_name) { string &&game_short_name) {
if (!sender_user_id.is_valid()) { if (!sender_user_id.is_valid()) {
LOG(ERROR) << "Receive new callback query from invalid " << sender_user_id; LOG(ERROR) << "Receive new callback query from invalid " << sender_user_id;

View File

@ -36,7 +36,7 @@ class CallbackQueriesManager {
MessageId message_id, BufferSlice &&data, int64 chat_instance, string &&game_short_name); MessageId message_id, BufferSlice &&data, int64 chat_instance, string &&game_short_name);
void on_new_inline_query(int32 flags, int64 callback_query_id, UserId sender_user_id, void on_new_inline_query(int32 flags, int64 callback_query_id, UserId sender_user_id,
tl_object_ptr<telegram_api::inputBotInlineMessageID> &&inline_message_id, BufferSlice &&data, tl_object_ptr<telegram_api::InputBotInlineMessageID> &&inline_message_id, BufferSlice &&data,
int64 chat_instance, string &&game_short_name); int64 chat_instance, string &&game_short_name);
int64 send_callback_query(FullMessageId full_message_id, tl_object_ptr<td_api::CallbackQueryPayload> &&payload, int64 send_callback_query(FullMessageId full_message_id, tl_object_ptr<td_api::CallbackQueryPayload> &&payload,

View File

@ -15,21 +15,21 @@
namespace td { namespace td {
class ChannelId { class ChannelId {
int32 id = 0; int64 id = 0;
public: public:
ChannelId() = default; ChannelId() = default;
explicit ChannelId(int32 channel_id) : id(channel_id) { explicit ChannelId(int64 channel_id) : id(channel_id) {
} }
template <class T, typename = std::enable_if_t<std::is_convertible<T, int32>::value>> template <class T, typename = std::enable_if_t<std::is_convertible<T, int64>::value>>
ChannelId(T channel_id) = delete; ChannelId(T channel_id) = delete;
bool is_valid() const { bool is_valid() const {
return id > 0; // TODO better is_valid return id > 0; // TODO better is_valid
} }
int32 get() const { int64 get() const {
return id; return id;
} }
@ -43,18 +43,22 @@ class ChannelId {
template <class StorerT> template <class StorerT>
void store(StorerT &storer) const { void store(StorerT &storer) const {
storer.store_int(id); storer.store_long(id);
} }
template <class ParserT> template <class ParserT>
void parse(ParserT &parser) { void parse(ParserT &parser) {
id = parser.fetch_int(); if (parser.version() >= static_cast<int32>(Version::Support64BitIds)) {
id = parser.fetch_long();
} else {
id = parser.fetch_int();
}
} }
}; };
struct ChannelIdHash { struct ChannelIdHash {
std::size_t operator()(ChannelId channel_id) const { std::size_t operator()(ChannelId channel_id) const {
return std::hash<int32>()(channel_id.get()); return std::hash<int64>()(channel_id.get());
} }
}; };

View File

@ -15,21 +15,21 @@
namespace td { namespace td {
class ChatId { class ChatId {
int32 id = 0; int64 id = 0;
public: public:
ChatId() = default; ChatId() = default;
explicit ChatId(int32 chat_id) : id(chat_id) { explicit ChatId(int64 chat_id) : id(chat_id) {
} }
template <class T, typename = std::enable_if_t<std::is_convertible<T, int32>::value>> template <class T, typename = std::enable_if_t<std::is_convertible<T, int64>::value>>
ChatId(T chat_id) = delete; ChatId(T chat_id) = delete;
bool is_valid() const { bool is_valid() const {
return id > 0; return id > 0;
} }
int32 get() const { int64 get() const {
return id; return id;
} }
@ -43,18 +43,22 @@ class ChatId {
template <class StorerT> template <class StorerT>
void store(StorerT &storer) const { void store(StorerT &storer) const {
storer.store_int(id); storer.store_long(id);
} }
template <class ParserT> template <class ParserT>
void parse(ParserT &parser) { void parse(ParserT &parser) {
id = parser.fetch_int(); if (parser.version() >= static_cast<int32>(Version::Support64BitIds)) {
id = parser.fetch_long();
} else {
id = parser.fetch_int();
}
} }
}; };
struct ChatIdHash { struct ChatIdHash {
std::size_t operator()(ChatId chat_id) const { std::size_t operator()(ChatId chat_id) const {
return std::hash<int32>()(chat_id.get()); return std::hash<int64>()(chat_id.get());
} }
}; };

View File

@ -50,7 +50,7 @@ tl_object_ptr<telegram_api::inputMediaContact> Contact::get_input_media_contact(
SecretInputMedia Contact::get_secret_input_media_contact() const { SecretInputMedia Contact::get_secret_input_media_contact() const {
return SecretInputMedia{nullptr, make_tl_object<secret_api::decryptedMessageMediaContact>( return SecretInputMedia{nullptr, make_tl_object<secret_api::decryptedMessageMediaContact>(
phone_number_, first_name_, last_name_, user_id_.get())}; phone_number_, first_name_, last_name_, static_cast<int32>(0))};
} }
tl_object_ptr<telegram_api::inputPhoneContact> Contact::get_input_phone_contact(int64 client_id) const { tl_object_ptr<telegram_api::inputPhoneContact> Contact::get_input_phone_contact(int64 client_id) const {

View File

@ -393,7 +393,7 @@ class ResetWebAuthorizationsQuery final : public Td::ResultHandler {
class GetContactsQuery final : public Td::ResultHandler { class GetContactsQuery final : public Td::ResultHandler {
public: public:
void send(int32 hash) { void send(int64 hash) {
LOG(INFO) << "Reload contacts with hash " << hash; LOG(INFO) << "Reload contacts with hash " << hash;
send_query(G()->net_query_creator().create(telegram_api::contacts_getContacts(hash))); send_query(G()->net_query_creator().create(telegram_api::contacts_getContacts(hash)));
} }
@ -2715,7 +2715,7 @@ class GetChatsQuery final : public Td::ResultHandler {
explicit GetChatsQuery(Promise<Unit> &&promise) : promise_(std::move(promise)) { explicit GetChatsQuery(Promise<Unit> &&promise) : promise_(std::move(promise)) {
} }
void send(vector<int32> &&chat_ids) { void send(vector<int64> &&chat_ids) {
send_query(G()->net_query_creator().create(telegram_api::messages_getChats(std::move(chat_ids)))); send_query(G()->net_query_creator().create(telegram_api::messages_getChats(std::move(chat_ids))));
} }
@ -2975,7 +2975,7 @@ class GetChannelAdministratorsQuery final : public Td::ResultHandler {
explicit GetChannelAdministratorsQuery(Promise<Unit> &&promise) : promise_(std::move(promise)) { explicit GetChannelAdministratorsQuery(Promise<Unit> &&promise) : promise_(std::move(promise)) {
} }
void send(ChannelId channel_id, int32 hash) { void send(ChannelId channel_id, int64 hash) {
auto input_channel = td->contacts_manager_->get_input_channel(channel_id); auto input_channel = td->contacts_manager_->get_input_channel(channel_id);
if (input_channel == nullptr) { if (input_channel == nullptr) {
return promise_.set_error(Status::Error(3, "Supergroup not found")); return promise_.set_error(Status::Error(3, "Supergroup not found"));
@ -3433,12 +3433,12 @@ void ContactsManager::tear_down() {
UserId ContactsManager::load_my_id() { UserId ContactsManager::load_my_id() {
auto id_string = G()->td_db()->get_binlog_pmc()->get("my_id"); auto id_string = G()->td_db()->get_binlog_pmc()->get("my_id");
if (!id_string.empty()) { if (!id_string.empty()) {
UserId my_id(to_integer<int32>(id_string)); UserId my_id(to_integer<int64>(id_string));
if (my_id.is_valid()) { if (my_id.is_valid()) {
return my_id; return my_id;
} }
my_id = UserId(to_integer<int32>(Slice(id_string).substr(5))); my_id = UserId(to_integer<int64>(Slice(id_string).substr(5)));
if (my_id.is_valid()) { if (my_id.is_valid()) {
G()->td_db()->get_binlog_pmc()->set("my_id", to_string(my_id.get())); G()->td_db()->get_binlog_pmc()->set("my_id", to_string(my_id.get()));
return my_id; return my_id;
@ -3456,7 +3456,7 @@ void ContactsManager::on_user_online_timeout_callback(void *contacts_manager_ptr
auto contacts_manager = static_cast<ContactsManager *>(contacts_manager_ptr); auto contacts_manager = static_cast<ContactsManager *>(contacts_manager_ptr);
send_closure_later(contacts_manager->actor_id(contacts_manager), &ContactsManager::on_user_online_timeout, send_closure_later(contacts_manager->actor_id(contacts_manager), &ContactsManager::on_user_online_timeout,
UserId(narrow_cast<int32>(user_id_long))); UserId(user_id_long));
} }
void ContactsManager::on_user_online_timeout(UserId user_id) { void ContactsManager::on_user_online_timeout(UserId user_id) {
@ -3482,7 +3482,7 @@ void ContactsManager::on_channel_unban_timeout_callback(void *contacts_manager_p
auto contacts_manager = static_cast<ContactsManager *>(contacts_manager_ptr); auto contacts_manager = static_cast<ContactsManager *>(contacts_manager_ptr);
send_closure_later(contacts_manager->actor_id(contacts_manager), &ContactsManager::on_channel_unban_timeout, send_closure_later(contacts_manager->actor_id(contacts_manager), &ContactsManager::on_channel_unban_timeout,
ChannelId(narrow_cast<int32>(channel_id_long))); ChannelId(channel_id_long));
} }
void ContactsManager::on_channel_unban_timeout(ChannelId channel_id) { void ContactsManager::on_channel_unban_timeout(ChannelId channel_id) {
@ -3515,7 +3515,7 @@ void ContactsManager::on_user_nearby_timeout_callback(void *contacts_manager_ptr
auto contacts_manager = static_cast<ContactsManager *>(contacts_manager_ptr); auto contacts_manager = static_cast<ContactsManager *>(contacts_manager_ptr);
send_closure_later(contacts_manager->actor_id(contacts_manager), &ContactsManager::on_user_nearby_timeout, send_closure_later(contacts_manager->actor_id(contacts_manager), &ContactsManager::on_user_nearby_timeout,
UserId(narrow_cast<int32>(user_id_long))); UserId(user_id_long));
} }
void ContactsManager::on_user_nearby_timeout(UserId user_id) { void ContactsManager::on_user_nearby_timeout(UserId user_id) {
@ -3544,7 +3544,7 @@ void ContactsManager::on_slow_mode_delay_timeout_callback(void *contacts_manager
auto contacts_manager = static_cast<ContactsManager *>(contacts_manager_ptr); auto contacts_manager = static_cast<ContactsManager *>(contacts_manager_ptr);
send_closure_later(contacts_manager->actor_id(contacts_manager), &ContactsManager::on_slow_mode_delay_timeout, send_closure_later(contacts_manager->actor_id(contacts_manager), &ContactsManager::on_slow_mode_delay_timeout,
ChannelId(narrow_cast<int32>(channel_id_long))); ChannelId(channel_id_long));
} }
void ContactsManager::on_slow_mode_delay_timeout(ChannelId channel_id) { void ContactsManager::on_slow_mode_delay_timeout(ChannelId channel_id) {
@ -3590,8 +3590,7 @@ void ContactsManager::on_channel_participant_cache_timeout_callback(void *contac
auto contacts_manager = static_cast<ContactsManager *>(contacts_manager_ptr); auto contacts_manager = static_cast<ContactsManager *>(contacts_manager_ptr);
send_closure_later(contacts_manager->actor_id(contacts_manager), send_closure_later(contacts_manager->actor_id(contacts_manager),
&ContactsManager::on_channel_participant_cache_timeout, &ContactsManager::on_channel_participant_cache_timeout, ChannelId(channel_id_long));
ChannelId(narrow_cast<int32>(channel_id_long)));
} }
void ContactsManager::on_channel_participant_cache_timeout(ChannelId channel_id) { void ContactsManager::on_channel_participant_cache_timeout(ChannelId channel_id) {
@ -5039,7 +5038,7 @@ ContactsManager::MyOnlineStatusInfo ContactsManager::get_my_online_status() cons
} }
UserId ContactsManager::get_service_notifications_user_id() { UserId ContactsManager::get_service_notifications_user_id() {
return UserId(777000); return UserId(static_cast<int64>(777000));
} }
UserId ContactsManager::add_service_notifications_user() { UserId ContactsManager::add_service_notifications_user() {
@ -5051,11 +5050,11 @@ UserId ContactsManager::add_service_notifications_user() {
} }
UserId ContactsManager::get_replies_bot_user_id() { UserId ContactsManager::get_replies_bot_user_id() {
return UserId(G()->is_test_dc() ? 708513 : 1271266957); return UserId(static_cast<int64>(G()->is_test_dc() ? 708513 : 1271266957));
} }
UserId ContactsManager::get_anonymous_bot_user_id() { UserId ContactsManager::get_anonymous_bot_user_id() {
return UserId(G()->is_test_dc() ? 552888 : 1087968824); return UserId(static_cast<int64>(G()->is_test_dc() ? 552888 : 1087968824));
} }
UserId ContactsManager::add_anonymous_bot_user() { UserId ContactsManager::add_anonymous_bot_user() {
@ -5297,7 +5296,7 @@ void ContactsManager::load_contacts(Promise<Unit> &&promise) {
} }
} }
int32 ContactsManager::get_contacts_hash() { int64 ContactsManager::get_contacts_hash() {
if (!are_contacts_loaded_) { if (!are_contacts_loaded_) {
return 0; return 0;
} }
@ -5310,11 +5309,11 @@ int32 ContactsManager::get_contacts_hash() {
user_ids.insert(std::upper_bound(user_ids.begin(), user_ids.end(), my_id.get()), my_id.get()); user_ids.insert(std::upper_bound(user_ids.begin(), user_ids.end(), my_id.get()), my_id.get());
} }
vector<uint32> numbers; vector<uint64> numbers;
numbers.reserve(user_ids.size() + 1); numbers.reserve(user_ids.size() + 1);
numbers.push_back(saved_contact_count_); numbers.push_back(saved_contact_count_);
for (auto user_id : user_ids) { for (auto user_id : user_ids) {
numbers.push_back(narrow_cast<uint32>(user_id)); numbers.push_back(user_id);
} }
return get_vector_hash(numbers); return get_vector_hash(numbers);
} }
@ -5751,7 +5750,7 @@ std::pair<int32, vector<UserId>> ContactsManager::search_contacts(const string &
vector<UserId> user_ids; vector<UserId> user_ids;
user_ids.reserve(result.second.size()); user_ids.reserve(result.second.size());
for (auto key : result.second) { for (auto key : result.second) {
user_ids.emplace_back(narrow_cast<int32>(key)); user_ids.emplace_back(key);
} }
promise.set_value(Unit()); promise.set_value(Unit());
@ -6547,7 +6546,7 @@ void ContactsManager::set_channel_location(DialogId dialog_id, const DialogLocat
} }
void ContactsManager::set_channel_slow_mode_delay(DialogId dialog_id, int32 slow_mode_delay, Promise<Unit> &&promise) { void ContactsManager::set_channel_slow_mode_delay(DialogId dialog_id, int32 slow_mode_delay, Promise<Unit> &&promise) {
std::vector<int32> allowed_slow_mode_delays{0, 10, 30, 60, 300, 900, 3600}; vector<int32> allowed_slow_mode_delays{0, 10, 30, 60, 300, 900, 3600};
if (!td::contains(allowed_slow_mode_delays, slow_mode_delay)) { if (!td::contains(allowed_slow_mode_delays, slow_mode_delay)) {
return promise.set_error(Status::Error(400, "Invalid new value for slow mode delay")); return promise.set_error(Status::Error(400, "Invalid new value for slow mode delay"));
} }
@ -7918,7 +7917,7 @@ void ContactsManager::save_contacts_to_database() {
LOG(INFO) << "Schedule save contacts to database"; LOG(INFO) << "Schedule save contacts to database";
vector<UserId> user_ids = vector<UserId> user_ids =
transform(contacts_hints_.search_empty(100000).second, [](int64 key) { return UserId(narrow_cast<int32>(key)); }); transform(contacts_hints_.search_empty(100000).second, [](int64 key) { return UserId(key); });
G()->td_db()->get_binlog_pmc()->set("saved_contact_count", to_string(saved_contact_count_)); G()->td_db()->get_binlog_pmc()->set("saved_contact_count", to_string(saved_contact_count_));
G()->td_db()->get_binlog()->force_sync(PromiseCreator::lambda([user_ids = std::move(user_ids)](Result<> result) { G()->td_db()->get_binlog()->force_sync(PromiseCreator::lambda([user_ids = std::move(user_ids)](Result<> result) {
@ -13991,7 +13990,7 @@ bool ContactsManager::get_chat(ChatId chat_id, int left_tries, Promise<Unit> &&p
} }
if (left_tries > 1) { if (left_tries > 1) {
td_->create_handler<GetChatsQuery>(std::move(promise))->send(vector<int32>{chat_id.get()}); td_->create_handler<GetChatsQuery>(std::move(promise))->send(vector<int64>{chat_id.get()});
return false; return false;
} }
@ -14009,7 +14008,7 @@ void ContactsManager::reload_chat(ChatId chat_id, Promise<Unit> &&promise) {
} }
// there is no much reason to combine different requests into one request // there is no much reason to combine different requests into one request
td_->create_handler<GetChatsQuery>(std::move(promise))->send(vector<int32>{chat_id.get()}); td_->create_handler<GetChatsQuery>(std::move(promise))->send(vector<int64>{chat_id.get()});
} }
const ContactsManager::ChatFull *ContactsManager::get_chat_full(ChatId chat_id) const { const ContactsManager::ChatFull *ContactsManager::get_chat_full(ChatId chat_id) const {
@ -15133,7 +15132,7 @@ vector<DialogAdministrator> ContactsManager::get_dialog_administrators(DialogId
promise.set_value(Unit()); promise.set_value(Unit());
if (left_tries >= 2) { if (left_tries >= 2) {
auto hash = get_vector_hash(transform(it->second, [](const DialogAdministrator &administrator) { auto hash = get_vector_hash(transform(it->second, [](const DialogAdministrator &administrator) {
return static_cast<uint32>(administrator.get_user_id().get()); return static_cast<uint64>(administrator.get_user_id().get());
})); }));
reload_dialog_administrators(dialog_id, hash, Auto()); // update administrators cache reload_dialog_administrators(dialog_id, hash, Auto()); // update administrators cache
} }
@ -15264,7 +15263,7 @@ void ContactsManager::on_update_dialog_administrators(DialogId dialog_id, vector
} }
} }
void ContactsManager::reload_dialog_administrators(DialogId dialog_id, int32 hash, Promise<Unit> &&promise) { void ContactsManager::reload_dialog_administrators(DialogId dialog_id, int64 hash, Promise<Unit> &&promise) {
switch (dialog_id.get_type()) { switch (dialog_id.get_type()) {
case DialogType::Chat: case DialogType::Chat:
load_chat_full(dialog_id.get_chat_id(), false, std::move(promise), "reload_dialog_administrators"); load_chat_full(dialog_id.get_chat_id(), false, std::move(promise), "reload_dialog_administrators");
@ -15817,7 +15816,7 @@ td_api::object_ptr<td_api::updateUser> ContactsManager::get_update_unknown_user_
false, "", false, false, false, td_api::make_object<td_api::userTypeUnknown>(), "")); false, "", false, false, false, td_api::make_object<td_api::userTypeUnknown>(), ""));
} }
int32 ContactsManager::get_user_id_object(UserId user_id, const char *source) const { int64 ContactsManager::get_user_id_object(UserId user_id, const char *source) const {
if (user_id.is_valid() && get_user(user_id) == nullptr && unknown_users_.count(user_id) == 0) { if (user_id.is_valid() && get_user(user_id) == nullptr && unknown_users_.count(user_id) == 0) {
LOG(ERROR) << "Have no info about " << user_id << " from " << source; LOG(ERROR) << "Have no info about " << user_id << " from " << source;
unknown_users_.insert(user_id); unknown_users_.insert(user_id);
@ -15851,7 +15850,7 @@ tl_object_ptr<td_api::user> ContactsManager::get_user_object(UserId user_id, con
std::move(type), u->language_code); std::move(type), u->language_code);
} }
vector<int32> ContactsManager::get_user_ids_object(const vector<UserId> &user_ids, const char *source) const { vector<int64> ContactsManager::get_user_ids_object(const vector<UserId> &user_ids, const char *source) const {
return transform(user_ids, [this, source](UserId user_id) { return get_user_id_object(user_id, source); }); return transform(user_ids, [this, source](UserId user_id) { return get_user_id_object(user_id, source); });
} }
@ -15885,7 +15884,7 @@ td_api::object_ptr<td_api::updateBasicGroup> ContactsManager::get_update_unknown
chat_id.get(), 0, DialogParticipantStatus::Banned(0).get_chat_member_status_object(), true, 0)); chat_id.get(), 0, DialogParticipantStatus::Banned(0).get_chat_member_status_object(), true, 0));
} }
int32 ContactsManager::get_basic_group_id_object(ChatId chat_id, const char *source) const { int64 ContactsManager::get_basic_group_id_object(ChatId chat_id, const char *source) const {
if (chat_id.is_valid() && get_chat(chat_id) == nullptr && unknown_chats_.count(chat_id) == 0) { if (chat_id.is_valid() && get_chat(chat_id) == nullptr && unknown_chats_.count(chat_id) == 0) {
LOG(ERROR) << "Have no info about " << chat_id << " from " << source; LOG(ERROR) << "Have no info about " << chat_id << " from " << source;
unknown_chats_.insert(chat_id); unknown_chats_.insert(chat_id);
@ -15939,7 +15938,7 @@ td_api::object_ptr<td_api::updateSupergroup> ContactsManager::get_update_unknown
false, false, false, true, false, false, string(), false, false)); false, false, false, true, false, false, string(), false, false));
} }
int32 ContactsManager::get_supergroup_id_object(ChannelId channel_id, const char *source) const { int64 ContactsManager::get_supergroup_id_object(ChannelId channel_id, const char *source) const {
if (channel_id.is_valid() && get_channel(channel_id) == nullptr && unknown_channels_.count(channel_id) == 0) { if (channel_id.is_valid() && get_channel(channel_id) == nullptr && unknown_channels_.count(channel_id) == 0) {
LOG(ERROR) << "Have no info about " << channel_id << " received from " << source; LOG(ERROR) << "Have no info about " << channel_id << " received from " << source;
unknown_channels_.insert(channel_id); unknown_channels_.insert(channel_id);
@ -16057,7 +16056,7 @@ tl_object_ptr<td_api::chatInviteLinkInfo> ContactsManager::get_chat_invite_link_
const DialogPhoto *photo = nullptr; const DialogPhoto *photo = nullptr;
DialogPhoto invite_link_photo; DialogPhoto invite_link_photo;
int32 participant_count = 0; int32 participant_count = 0;
vector<int32> member_user_ids; vector<int64> member_user_ids;
bool is_public = false; bool is_public = false;
bool is_member = false; bool is_member = false;
td_api::object_ptr<td_api::ChatType> chat_type; td_api::object_ptr<td_api::ChatType> chat_type;

View File

@ -532,23 +532,23 @@ class ContactsManager final : public Actor {
string additional_query, int32 offset, int32 limit, int32 additional_limit, string additional_query, int32 offset, int32 limit, int32 additional_limit,
Promise<DialogParticipants> &&promise); Promise<DialogParticipants> &&promise);
int32 get_user_id_object(UserId user_id, const char *source) const; int64 get_user_id_object(UserId user_id, const char *source) const;
tl_object_ptr<td_api::user> get_user_object(UserId user_id) const; tl_object_ptr<td_api::user> get_user_object(UserId user_id) const;
vector<int32> get_user_ids_object(const vector<UserId> &user_ids, const char *source) const; vector<int64> get_user_ids_object(const vector<UserId> &user_ids, const char *source) const;
tl_object_ptr<td_api::users> get_users_object(int32 total_count, const vector<UserId> &user_ids) const; tl_object_ptr<td_api::users> get_users_object(int32 total_count, const vector<UserId> &user_ids) const;
tl_object_ptr<td_api::userFullInfo> get_user_full_info_object(UserId user_id) const; tl_object_ptr<td_api::userFullInfo> get_user_full_info_object(UserId user_id) const;
int32 get_basic_group_id_object(ChatId chat_id, const char *source) const; int64 get_basic_group_id_object(ChatId chat_id, const char *source) const;
tl_object_ptr<td_api::basicGroup> get_basic_group_object(ChatId chat_id); tl_object_ptr<td_api::basicGroup> get_basic_group_object(ChatId chat_id);
tl_object_ptr<td_api::basicGroupFullInfo> get_basic_group_full_info_object(ChatId chat_id) const; tl_object_ptr<td_api::basicGroupFullInfo> get_basic_group_full_info_object(ChatId chat_id) const;
int32 get_supergroup_id_object(ChannelId channel_id, const char *source) const; int64 get_supergroup_id_object(ChannelId channel_id, const char *source) const;
tl_object_ptr<td_api::supergroup> get_supergroup_object(ChannelId channel_id) const; tl_object_ptr<td_api::supergroup> get_supergroup_object(ChannelId channel_id) const;
@ -1335,7 +1335,7 @@ class ContactsManager final : public Actor {
int32 get_user_was_online(const User *u, UserId user_id) const; int32 get_user_was_online(const User *u, UserId user_id) const;
int32 get_contacts_hash(); int64 get_contacts_hash();
void update_contacts_hints(const User *u, UserId user_id, bool from_database); void update_contacts_hints(const User *u, UserId user_id, bool from_database);
@ -1435,7 +1435,7 @@ class ContactsManager final : public Actor {
void on_load_administrator_users_finished(DialogId dialog_id, vector<DialogAdministrator> administrators, void on_load_administrator_users_finished(DialogId dialog_id, vector<DialogAdministrator> administrators,
Result<> result, Promise<Unit> promise); Result<> result, Promise<Unit> promise);
void reload_dialog_administrators(DialogId dialog_id, int32 hash, Promise<Unit> &&promise); void reload_dialog_administrators(DialogId dialog_id, int64 hash, Promise<Unit> &&promise);
void remove_dialog_suggested_action(SuggestedAction action); void remove_dialog_suggested_action(SuggestedAction action);

View File

@ -9,14 +9,14 @@
#include "td/telegram/Global.h" #include "td/telegram/Global.h"
#include "td/telegram/misc.h" #include "td/telegram/misc.h"
#include "td/telegram/net/NetQueryDispatcher.h" #include "td/telegram/net/NetQueryDispatcher.h"
#include "td/telegram/TdDb.h"
#include "td/telegram/UserId.h"
#include "td/telegram/td_api.hpp" #include "td/telegram/td_api.hpp"
#include "td/telegram/TdDb.h"
#include "td/telegram/telegram_api.h" #include "td/telegram/telegram_api.h"
#include "td/telegram/UserId.h"
#include "td/mtproto/DhHandshake.h" #include "td/mtproto/DhHandshake.h"
#include "td/utils/algorithm.h"
#include "td/utils/base64.h" #include "td/utils/base64.h"
#include "td/utils/buffer.h" #include "td/utils/buffer.h"
#include "td/utils/format.h" #include "td/utils/format.h"
@ -40,12 +40,13 @@ void DeviceTokenManager::TokenInfo::store(StorerT &storer) const {
bool is_register = state == State::Register; bool is_register = state == State::Register;
CHECK(state != State::Reregister); CHECK(state != State::Reregister);
BEGIN_STORE_FLAGS(); BEGIN_STORE_FLAGS();
STORE_FLAG(has_other_user_ids); STORE_FLAG(false);
STORE_FLAG(is_sync); STORE_FLAG(is_sync);
STORE_FLAG(is_unregister); STORE_FLAG(is_unregister);
STORE_FLAG(is_register); STORE_FLAG(is_register);
STORE_FLAG(is_app_sandbox); STORE_FLAG(is_app_sandbox);
STORE_FLAG(encrypt); STORE_FLAG(encrypt);
STORE_FLAG(has_other_user_ids);
END_STORE_FLAGS(); END_STORE_FLAGS();
store(token, storer); store(token, storer);
if (has_other_user_ids) { if (has_other_user_ids) {
@ -60,17 +61,19 @@ void DeviceTokenManager::TokenInfo::store(StorerT &storer) const {
template <class ParserT> template <class ParserT>
void DeviceTokenManager::TokenInfo::parse(ParserT &parser) { void DeviceTokenManager::TokenInfo::parse(ParserT &parser) {
using td::parse; using td::parse;
bool has_other_user_ids_legacy;
bool has_other_user_ids; bool has_other_user_ids;
bool is_sync; bool is_sync;
bool is_unregister; bool is_unregister;
bool is_register; bool is_register;
BEGIN_PARSE_FLAGS(); BEGIN_PARSE_FLAGS();
PARSE_FLAG(has_other_user_ids); PARSE_FLAG(has_other_user_ids_legacy);
PARSE_FLAG(is_sync); PARSE_FLAG(is_sync);
PARSE_FLAG(is_unregister); PARSE_FLAG(is_unregister);
PARSE_FLAG(is_register); PARSE_FLAG(is_register);
PARSE_FLAG(is_app_sandbox); PARSE_FLAG(is_app_sandbox);
PARSE_FLAG(encrypt); PARSE_FLAG(encrypt);
PARSE_FLAG(has_other_user_ids);
END_PARSE_FLAGS(); END_PARSE_FLAGS();
CHECK(is_sync + is_unregister + is_register == 1); CHECK(is_sync + is_unregister + is_register == 1);
if (is_sync) { if (is_sync) {
@ -81,6 +84,11 @@ void DeviceTokenManager::TokenInfo::parse(ParserT &parser) {
state = State::Register; state = State::Register;
} }
parse(token, parser); parse(token, parser);
if (has_other_user_ids_legacy) {
vector<int32> other_user_ids_legacy;
parse(other_user_ids_legacy, parser);
other_user_ids = transform(other_user_ids_legacy, [](int32 user_id) { return static_cast<int64>(user_id); });
}
if (has_other_user_ids) { if (has_other_user_ids) {
parse(other_user_ids, parser); parse(other_user_ids, parser);
} }
@ -246,7 +254,7 @@ void DeviceTokenManager::register_device(tl_object_ptr<td_api::DeviceToken> devi
info.state = TokenInfo::State::Register; info.state = TokenInfo::State::Register;
info.token = std::move(token); info.token = std::move(token);
} }
info.other_user_ids = std::move(other_user_ids); info.other_user_ids = UserId::get_input_user_ids(other_user_ids);
info.is_app_sandbox = is_app_sandbox; info.is_app_sandbox = is_app_sandbox;
if (encrypt != info.encrypt) { if (encrypt != info.encrypt) {
if (encrypt) { if (encrypt) {
@ -370,15 +378,14 @@ void DeviceTokenManager::loop() {
} }
// have to send query // have to send query
NetQueryPtr net_query; NetQueryPtr net_query;
auto other_user_ids = info.other_user_ids;
if (info.state == TokenInfo::State::Unregister) { if (info.state == TokenInfo::State::Unregister) {
net_query = G()->net_query_creator().create( net_query = G()->net_query_creator().create(
telegram_api::account_unregisterDevice(token_type, info.token, UserId::get_input_user_ids(other_user_ids))); telegram_api::account_unregisterDevice(token_type, info.token, vector<int64>(info.other_user_ids)));
} else { } else {
int32 flags = telegram_api::account_registerDevice::NO_MUTED_MASK; int32 flags = telegram_api::account_registerDevice::NO_MUTED_MASK;
net_query = G()->net_query_creator().create(telegram_api::account_registerDevice( net_query = G()->net_query_creator().create(
flags, false /*ignored*/, token_type, info.token, info.is_app_sandbox, BufferSlice(info.encryption_key), telegram_api::account_registerDevice(flags, false /*ignored*/, token_type, info.token, info.is_app_sandbox,
UserId::get_input_user_ids(other_user_ids))); BufferSlice(info.encryption_key), vector<int64>(info.other_user_ids)));
} }
info.net_query_id = net_query->id(); info.net_query_id = net_query->id();
G()->net_query_dispatcher().dispatch_with_callback(std::move(net_query), actor_shared(this, token_type)); G()->net_query_dispatcher().dispatch_with_callback(std::move(net_query), actor_shared(this, token_type));

View File

@ -55,7 +55,7 @@ class DeviceTokenManager final : public NetQueryCallback {
State state = State::Sync; State state = State::Sync;
string token; string token;
uint64 net_query_id = 0; uint64 net_query_id = 0;
vector<UserId> other_user_ids; vector<int64> other_user_ids;
bool is_app_sandbox = false; bool is_app_sandbox = false;
bool encrypt = false; bool encrypt = false;
string encryption_key; string encryption_key;

View File

@ -94,6 +94,8 @@ DialogAction::DialogAction(tl_object_ptr<telegram_api::SendMessageAction> &&acti
init(Type::Cancel); init(Type::Cancel);
break; break;
case telegram_api::sendMessageTypingAction::ID: case telegram_api::sendMessageTypingAction::ID:
case telegram_api::sendMessageEmojiInteraction::ID:
case telegram_api::sendMessageEmojiInteractionSeen::ID:
init(Type::Typing); init(Type::Typing);
break; break;
case telegram_api::sendMessageRecordVideoAction::ID: case telegram_api::sendMessageRecordVideoAction::ID:

View File

@ -49,17 +49,17 @@ DialogType DialogId::get_type() const {
UserId DialogId::get_user_id() const { UserId DialogId::get_user_id() const {
CHECK(get_type() == DialogType::User); CHECK(get_type() == DialogType::User);
return UserId(static_cast<int32>(id)); return UserId(id);
} }
ChatId DialogId::get_chat_id() const { ChatId DialogId::get_chat_id() const {
CHECK(get_type() == DialogType::Chat); CHECK(get_type() == DialogType::Chat);
return ChatId(static_cast<int32>(-id)); return ChatId(-id);
} }
ChannelId DialogId::get_channel_id() const { ChannelId DialogId::get_channel_id() const {
CHECK(get_type() == DialogType::Channel); CHECK(get_type() == DialogType::Channel);
return ChannelId(static_cast<int32>(MAX_CHANNEL_ID - id)); return ChannelId(MAX_CHANNEL_ID - id);
} }
SecretChatId DialogId::get_secret_chat_id() const { SecretChatId DialogId::get_secret_chat_id() const {
@ -69,7 +69,7 @@ SecretChatId DialogId::get_secret_chat_id() const {
DialogId::DialogId(UserId user_id) { DialogId::DialogId(UserId user_id) {
if (user_id.is_valid()) { if (user_id.is_valid()) {
id = static_cast<int64>(user_id.get()); id = user_id.get();
} else { } else {
id = 0; id = 0;
} }
@ -77,7 +77,7 @@ DialogId::DialogId(UserId user_id) {
DialogId::DialogId(ChatId chat_id) { DialogId::DialogId(ChatId chat_id) {
if (chat_id.is_valid()) { if (chat_id.is_valid()) {
id = -static_cast<int64>(chat_id.get()); id = -chat_id.get();
} else { } else {
id = 0; id = 0;
} }
@ -85,7 +85,7 @@ DialogId::DialogId(ChatId chat_id) {
DialogId::DialogId(ChannelId channel_id) { DialogId::DialogId(ChannelId channel_id) {
if (channel_id.is_valid()) { if (channel_id.is_valid()) {
id = MAX_CHANNEL_ID - static_cast<int64>(channel_id.get()); id = MAX_CHANNEL_ID - channel_id.get();
} else { } else {
id = 0; id = 0;
} }
@ -130,7 +130,7 @@ int64 DialogId::get_peer_id(const tl_object_ptr<telegram_api::Peer> &peer) {
return 0; return 0;
} }
return static_cast<int64>(user_id.get()); return user_id.get();
} }
case telegram_api::peerChat::ID: { case telegram_api::peerChat::ID: {
auto peer_chat = static_cast<const telegram_api::peerChat *>(peer.get()); auto peer_chat = static_cast<const telegram_api::peerChat *>(peer.get());
@ -140,7 +140,7 @@ int64 DialogId::get_peer_id(const tl_object_ptr<telegram_api::Peer> &peer) {
return 0; return 0;
} }
return -static_cast<int64>(chat_id.get()); return -chat_id.get();
} }
case telegram_api::peerChannel::ID: { case telegram_api::peerChannel::ID: {
auto peer_channel = static_cast<const telegram_api::peerChannel *>(peer.get()); auto peer_channel = static_cast<const telegram_api::peerChannel *>(peer.get());
@ -150,7 +150,7 @@ int64 DialogId::get_peer_id(const tl_object_ptr<telegram_api::Peer> &peer) {
return 0; return 0;
} }
return MAX_CHANNEL_ID - static_cast<int64>(channel_id.get()); return MAX_CHANNEL_ID - channel_id.get();
} }
default: default:
UNREACHABLE(); UNREACHABLE();

View File

@ -27,10 +27,10 @@ class DialogId {
static constexpr int64 MIN_SECRET_ID = -2002147483648ll; static constexpr int64 MIN_SECRET_ID = -2002147483648ll;
static constexpr int64 ZERO_SECRET_ID = -2000000000000ll; static constexpr int64 ZERO_SECRET_ID = -2000000000000ll;
static constexpr int64 MAX_SECRET_ID = -1997852516353ll; static constexpr int64 MAX_SECRET_ID = -1997852516353ll;
static constexpr int64 MIN_CHANNEL_ID = -1002147483647ll; static constexpr int64 MIN_CHANNEL_ID = -1997852516352ll;
static constexpr int64 MAX_CHANNEL_ID = -1000000000000ll; static constexpr int64 MAX_CHANNEL_ID = -1000000000000ll;
static constexpr int64 MIN_CHAT_ID = -2147483647ll; static constexpr int64 MIN_CHAT_ID = -999999999999ll;
static constexpr int64 MAX_USER_ID = 2147483647ll; static constexpr int64 MAX_USER_ID = 999999999999ll;
int64 id = 0; int64 id = 0;

View File

@ -92,7 +92,7 @@ class SetInlineGameScoreQuery final : public Td::ResultHandler {
explicit SetInlineGameScoreQuery(Promise<Unit> &&promise) : promise_(std::move(promise)) { explicit SetInlineGameScoreQuery(Promise<Unit> &&promise) : promise_(std::move(promise)) {
} }
void send(tl_object_ptr<telegram_api::inputBotInlineMessageID> input_bot_inline_message_id, bool edit_message, void send(tl_object_ptr<telegram_api::InputBotInlineMessageID> input_bot_inline_message_id, bool edit_message,
tl_object_ptr<telegram_api::InputUser> input_user, int32 score, bool force) { tl_object_ptr<telegram_api::InputUser> input_user, int32 score, bool force) {
CHECK(input_bot_inline_message_id != nullptr); CHECK(input_bot_inline_message_id != nullptr);
CHECK(input_user != nullptr); CHECK(input_user != nullptr);
@ -105,7 +105,7 @@ class SetInlineGameScoreQuery final : public Td::ResultHandler {
flags |= telegram_api::messages_setInlineGameScore::FORCE_MASK; flags |= telegram_api::messages_setInlineGameScore::FORCE_MASK;
} }
auto dc_id = DcId::internal(input_bot_inline_message_id->dc_id_); auto dc_id = DcId::internal(InlineQueriesManager::get_inline_message_dc_id(input_bot_inline_message_id));
send_query(G()->net_query_creator().create( send_query(G()->net_query_creator().create(
telegram_api::messages_setInlineGameScore(flags, false /*ignored*/, false /*ignored*/, telegram_api::messages_setInlineGameScore(flags, false /*ignored*/, false /*ignored*/,
std::move(input_bot_inline_message_id), std::move(input_user), score), std::move(input_bot_inline_message_id), std::move(input_user), score),
@ -172,12 +172,12 @@ class GetInlineGameHighScoresQuery final : public Td::ResultHandler {
: promise_(std::move(promise)) { : promise_(std::move(promise)) {
} }
void send(tl_object_ptr<telegram_api::inputBotInlineMessageID> input_bot_inline_message_id, void send(tl_object_ptr<telegram_api::InputBotInlineMessageID> input_bot_inline_message_id,
tl_object_ptr<telegram_api::InputUser> input_user) { tl_object_ptr<telegram_api::InputUser> input_user) {
CHECK(input_bot_inline_message_id != nullptr); CHECK(input_bot_inline_message_id != nullptr);
CHECK(input_user != nullptr); CHECK(input_user != nullptr);
auto dc_id = DcId::internal(input_bot_inline_message_id->dc_id_); auto dc_id = DcId::internal(InlineQueriesManager::get_inline_message_dc_id(input_bot_inline_message_id));
send_query(G()->net_query_creator().create( send_query(G()->net_query_creator().create(
telegram_api::messages_getInlineGameHighScores(std::move(input_bot_inline_message_id), std::move(input_user)), telegram_api::messages_getInlineGameHighScores(std::move(input_bot_inline_message_id), std::move(input_user)),
dc_id)); dc_id));

View File

@ -338,10 +338,10 @@ class Global final : public ActorContext {
return parameters_; return parameters_;
} }
int32 get_my_id() const { int64 get_my_id() const {
return my_id_; return my_id_;
} }
void set_my_id(int32 my_id) { void set_my_id(int64 my_id) {
my_id_ = my_id; my_id_ = my_id;
} }
@ -470,7 +470,7 @@ class Global final : public ActorContext {
unique_ptr<ConfigShared> shared_config_; unique_ptr<ConfigShared> shared_config_;
int32 my_id_ = 0; // hack int64 my_id_ = 0; // hack
static int64 get_location_key(double latitude, double longitude); static int64 get_location_key(double latitude, double longitude);

View File

@ -196,7 +196,21 @@ void InlineQueriesManager::after_get_difference() {
} }
} }
tl_object_ptr<telegram_api::inputBotInlineMessageID> InlineQueriesManager::get_input_bot_inline_message_id( int32 InlineQueriesManager::get_inline_message_dc_id(
const tl_object_ptr<telegram_api::InputBotInlineMessageID> &inline_message_id) {
CHECK(inline_message_id != nullptr);
switch (inline_message_id->get_id()) {
case telegram_api::inputBotInlineMessageID::ID:
return static_cast<const telegram_api::inputBotInlineMessageID *>(inline_message_id.get())->dc_id_;
case telegram_api::inputBotInlineMessageID64::ID:
return static_cast<const telegram_api::inputBotInlineMessageID64 *>(inline_message_id.get())->dc_id_;
default:
UNREACHABLE();
return 0;
}
}
tl_object_ptr<telegram_api::InputBotInlineMessageID> InlineQueriesManager::get_input_bot_inline_message_id(
const string &inline_message_id) { const string &inline_message_id) {
auto r_binary = base64url_decode(inline_message_id); auto r_binary = base64url_decode(inline_message_id);
if (r_binary.is_error()) { if (r_binary.is_error()) {
@ -204,12 +218,13 @@ tl_object_ptr<telegram_api::inputBotInlineMessageID> InlineQueriesManager::get_i
} }
BufferSlice buffer_slice(r_binary.ok()); BufferSlice buffer_slice(r_binary.ok());
TlBufferParser parser(&buffer_slice); TlBufferParser parser(&buffer_slice);
auto result = telegram_api::inputBotInlineMessageID::fetch(parser); auto result = buffer_slice.size() == 20 ? telegram_api::inputBotInlineMessageID::fetch(parser)
: telegram_api::inputBotInlineMessageID64::fetch(parser);
parser.fetch_end(); parser.fetch_end();
if (parser.get_error()) { if (parser.get_error()) {
return nullptr; return nullptr;
} }
if (!DcId::is_valid(result->dc_id_)) { if (!DcId::is_valid(get_inline_message_dc_id(result))) {
return nullptr; return nullptr;
} }
LOG(INFO) << "Have inline message identifier: " << to_string(result); LOG(INFO) << "Have inline message identifier: " << to_string(result);
@ -217,7 +232,7 @@ tl_object_ptr<telegram_api::inputBotInlineMessageID> InlineQueriesManager::get_i
} }
string InlineQueriesManager::get_inline_message_id( string InlineQueriesManager::get_inline_message_id(
tl_object_ptr<telegram_api::inputBotInlineMessageID> &&input_bot_inline_message_id) { tl_object_ptr<telegram_api::InputBotInlineMessageID> &&input_bot_inline_message_id) {
if (input_bot_inline_message_id == nullptr) { if (input_bot_inline_message_id == nullptr) {
return string(); return string();
} }
@ -1750,7 +1765,7 @@ bool InlineQueriesManager::load_recently_used_bots(Promise<Unit> &promise) {
} }
} else { } else {
for (auto it = bot_ids.rbegin(); it != bot_ids.rend(); ++it) { for (auto it = bot_ids.rbegin(); it != bot_ids.rend(); ++it) {
UserId user_id(to_integer<int32>(*it)); UserId user_id(to_integer<int64>(*it));
if (td_->contacts_manager_->have_user(user_id)) { if (td_->contacts_manager_->have_user(user_id)) {
update_bot_usage(user_id); update_bot_usage(user_id);
} else { } else {
@ -1778,7 +1793,7 @@ bool InlineQueriesManager::load_recently_used_bots(Promise<Unit> &promise) {
} }
} else { } else {
for (auto &bot_id : bot_ids) { for (auto &bot_id : bot_ids) {
UserId user_id(to_integer<int32>(bot_id)); UserId user_id(to_integer<int64>(bot_id));
td_->contacts_manager_->get_user(user_id, 3, resolve_recent_inline_bots_multipromise_.get_promise()); td_->contacts_manager_->get_user(user_id, 3, resolve_recent_inline_bots_multipromise_.get_promise());
} }
} }
@ -1832,7 +1847,7 @@ void InlineQueriesManager::on_new_query(int64 query_id, UserId sender_user_id, L
void InlineQueriesManager::on_chosen_result( void InlineQueriesManager::on_chosen_result(
UserId user_id, Location user_location, const string &query, const string &result_id, UserId user_id, Location user_location, const string &query, const string &result_id,
tl_object_ptr<telegram_api::inputBotInlineMessageID> &&input_bot_inline_message_id) { tl_object_ptr<telegram_api::InputBotInlineMessageID> &&input_bot_inline_message_id) {
if (!user_id.is_valid()) { if (!user_id.is_valid()) {
LOG(ERROR) << "Receive chosen inline query result from invalid " << user_id; LOG(ERROR) << "Receive chosen inline query result from invalid " << user_id;
return; return;

View File

@ -67,13 +67,15 @@ class InlineQueriesManager final : public Actor {
const string &offset); const string &offset);
void on_chosen_result(UserId user_id, Location user_location, const string &query, const string &result_id, void on_chosen_result(UserId user_id, Location user_location, const string &query, const string &result_id,
tl_object_ptr<telegram_api::inputBotInlineMessageID> &&input_bot_inline_message_id); tl_object_ptr<telegram_api::InputBotInlineMessageID> &&input_bot_inline_message_id);
static tl_object_ptr<telegram_api::inputBotInlineMessageID> get_input_bot_inline_message_id( static int32 get_inline_message_dc_id(const tl_object_ptr<telegram_api::InputBotInlineMessageID> &inline_message_id);
static tl_object_ptr<telegram_api::InputBotInlineMessageID> get_input_bot_inline_message_id(
const string &inline_message_id); const string &inline_message_id);
static string get_inline_message_id( static string get_inline_message_id(
tl_object_ptr<telegram_api::inputBotInlineMessageID> &&input_bot_inline_message_id); tl_object_ptr<telegram_api::InputBotInlineMessageID> &&input_bot_inline_message_id);
private: private:
static constexpr int32 MAX_RECENT_INLINE_BOTS = 20; // some reasonable value static constexpr int32 MAX_RECENT_INLINE_BOTS = 20; // some reasonable value

View File

@ -1090,7 +1090,7 @@ unique_ptr<LinkManager::InternalLink> LinkManager::get_internal_link_passport(
return Slice(); return Slice();
}; };
UserId bot_user_id(to_integer<int32>(get_arg("bot_id"))); UserId bot_user_id(to_integer<int64>(get_arg("bot_id")));
auto scope = get_arg("scope"); auto scope = get_arg("scope");
auto public_key = get_arg("public_key"); auto public_key = get_arg("public_key");
auto nonce = get_arg("nonce"); auto nonce = get_arg("nonce");
@ -1195,17 +1195,18 @@ void LinkManager::get_external_link_info(string &&link, Promise<td_api::object_p
promise.set_value(td_api::make_object<td_api::loginUrlInfoOpen>(url.get_url(), false)); promise.set_value(td_api::make_object<td_api::loginUrlInfoOpen>(url.get_url(), false));
} }
void LinkManager::get_login_url_info(FullMessageId full_message_id, int32 button_id, void LinkManager::get_login_url_info(FullMessageId full_message_id, int64 button_id,
Promise<td_api::object_ptr<td_api::LoginUrlInfo>> &&promise) { Promise<td_api::object_ptr<td_api::LoginUrlInfo>> &&promise) {
TRY_RESULT_PROMISE(promise, url, td_->messages_manager_->get_login_button_url(full_message_id, button_id)); TRY_RESULT_PROMISE(promise, url, td_->messages_manager_->get_login_button_url(full_message_id, button_id));
td_->create_handler<RequestUrlAuthQuery>(std::move(promise))->send(std::move(url), full_message_id, button_id); td_->create_handler<RequestUrlAuthQuery>(std::move(promise))
->send(std::move(url), full_message_id, narrow_cast<int32>(button_id));
} }
void LinkManager::get_login_url(FullMessageId full_message_id, int32 button_id, bool allow_write_access, void LinkManager::get_login_url(FullMessageId full_message_id, int64 button_id, bool allow_write_access,
Promise<td_api::object_ptr<td_api::httpUrl>> &&promise) { Promise<td_api::object_ptr<td_api::httpUrl>> &&promise) {
TRY_RESULT_PROMISE(promise, url, td_->messages_manager_->get_login_button_url(full_message_id, button_id)); TRY_RESULT_PROMISE(promise, url, td_->messages_manager_->get_login_button_url(full_message_id, button_id));
td_->create_handler<AcceptUrlAuthQuery>(std::move(promise)) td_->create_handler<AcceptUrlAuthQuery>(std::move(promise))
->send(std::move(url), full_message_id, button_id, allow_write_access); ->send(std::move(url), full_message_id, narrow_cast<int32>(button_id), allow_write_access);
} }
void LinkManager::get_link_login_url(const string &url, bool allow_write_access, void LinkManager::get_link_login_url(const string &url, bool allow_write_access,
@ -1339,7 +1340,7 @@ Result<MessageLinkInfo> LinkManager::get_message_link_info(Slice url) {
ChannelId channel_id; ChannelId channel_id;
if (username.empty()) { if (username.empty()) {
auto r_channel_id = to_integer_safe<int32>(channel_id_slice); auto r_channel_id = to_integer_safe<int64>(channel_id_slice);
if (r_channel_id.is_error() || !ChannelId(r_channel_id.ok()).is_valid()) { if (r_channel_id.is_error() || !ChannelId(r_channel_id.ok()).is_valid()) {
return Status::Error("Wrong channel ID"); return Status::Error("Wrong channel ID");
} }

View File

@ -58,10 +58,10 @@ class LinkManager final : public Actor {
void get_external_link_info(string &&link, Promise<td_api::object_ptr<td_api::LoginUrlInfo>> &&promise); void get_external_link_info(string &&link, Promise<td_api::object_ptr<td_api::LoginUrlInfo>> &&promise);
void get_login_url_info(FullMessageId full_message_id, int32 button_id, void get_login_url_info(FullMessageId full_message_id, int64 button_id,
Promise<td_api::object_ptr<td_api::LoginUrlInfo>> &&promise); Promise<td_api::object_ptr<td_api::LoginUrlInfo>> &&promise);
void get_login_url(FullMessageId full_message_id, int32 button_id, bool allow_write_access, void get_login_url(FullMessageId full_message_id, int64 button_id, bool allow_write_access,
Promise<td_api::object_ptr<td_api::httpUrl>> &&promise); Promise<td_api::object_ptr<td_api::httpUrl>> &&promise);
void get_link_login_url(const string &url, bool allow_write_access, void get_link_login_url(const string &url, bool allow_write_access,

View File

@ -3969,9 +3969,9 @@ unique_ptr<MessageContent> get_secret_message_content(
if (!clean_input_string(message_contact->last_name_)) { if (!clean_input_string(message_contact->last_name_)) {
message_contact->last_name_.clear(); message_contact->last_name_.clear();
} }
return make_unique<MessageContact>( return make_unique<MessageContact>(Contact(std::move(message_contact->phone_number_),
Contact(std::move(message_contact->phone_number_), std::move(message_contact->first_name_), std::move(message_contact->first_name_),
std::move(message_contact->last_name_), string(), UserId(message_contact->user_id_))); std::move(message_contact->last_name_), string(), UserId()));
} }
case secret_api::decryptedMessageMediaWebPage::ID: { case secret_api::decryptedMessageMediaWebPage::ID: {
auto media_web_page = move_tl_object_as<secret_api::decryptedMessageMediaWebPage>(media); auto media_web_page = move_tl_object_as<secret_api::decryptedMessageMediaWebPage>(media);

View File

@ -1805,7 +1805,7 @@ static UserId get_link_user_id(Slice url) {
Slice value; Slice value;
std::tie(key, value) = split(parameter, '='); std::tie(key, value) = split(parameter, '=');
if (key == Slice("id")) { if (key == Slice("id")) {
auto r_user_id = to_integer_safe<int32>(value); auto r_user_id = to_integer_safe<int64>(value);
if (r_user_id.is_error()) { if (r_user_id.is_error()) {
return UserId(); return UserId();
} }

View File

@ -828,13 +828,13 @@ class SearchPublicDialogsQuery final : public Td::ResultHandler {
class GetCommonDialogsQuery final : public Td::ResultHandler { class GetCommonDialogsQuery final : public Td::ResultHandler {
Promise<Unit> promise_; Promise<Unit> promise_;
UserId user_id_; UserId user_id_;
int32 offset_chat_id_ = 0; int64 offset_chat_id_ = 0;
public: public:
explicit GetCommonDialogsQuery(Promise<Unit> &&promise) : promise_(std::move(promise)) { explicit GetCommonDialogsQuery(Promise<Unit> &&promise) : promise_(std::move(promise)) {
} }
void send(UserId user_id, int32 offset_chat_id, int32 limit) { void send(UserId user_id, int64 offset_chat_id, int32 limit) {
user_id_ = user_id; user_id_ = user_id;
offset_chat_id_ = offset_chat_id; offset_chat_id_ = offset_chat_id;
LOG(INFO) << "Get common dialogs with " << user_id << " from " << offset_chat_id << " with limit " << limit; LOG(INFO) << "Get common dialogs with " << user_id << " from " << offset_chat_id << " with limit " << limit;
@ -2333,7 +2333,7 @@ class GetAllScheduledMessagesQuery final : public Td::ResultHandler {
explicit GetAllScheduledMessagesQuery(Promise<Unit> &&promise) : promise_(std::move(promise)) { explicit GetAllScheduledMessagesQuery(Promise<Unit> &&promise) : promise_(std::move(promise)) {
} }
void send(DialogId dialog_id, int32 hash, uint32 generation) { void send(DialogId dialog_id, int64 hash, uint32 generation) {
auto input_peer = td->messages_manager_->get_input_peer(dialog_id, AccessRights::Read); auto input_peer = td->messages_manager_->get_input_peer(dialog_id, AccessRights::Read);
CHECK(input_peer != nullptr); CHECK(input_peer != nullptr);
@ -3483,7 +3483,7 @@ class EditInlineMessageQuery final : public Td::ResultHandler {
explicit EditInlineMessageQuery(Promise<Unit> &&promise) : promise_(std::move(promise)) { explicit EditInlineMessageQuery(Promise<Unit> &&promise) : promise_(std::move(promise)) {
} }
void send(int32 flags, tl_object_ptr<telegram_api::inputBotInlineMessageID> input_bot_inline_message_id, void send(int32 flags, tl_object_ptr<telegram_api::InputBotInlineMessageID> input_bot_inline_message_id,
const string &text, vector<tl_object_ptr<telegram_api::MessageEntity>> &&entities, const string &text, vector<tl_object_ptr<telegram_api::MessageEntity>> &&entities,
tl_object_ptr<telegram_api::InputMedia> &&input_media, tl_object_ptr<telegram_api::InputMedia> &&input_media,
tl_object_ptr<telegram_api::ReplyMarkup> &&reply_markup) { tl_object_ptr<telegram_api::ReplyMarkup> &&reply_markup) {
@ -3507,7 +3507,7 @@ class EditInlineMessageQuery final : public Td::ResultHandler {
} }
LOG(DEBUG) << "Edit inline message with flags " << flags; LOG(DEBUG) << "Edit inline message with flags " << flags;
auto dc_id = DcId::internal(input_bot_inline_message_id->dc_id_); auto dc_id = DcId::internal(InlineQueriesManager::get_inline_message_dc_id(input_bot_inline_message_id));
send_query(G()->net_query_creator().create( send_query(G()->net_query_creator().create(
telegram_api::messages_editInlineBotMessage(flags, false /*ignored*/, std::move(input_bot_inline_message_id), telegram_api::messages_editInlineBotMessage(flags, false /*ignored*/, std::move(input_bot_inline_message_id),
text, std::move(input_media), std::move(reply_markup), text, std::move(input_media), std::move(reply_markup),
@ -8410,7 +8410,7 @@ void MessagesManager::get_dialog_statistics_url(DialogId dialog_id, const string
td_->create_handler<GetStatsUrlQuery>(std::move(promise))->send(dialog_id, parameters, is_dark); td_->create_handler<GetStatsUrlQuery>(std::move(promise))->send(dialog_id, parameters, is_dark);
} }
Result<string> MessagesManager::get_login_button_url(FullMessageId full_message_id, int32 button_id) { Result<string> MessagesManager::get_login_button_url(FullMessageId full_message_id, int64 button_id) {
Dialog *d = get_dialog_force(full_message_id.get_dialog_id(), "get_login_button_url"); Dialog *d = get_dialog_force(full_message_id.get_dialog_id(), "get_login_button_url");
if (d == nullptr) { if (d == nullptr) {
return Status::Error(3, "Chat not found"); return Status::Error(3, "Chat not found");
@ -8437,6 +8437,9 @@ Result<string> MessagesManager::get_login_button_url(FullMessageId full_message_
// secret chat messages can't have reply markup, so this shouldn't happen now // secret chat messages can't have reply markup, so this shouldn't happen now
return Status::Error(5, "Message is in a secret chat"); return Status::Error(5, "Message is in a secret chat");
} }
if (button_id < std::numeric_limits<int32>::min() || button_id > std::numeric_limits<int32>::max()) {
return Status::Error(5, "Invalid button identifier specified");
}
for (auto &row : m->reply_markup->inline_keyboard) { for (auto &row : m->reply_markup->inline_keyboard) {
for (auto &button : row) { for (auto &button : row) {
@ -11642,7 +11645,7 @@ void MessagesManager::set_dialog_last_read_inbox_message_id(Dialog *d, MessageId
it.first = DialogId(); it.first = DialogId();
} }
} }
flush_pending_new_message_notifications(d->dialog_id, false, DialogId(UserId(1))); flush_pending_new_message_notifications(d->dialog_id, false, DialogId(UserId(static_cast<int64>(1))));
} }
total_count -= static_cast<int32>(d->pending_new_message_notifications.size()); total_count -= static_cast<int32>(d->pending_new_message_notifications.size());
if (total_count < 0) { if (total_count < 0) {
@ -16354,7 +16357,7 @@ std::pair<int32, vector<DialogId>> MessagesManager::get_common_dialogs(UserId us
limit = MAX_GET_DIALOGS; limit = MAX_GET_DIALOGS;
} }
int32 offset_chat_id = 0; int64 offset_chat_id = 0;
switch (offset_dialog_id.get_type()) { switch (offset_dialog_id.get_type()) {
case DialogType::Chat: case DialogType::Chat:
offset_chat_id = offset_dialog_id.get_chat_id().get(); offset_chat_id = offset_dialog_id.get_chat_id().get();
@ -16416,7 +16419,7 @@ std::pair<int32, vector<DialogId>> MessagesManager::get_common_dialogs(UserId us
return {}; return {};
} }
void MessagesManager::on_get_common_dialogs(UserId user_id, int32 offset_chat_id, void MessagesManager::on_get_common_dialogs(UserId user_id, int64 offset_chat_id,
vector<tl_object_ptr<telegram_api::Chat>> &&chats, int32 total_count) { vector<tl_object_ptr<telegram_api::Chat>> &&chats, int32 total_count) {
td_->contacts_manager_->on_update_user_common_chat_count(user_id, total_count); td_->contacts_manager_->on_update_user_common_chat_count(user_id, total_count);
@ -22536,7 +22539,7 @@ vector<MessageId> MessagesManager::get_dialog_scheduled_messages(DialogId dialog
} }
if (d->scheduled_messages_sync_generation != scheduled_messages_sync_generation_) { if (d->scheduled_messages_sync_generation != scheduled_messages_sync_generation_) {
vector<uint32> numbers; vector<uint64> numbers;
for (auto &message_id : message_ids) { for (auto &message_id : message_ids) {
if (!message_id.is_scheduled_server()) { if (!message_id.is_scheduled_server()) {
continue; continue;
@ -22567,7 +22570,7 @@ vector<MessageId> MessagesManager::get_dialog_scheduled_messages(DialogId dialog
return message_ids; return message_ids;
} }
void MessagesManager::load_dialog_scheduled_messages(DialogId dialog_id, bool from_database, int32 hash, void MessagesManager::load_dialog_scheduled_messages(DialogId dialog_id, bool from_database, int64 hash,
Promise<Unit> &&promise) { Promise<Unit> &&promise) {
if (G()->parameters().use_message_db && from_database) { if (G()->parameters().use_message_db && from_database) {
LOG(INFO) << "Load scheduled messages from database in " << dialog_id; LOG(INFO) << "Load scheduled messages from database in " << dialog_id;
@ -25723,7 +25726,7 @@ bool MessagesManager::is_forward_info_sender_hidden(const MessageForwardInfo *fo
if (!forward_info->sender_name.empty()) { if (!forward_info->sender_name.empty()) {
return true; return true;
} }
DialogId hidden_sender_dialog_id(ChannelId(G()->is_test_dc() ? 10460537 : 1228946795)); DialogId hidden_sender_dialog_id(ChannelId(static_cast<int64>(G()->is_test_dc() ? 10460537 : 1228946795)));
return forward_info->sender_dialog_id == hidden_sender_dialog_id && !forward_info->author_signature.empty() && return forward_info->sender_dialog_id == hidden_sender_dialog_id && !forward_info->author_signature.empty() &&
!forward_info->message_id.is_valid(); !forward_info->message_id.is_valid();
} }
@ -28144,7 +28147,7 @@ void MessagesManager::remove_all_dialog_notifications(Dialog *d, bool from_menti
for (auto &it : d->pending_new_message_notifications) { for (auto &it : d->pending_new_message_notifications) {
it.first = DialogId(); it.first = DialogId();
} }
flush_pending_new_message_notifications(d->dialog_id, from_mentions, DialogId(UserId(2))); flush_pending_new_message_notifications(d->dialog_id, from_mentions, DialogId(UserId(static_cast<int64>(2))));
} }
// remove_message_notifications will be called by NotificationManager // remove_message_notifications will be called by NotificationManager
send_closure_later(G()->notification_manager(), &NotificationManager::remove_notification_group, send_closure_later(G()->notification_manager(), &NotificationManager::remove_notification_group,
@ -28176,7 +28179,7 @@ void MessagesManager::remove_message_dialog_notifications(Dialog *d, MessageId m
it.first = DialogId(); it.first = DialogId();
} }
} }
flush_pending_new_message_notifications(d->dialog_id, from_mentions, DialogId(UserId(3))); flush_pending_new_message_notifications(d->dialog_id, from_mentions, DialogId(UserId(static_cast<int64>(3))));
} }
auto max_notification_message_id = max_message_id; auto max_notification_message_id = max_message_id;
@ -31631,7 +31634,7 @@ tl_object_ptr<td_api::ChatEventAction> MessagesManager::get_chat_event_action_ob
case telegram_api::channelAdminLogEventActionChangeLinkedChat::ID: { case telegram_api::channelAdminLogEventActionChangeLinkedChat::ID: {
auto action = move_tl_object_as<telegram_api::channelAdminLogEventActionChangeLinkedChat>(action_ptr); auto action = move_tl_object_as<telegram_api::channelAdminLogEventActionChangeLinkedChat>(action_ptr);
auto get_dialog_from_channel_id = [this](int32 channel_id_int) { auto get_dialog_from_channel_id = [this](int64 channel_id_int) {
ChannelId channel_id(channel_id_int); ChannelId channel_id(channel_id_int);
if (!channel_id.is_valid()) { if (!channel_id.is_valid()) {
return DialogId(); return DialogId();
@ -31752,11 +31755,6 @@ tl_object_ptr<td_api::ChatEventAction> MessagesManager::get_chat_event_action_ob
return make_tl_object<td_api::chatEventMessageTtlSettingChanged>(old_value.get_message_ttl_setting_object(), return make_tl_object<td_api::chatEventMessageTtlSettingChanged>(old_value.get_message_ttl_setting_object(),
new_value.get_message_ttl_setting_object()); new_value.get_message_ttl_setting_object());
} }
case telegram_api::channelAdminLogEventActionChangeTheme::ID: {
auto action = move_tl_object_as<telegram_api::channelAdminLogEventActionChangeTheme>(action_ptr);
return make_tl_object<td_api::chatEventThemeChanged>(std::move(action->prev_value_),
std::move(action->new_value_));
}
default: default:
UNREACHABLE(); UNREACHABLE();
return nullptr; return nullptr;

View File

@ -266,7 +266,7 @@ class MessagesManager final : public Actor {
int32 total_count, vector<tl_object_ptr<telegram_api::Message>> &&messages, int32 total_count, vector<tl_object_ptr<telegram_api::Message>> &&messages,
Promise<Unit> &&promise); Promise<Unit> &&promise);
void on_get_common_dialogs(UserId user_id, int32 offset_chat_id, vector<tl_object_ptr<telegram_api::Chat>> &&chats, void on_get_common_dialogs(UserId user_id, int64 offset_chat_id, vector<tl_object_ptr<telegram_api::Chat>> &&chats,
int32 total_count); int32 total_count);
bool on_update_message_id(int64 random_id, MessageId new_message_id, const string &source); bool on_update_message_id(int64 random_id, MessageId new_message_id, const string &source);
@ -898,7 +898,7 @@ class MessagesManager final : public Actor {
void stop_poll(FullMessageId full_message_id, td_api::object_ptr<td_api::ReplyMarkup> &&reply_markup, void stop_poll(FullMessageId full_message_id, td_api::object_ptr<td_api::ReplyMarkup> &&reply_markup,
Promise<Unit> &&promise); Promise<Unit> &&promise);
Result<string> get_login_button_url(FullMessageId full_message_id, int32 button_id); Result<string> get_login_button_url(FullMessageId full_message_id, int64 button_id);
Result<ServerMessageId> get_invoice_message_id(FullMessageId full_message_id); Result<ServerMessageId> get_invoice_message_id(FullMessageId full_message_id);
@ -2087,7 +2087,7 @@ class MessagesManager final : public Actor {
void load_messages_impl(const Dialog *d, MessageId from_message_id, int32 offset, int32 limit, int left_tries, void load_messages_impl(const Dialog *d, MessageId from_message_id, int32 offset, int32 limit, int left_tries,
bool only_local, Promise<Unit> &&promise); bool only_local, Promise<Unit> &&promise);
void load_dialog_scheduled_messages(DialogId dialog_id, bool from_database, int32 hash, Promise<Unit> &&promise); void load_dialog_scheduled_messages(DialogId dialog_id, bool from_database, int64 hash, Promise<Unit> &&promise);
void on_get_scheduled_messages_from_database(DialogId dialog_id, vector<BufferSlice> &&messages); void on_get_scheduled_messages_from_database(DialogId dialog_id, vector<BufferSlice> &&messages);

View File

@ -3057,7 +3057,7 @@ Status NotificationManager::process_push_notification_payload(string payload, bo
DialogId dialog_id; DialogId dialog_id;
if (has_json_object_field(custom, "from_id")) { if (has_json_object_field(custom, "from_id")) {
TRY_RESULT(user_id_int, get_json_object_int_field(custom, "from_id")); TRY_RESULT(user_id_int, get_json_object_long_field(custom, "from_id"));
UserId user_id(user_id_int); UserId user_id(user_id_int);
if (!user_id.is_valid()) { if (!user_id.is_valid()) {
return Status::Error("Receive invalid user_id"); return Status::Error("Receive invalid user_id");
@ -3065,7 +3065,7 @@ Status NotificationManager::process_push_notification_payload(string payload, bo
dialog_id = DialogId(user_id); dialog_id = DialogId(user_id);
} }
if (has_json_object_field(custom, "chat_id")) { if (has_json_object_field(custom, "chat_id")) {
TRY_RESULT(chat_id_int, get_json_object_int_field(custom, "chat_id")); TRY_RESULT(chat_id_int, get_json_object_long_field(custom, "chat_id"));
ChatId chat_id(chat_id_int); ChatId chat_id(chat_id_int);
if (!chat_id.is_valid()) { if (!chat_id.is_valid()) {
return Status::Error("Receive invalid chat_id"); return Status::Error("Receive invalid chat_id");
@ -3073,7 +3073,7 @@ Status NotificationManager::process_push_notification_payload(string payload, bo
dialog_id = DialogId(chat_id); dialog_id = DialogId(chat_id);
} }
if (has_json_object_field(custom, "channel_id")) { if (has_json_object_field(custom, "channel_id")) {
TRY_RESULT(channel_id_int, get_json_object_int_field(custom, "channel_id")); TRY_RESULT(channel_id_int, get_json_object_long_field(custom, "channel_id"));
ChannelId channel_id(channel_id_int); ChannelId channel_id(channel_id_int);
if (!channel_id.is_valid()) { if (!channel_id.is_valid()) {
return Status::Error("Receive invalid channel_id"); return Status::Error("Receive invalid channel_id");
@ -3147,19 +3147,19 @@ Status NotificationManager::process_push_notification_payload(string payload, bo
UserId sender_user_id; UserId sender_user_id;
DialogId sender_dialog_id; DialogId sender_dialog_id;
if (has_json_object_field(custom, "chat_from_broadcast_id")) { if (has_json_object_field(custom, "chat_from_broadcast_id")) {
TRY_RESULT(sender_channel_id_int, get_json_object_int_field(custom, "chat_from_broadcast_id")); TRY_RESULT(sender_channel_id_int, get_json_object_long_field(custom, "chat_from_broadcast_id"));
sender_dialog_id = DialogId(ChannelId(sender_channel_id_int)); sender_dialog_id = DialogId(ChannelId(sender_channel_id_int));
if (!sender_dialog_id.is_valid()) { if (!sender_dialog_id.is_valid()) {
return Status::Error("Receive invalid chat_from_broadcast_id"); return Status::Error("Receive invalid chat_from_broadcast_id");
} }
} else if (has_json_object_field(custom, "chat_from_group_id")) { } else if (has_json_object_field(custom, "chat_from_group_id")) {
TRY_RESULT(sender_channel_id_int, get_json_object_int_field(custom, "chat_from_group_id")); TRY_RESULT(sender_channel_id_int, get_json_object_long_field(custom, "chat_from_group_id"));
sender_dialog_id = DialogId(ChannelId(sender_channel_id_int)); sender_dialog_id = DialogId(ChannelId(sender_channel_id_int));
if (!sender_dialog_id.is_valid()) { if (!sender_dialog_id.is_valid()) {
return Status::Error("Receive invalid chat_from_group_id"); return Status::Error("Receive invalid chat_from_group_id");
} }
} else if (has_json_object_field(custom, "chat_from_id")) { } else if (has_json_object_field(custom, "chat_from_id")) {
TRY_RESULT(sender_user_id_int, get_json_object_int_field(custom, "chat_from_id")); TRY_RESULT(sender_user_id_int, get_json_object_long_field(custom, "chat_from_id"));
sender_user_id = UserId(sender_user_id_int); sender_user_id = UserId(sender_user_id_int);
if (!sender_user_id.is_valid()) { if (!sender_user_id.is_valid()) {
return Status::Error("Receive invalid chat_from_id"); return Status::Error("Receive invalid chat_from_id");
@ -3837,7 +3837,7 @@ Result<int64> NotificationManager::get_push_receiver_id(string payload) {
if (r_user_id.ok() <= 0) { if (r_user_id.ok() <= 0) {
return Status::Error(400, PSLICE() << "Receive wrong user_id " << user_id_str); return Status::Error(400, PSLICE() << "Receive wrong user_id " << user_id_str);
} }
return static_cast<int64>(r_user_id.ok()); return r_user_id.ok();
} }
} }

View File

@ -279,7 +279,7 @@ tl_object_ptr<telegram_api::InputPrivacyRule> PrivacyManager::UserPrivacySetting
case Type::AllowUsers: case Type::AllowUsers:
return make_tl_object<telegram_api::inputPrivacyValueAllowUsers>(get_input_users()); return make_tl_object<telegram_api::inputPrivacyValueAllowUsers>(get_input_users());
case Type::AllowChatParticipants: case Type::AllowChatParticipants:
return make_tl_object<telegram_api::inputPrivacyValueAllowChatParticipants>(vector<int32>{chat_ids_}); return make_tl_object<telegram_api::inputPrivacyValueAllowChatParticipants>(vector<int64>{chat_ids_});
case Type::RestrictContacts: case Type::RestrictContacts:
return make_tl_object<telegram_api::inputPrivacyValueDisallowContacts>(); return make_tl_object<telegram_api::inputPrivacyValueDisallowContacts>();
case Type::RestrictAll: case Type::RestrictAll:
@ -287,7 +287,7 @@ tl_object_ptr<telegram_api::InputPrivacyRule> PrivacyManager::UserPrivacySetting
case Type::RestrictUsers: case Type::RestrictUsers:
return make_tl_object<telegram_api::inputPrivacyValueDisallowUsers>(get_input_users()); return make_tl_object<telegram_api::inputPrivacyValueDisallowUsers>(get_input_users());
case Type::RestrictChatParticipants: case Type::RestrictChatParticipants:
return make_tl_object<telegram_api::inputPrivacyValueDisallowChatParticipants>(vector<int32>{chat_ids_}); return make_tl_object<telegram_api::inputPrivacyValueDisallowChatParticipants>(vector<int64>{chat_ids_});
default: default:
UNREACHABLE(); UNREACHABLE();
} }

View File

@ -99,7 +99,7 @@ class PrivacyManager final : public NetQueryCallback {
} type_ = Type::RestrictAll; } type_ = Type::RestrictAll;
vector<UserId> user_ids_; vector<UserId> user_ids_;
vector<int32> chat_ids_; vector<int64> chat_ids_;
vector<tl_object_ptr<telegram_api::InputUser>> get_input_users() const; vector<tl_object_ptr<telegram_api::InputUser>> get_input_users() const;

View File

@ -494,7 +494,7 @@ static Result<InlineKeyboardButton> get_inline_keyboard_button(tl_object_ptr<td_
return Status::Error(400, "Inline keyboard button forward text must be encoded in UTF-8"); return Status::Error(400, "Inline keyboard button forward text must be encoded in UTF-8");
} }
current_button.id = login_url->id_; current_button.id = login_url->id_;
if (current_button.id == 0 || current_button.id == std::numeric_limits<int32>::min()) { if (current_button.id == 0 || current_button.id == std::numeric_limits<int64>::min()) {
return Status::Error(400, "Invalid bot_user_id specified"); return Status::Error(400, "Invalid bot_user_id specified");
} }
break; break;
@ -662,7 +662,7 @@ static tl_object_ptr<telegram_api::KeyboardButton> get_inline_keyboard_button(
return make_tl_object<telegram_api::keyboardButtonBuy>(keyboard_button.text); return make_tl_object<telegram_api::keyboardButtonBuy>(keyboard_button.text);
case InlineKeyboardButton::Type::UrlAuth: { case InlineKeyboardButton::Type::UrlAuth: {
int32 flags = 0; int32 flags = 0;
int32 bot_user_id = keyboard_button.id; int64 bot_user_id = keyboard_button.id;
if (bot_user_id > 0) { if (bot_user_id > 0) {
flags |= telegram_api::inputKeyboardButtonUrlAuth::REQUEST_WRITE_ACCESS_MASK; flags |= telegram_api::inputKeyboardButtonUrlAuth::REQUEST_WRITE_ACCESS_MASK;
} else { } else {

View File

@ -42,7 +42,7 @@ struct InlineKeyboardButton {
CallbackWithPassword CallbackWithPassword
}; };
Type type; Type type;
int32 id = 0; // UrlAuth only, button_id or (2 * request_write_access - 1) * bot_user_id int64 id = 0; // UrlAuth only, button_id or (2 * request_write_access - 1) * bot_user_id
string text; string text;
string forward_text; // UrlAuth only string forward_text; // UrlAuth only
string data; string data;

View File

@ -7,6 +7,7 @@
#pragma once #pragma once
#include "td/telegram/ReplyMarkup.h" #include "td/telegram/ReplyMarkup.h"
#include "td/telegram/Version.h"
#include "td/utils/tl_helpers.h" #include "td/utils/tl_helpers.h"
@ -38,7 +39,13 @@ template <class ParserT>
void parse(InlineKeyboardButton &button, ParserT &parser) { void parse(InlineKeyboardButton &button, ParserT &parser) {
parse(button.type, parser); parse(button.type, parser);
if (button.type == InlineKeyboardButton::Type::UrlAuth) { if (button.type == InlineKeyboardButton::Type::UrlAuth) {
parse(button.id, parser); if (parser.version() >= static_cast<int32>(Version::Support64BitIds)) {
parse(button.id, parser);
} else {
int32 old_id;
parse(old_id, parser);
button.id = old_id;
}
} }
parse(button.text, parser); parse(button.text, parser);
parse(button.data, parser); parse(button.data, parser);

View File

@ -381,7 +381,7 @@ class SecretChatActor final : public NetQueryCallback {
} }
template <class StorerT> template <class StorerT>
void store(StorerT &storer) const { void store(StorerT &storer) const {
uint32 flags = 0; uint32 flags = 8;
bool has_date = date != 0; bool has_date = date != 0;
bool has_key_hash = true; bool has_key_hash = true;
bool has_initial_folder_id = initial_folder_id != FolderId(); bool has_initial_folder_id = initial_folder_id != FolderId();
@ -399,7 +399,7 @@ class SecretChatActor final : public NetQueryCallback {
storer.store_int(id); storer.store_int(id);
storer.store_long(access_hash); storer.store_long(access_hash);
storer.store_int(user_id.get()); storer.store_long(user_id.get());
storer.store_long(user_access_hash); storer.store_long(user_access_hash);
storer.store_int(random_id); storer.store_int(random_id);
if (has_date) { if (has_date) {
@ -425,12 +425,17 @@ class SecretChatActor final : public NetQueryCallback {
bool has_date = (flags & 1) != 0; bool has_date = (flags & 1) != 0;
bool has_key_hash = (flags & 2) != 0; bool has_key_hash = (flags & 2) != 0;
bool has_initial_folder_id = (flags & 4) != 0; bool has_initial_folder_id = (flags & 4) != 0;
bool has_64bit_user_id = (flags & 8) != 0;
x = parser.fetch_int(); x = parser.fetch_int();
id = parser.fetch_int(); id = parser.fetch_int();
access_hash = parser.fetch_long(); access_hash = parser.fetch_long();
user_id = UserId(parser.fetch_int()); if (has_64bit_user_id) {
user_id = UserId(parser.fetch_long());
} else {
user_id = UserId(static_cast<int64>(parser.fetch_int()));
}
user_access_hash = parser.fetch_long(); user_access_hash = parser.fetch_long();
random_id = parser.fetch_int(); random_id = parser.fetch_int();
if (has_date) { if (has_date) {

View File

@ -65,7 +65,7 @@ class GetAllStickersQuery final : public Td::ResultHandler {
bool is_masks_; bool is_masks_;
public: public:
void send(bool is_masks, int32 hash) { void send(bool is_masks, int64 hash) {
is_masks_ = is_masks; is_masks_ = is_masks;
if (is_masks) { if (is_masks) {
send_query(G()->net_query_creator().create(telegram_api::messages_getMaskStickers(hash))); send_query(G()->net_query_creator().create(telegram_api::messages_getMaskStickers(hash)));
@ -100,7 +100,7 @@ class SearchStickersQuery final : public Td::ResultHandler {
string emoji_; string emoji_;
public: public:
void send(string emoji, int32 hash) { void send(string emoji, int64 hash) {
emoji_ = std::move(emoji); emoji_ = std::move(emoji);
send_query(G()->net_query_creator().create(telegram_api::messages_getStickers(emoji_, hash))); send_query(G()->net_query_creator().create(telegram_api::messages_getStickers(emoji_, hash)));
} }
@ -277,7 +277,7 @@ class GetArchivedStickerSetsQuery final : public Td::ResultHandler {
class GetFeaturedStickerSetsQuery final : public Td::ResultHandler { class GetFeaturedStickerSetsQuery final : public Td::ResultHandler {
public: public:
void send(int32 hash) { void send(int64 hash) {
LOG(INFO) << "Get trending sticker sets with hash " << hash; LOG(INFO) << "Get trending sticker sets with hash " << hash;
send_query(G()->net_query_creator().create(telegram_api::messages_getFeaturedStickers(hash))); send_query(G()->net_query_creator().create(telegram_api::messages_getFeaturedStickers(hash)));
} }
@ -382,7 +382,7 @@ class GetRecentStickersQuery final : public Td::ResultHandler {
bool is_attached_ = false; bool is_attached_ = false;
public: public:
void send(bool is_repair, bool is_attached, int32 hash) { void send(bool is_repair, bool is_attached, int64 hash) {
is_repair_ = is_repair; is_repair_ = is_repair;
is_attached_ = is_attached; is_attached_ = is_attached;
int32 flags = 0; int32 flags = 0;
@ -531,7 +531,7 @@ class GetFavedStickersQuery final : public Td::ResultHandler {
bool is_repair_ = false; bool is_repair_ = false;
public: public:
void send(bool is_repair, int32 hash) { void send(bool is_repair, int64 hash) {
is_repair_ = is_repair; is_repair_ = is_repair;
LOG(INFO) << "Send get favorite stickers request with hash = " << hash; LOG(INFO) << "Send get favorite stickers request with hash = " << hash;
send_query(G()->net_query_creator().create(telegram_api::messages_getFavedStickers(hash))); send_query(G()->net_query_creator().create(telegram_api::messages_getFavedStickers(hash)));
@ -3132,7 +3132,7 @@ vector<FileId> StickersManager::search_stickers(string emoji, int32 limit, Promi
auto &promises = search_stickers_queries_[emoji]; auto &promises = search_stickers_queries_[emoji];
promises.push_back(std::move(promise)); promises.push_back(std::move(promise));
if (promises.size() == 1u) { if (promises.size() == 1u) {
int32 hash = 0; int64 hash = 0;
if (it != found_stickers_.end()) { if (it != found_stickers_.end()) {
hash = get_recent_stickers_hash(it->second.sticker_ids_); hash = get_recent_stickers_hash(it->second.sticker_ids_);
} }
@ -5310,29 +5310,27 @@ vector<FileId> StickersManager::get_attached_sticker_file_ids(const vector<int32
return result; return result;
} }
int32 StickersManager::get_sticker_sets_hash(const vector<StickerSetId> &sticker_set_ids) const { int64 StickersManager::get_sticker_sets_hash(const vector<StickerSetId> &sticker_set_ids) const {
vector<uint32> numbers; vector<uint64> numbers;
numbers.reserve(sticker_set_ids.size()); numbers.reserve(sticker_set_ids.size());
for (auto sticker_set_id : sticker_set_ids) { for (auto sticker_set_id : sticker_set_ids) {
const StickerSet *sticker_set = get_sticker_set(sticker_set_id); const StickerSet *sticker_set = get_sticker_set(sticker_set_id);
CHECK(sticker_set != nullptr); CHECK(sticker_set != nullptr);
CHECK(sticker_set->is_inited); CHECK(sticker_set->is_inited);
numbers.push_back(static_cast<uint32>(sticker_set->hash)); numbers.push_back(sticker_set->hash);
} }
return get_vector_hash(numbers); return get_vector_hash(numbers);
} }
int32 StickersManager::get_featured_sticker_sets_hash() const { int64 StickersManager::get_featured_sticker_sets_hash() const {
vector<uint32> numbers; vector<uint64> numbers;
numbers.reserve(featured_sticker_set_ids_.size()); numbers.reserve(featured_sticker_set_ids_.size() * 2);
for (auto sticker_set_id : featured_sticker_set_ids_) { for (auto sticker_set_id : featured_sticker_set_ids_) {
const StickerSet *sticker_set = get_sticker_set(sticker_set_id); const StickerSet *sticker_set = get_sticker_set(sticker_set_id);
CHECK(sticker_set != nullptr); CHECK(sticker_set != nullptr);
CHECK(sticker_set->is_inited); CHECK(sticker_set->is_inited);
uint64 pack_id = static_cast<uint64>(sticker_set_id.get()); numbers.push_back(sticker_set_id.get());
numbers.push_back(static_cast<uint32>(pack_id >> 32));
numbers.push_back(static_cast<uint32>(pack_id & 0xFFFFFFFF));
if (!sticker_set->is_viewed) { if (!sticker_set->is_viewed) {
numbers.push_back(1); numbers.push_back(1);
@ -5544,9 +5542,9 @@ void StickersManager::on_get_recent_stickers_failed(bool is_repair, bool is_atta
} }
} }
int32 StickersManager::get_recent_stickers_hash(const vector<FileId> &sticker_ids) const { int64 StickersManager::get_recent_stickers_hash(const vector<FileId> &sticker_ids) const {
vector<uint32> numbers; vector<uint64> numbers;
numbers.reserve(sticker_ids.size() * 2); numbers.reserve(sticker_ids.size());
for (auto sticker_id : sticker_ids) { for (auto sticker_id : sticker_ids) {
auto sticker = get_sticker(sticker_id); auto sticker = get_sticker(sticker_id);
CHECK(sticker != nullptr); CHECK(sticker != nullptr);
@ -5556,9 +5554,7 @@ int32 StickersManager::get_recent_stickers_hash(const vector<FileId> &sticker_id
LOG(ERROR) << "Recent sticker remote location is not document: " << file_view.remote_location(); LOG(ERROR) << "Recent sticker remote location is not document: " << file_view.remote_location();
continue; continue;
} }
auto id = static_cast<uint64>(file_view.remote_location().get_id()); numbers.push_back(file_view.remote_location().get_id());
numbers.push_back(static_cast<uint32>(id >> 32));
numbers.push_back(static_cast<uint32>(id & 0xFFFFFFFF));
} }
return get_vector_hash(numbers); return get_vector_hash(numbers);
} }
@ -5965,7 +5961,7 @@ void StickersManager::on_get_favorite_stickers_failed(bool is_repair, Status err
} }
} }
int32 StickersManager::get_favorite_stickers_hash() const { int64 StickersManager::get_favorite_stickers_hash() const {
return get_recent_stickers_hash(favorite_sticker_ids_); return get_recent_stickers_hash(favorite_sticker_ids_);
} }

View File

@ -459,11 +459,11 @@ class StickersManager final : public Actor {
static void read_featured_sticker_sets(void *td_void); static void read_featured_sticker_sets(void *td_void);
int32 get_sticker_sets_hash(const vector<StickerSetId> &sticker_set_ids) const; int64 get_sticker_sets_hash(const vector<StickerSetId> &sticker_set_ids) const;
int32 get_featured_sticker_sets_hash() const; int64 get_featured_sticker_sets_hash() const;
int32 get_recent_stickers_hash(const vector<FileId> &sticker_ids) const; int64 get_recent_stickers_hash(const vector<FileId> &sticker_ids) const;
void load_installed_sticker_sets(bool is_masks, Promise<Unit> &&promise); void load_installed_sticker_sets(bool is_masks, Promise<Unit> &&promise);
@ -520,7 +520,7 @@ class StickersManager final : public Actor {
void add_recent_sticker_impl(bool is_attached, FileId sticker_id, bool add_on_server, Promise<Unit> &&promise); void add_recent_sticker_impl(bool is_attached, FileId sticker_id, bool add_on_server, Promise<Unit> &&promise);
int32 get_favorite_stickers_hash() const; int64 get_favorite_stickers_hash() const;
void add_favorite_sticker_impl(FileId sticker_id, bool add_on_server, Promise<Unit> &&promise); void add_favorite_sticker_impl(FileId sticker_id, bool add_on_server, Promise<Unit> &&promise);
@ -650,9 +650,9 @@ class StickersManager final : public Actor {
double next_recent_stickers_load_time_[2] = {0, 0}; double next_recent_stickers_load_time_[2] = {0, 0};
double next_favorite_stickers_load_time_ = 0; double next_favorite_stickers_load_time_ = 0;
int32 installed_sticker_sets_hash_[2] = {0, 0}; int64 installed_sticker_sets_hash_[2] = {0, 0};
int32 featured_sticker_sets_hash_ = 0; int64 featured_sticker_sets_hash_ = 0;
int32 recent_stickers_hash_[2] = {0, 0}; int64 recent_stickers_hash_[2] = {0, 0};
int32 old_featured_sticker_set_count_ = -1; int32 old_featured_sticker_set_count_ = -1;
uint32 old_featured_sticker_set_generation_ = 1; uint32 old_featured_sticker_set_generation_ = 1;

View File

@ -635,7 +635,7 @@ class GetUserRequest final : public RequestActor<> {
} }
public: public:
GetUserRequest(ActorShared<Td> td, uint64 request_id, int32 user_id) GetUserRequest(ActorShared<Td> td, uint64 request_id, int64 user_id)
: RequestActor(std::move(td), request_id), user_id_(user_id) { : RequestActor(std::move(td), request_id), user_id_(user_id) {
set_tries(3); set_tries(3);
} }
@ -653,7 +653,7 @@ class GetUserFullInfoRequest final : public RequestActor<> {
} }
public: public:
GetUserFullInfoRequest(ActorShared<Td> td, uint64 request_id, int32 user_id) GetUserFullInfoRequest(ActorShared<Td> td, uint64 request_id, int64 user_id)
: RequestActor(std::move(td), request_id), user_id_(user_id) { : RequestActor(std::move(td), request_id), user_id_(user_id) {
} }
}; };
@ -670,7 +670,7 @@ class GetGroupRequest final : public RequestActor<> {
} }
public: public:
GetGroupRequest(ActorShared<Td> td, uint64 request_id, int32 chat_id) GetGroupRequest(ActorShared<Td> td, uint64 request_id, int64 chat_id)
: RequestActor(std::move(td), request_id), chat_id_(chat_id) { : RequestActor(std::move(td), request_id), chat_id_(chat_id) {
set_tries(3); set_tries(3);
} }
@ -688,7 +688,7 @@ class GetGroupFullInfoRequest final : public RequestActor<> {
} }
public: public:
GetGroupFullInfoRequest(ActorShared<Td> td, uint64 request_id, int32 chat_id) GetGroupFullInfoRequest(ActorShared<Td> td, uint64 request_id, int64 chat_id)
: RequestActor(std::move(td), request_id), chat_id_(chat_id) { : RequestActor(std::move(td), request_id), chat_id_(chat_id) {
} }
}; };
@ -705,7 +705,7 @@ class GetSupergroupRequest final : public RequestActor<> {
} }
public: public:
GetSupergroupRequest(ActorShared<Td> td, uint64 request_id, int32 channel_id) GetSupergroupRequest(ActorShared<Td> td, uint64 request_id, int64 channel_id)
: RequestActor(std::move(td), request_id), channel_id_(channel_id) { : RequestActor(std::move(td), request_id), channel_id_(channel_id) {
set_tries(3); set_tries(3);
} }
@ -724,7 +724,7 @@ class GetSupergroupFullInfoRequest final : public RequestActor<> {
} }
public: public:
GetSupergroupFullInfoRequest(ActorShared<Td> td, uint64 request_id, int32 channel_id) GetSupergroupFullInfoRequest(ActorShared<Td> td, uint64 request_id, int64 channel_id)
: RequestActor(std::move(td), request_id), channel_id_(channel_id) { : RequestActor(std::move(td), request_id), channel_id_(channel_id) {
} }
}; };
@ -905,7 +905,7 @@ class GetGroupsInCommonRequest final : public RequestActor<> {
} }
public: public:
GetGroupsInCommonRequest(ActorShared<Td> td, uint64 request_id, int32 user_id, int64 offset_dialog_id, int32 limit) GetGroupsInCommonRequest(ActorShared<Td> td, uint64 request_id, int64 user_id, int64 offset_dialog_id, int32 limit)
: RequestActor(std::move(td), request_id), user_id_(user_id), offset_dialog_id_(offset_dialog_id), limit_(limit) { : RequestActor(std::move(td), request_id), user_id_(user_id), offset_dialog_id_(offset_dialog_id), limit_(limit) {
} }
}; };
@ -1763,7 +1763,7 @@ class CreateNewSecretChatRequest final : public RequestActor<SecretChatId> {
} }
public: public:
CreateNewSecretChatRequest(ActorShared<Td> td, uint64 request_id, int32 user_id) CreateNewSecretChatRequest(ActorShared<Td> td, uint64 request_id, int64 user_id)
: RequestActor(std::move(td), request_id), user_id_(user_id) { : RequestActor(std::move(td), request_id), user_id_(user_id) {
} }
}; };
@ -2103,7 +2103,7 @@ class GetUserProfilePhotosRequest final : public RequestActor<> {
} }
public: public:
GetUserProfilePhotosRequest(ActorShared<Td> td, uint64 request_id, int32 user_id, int32 offset, int32 limit) GetUserProfilePhotosRequest(ActorShared<Td> td, uint64 request_id, int64 user_id, int32 offset, int32 limit)
: RequestActor(std::move(td), request_id), user_id_(user_id), offset_(offset), limit_(limit) { : RequestActor(std::move(td), request_id), user_id_(user_id), offset_(offset), limit_(limit) {
} }
}; };
@ -2396,7 +2396,7 @@ class UploadStickerFileRequest final : public RequestOnceActor {
} }
public: public:
UploadStickerFileRequest(ActorShared<Td> td, uint64 request_id, int32 user_id, UploadStickerFileRequest(ActorShared<Td> td, uint64 request_id, int64 user_id,
tl_object_ptr<td_api::InputSticker> &&sticker) tl_object_ptr<td_api::InputSticker> &&sticker)
: RequestOnceActor(std::move(td), request_id), user_id_(user_id), sticker_(std::move(sticker)) { : RequestOnceActor(std::move(td), request_id), user_id_(user_id), sticker_(std::move(sticker)) {
} }
@ -2424,7 +2424,7 @@ class CreateNewStickerSetRequest final : public RequestOnceActor {
} }
public: public:
CreateNewStickerSetRequest(ActorShared<Td> td, uint64 request_id, int32 user_id, string &&title, string &&name, CreateNewStickerSetRequest(ActorShared<Td> td, uint64 request_id, int64 user_id, string &&title, string &&name,
bool is_masks, vector<tl_object_ptr<td_api::InputSticker>> &&stickers, string &&software) bool is_masks, vector<tl_object_ptr<td_api::InputSticker>> &&stickers, string &&software)
: RequestOnceActor(std::move(td), request_id) : RequestOnceActor(std::move(td), request_id)
, user_id_(user_id) , user_id_(user_id)
@ -2454,7 +2454,7 @@ class AddStickerToSetRequest final : public RequestOnceActor {
} }
public: public:
AddStickerToSetRequest(ActorShared<Td> td, uint64 request_id, int32 user_id, string &&name, AddStickerToSetRequest(ActorShared<Td> td, uint64 request_id, int64 user_id, string &&name,
tl_object_ptr<td_api::InputSticker> &&sticker) tl_object_ptr<td_api::InputSticker> &&sticker)
: RequestOnceActor(std::move(td), request_id) : RequestOnceActor(std::move(td), request_id)
, user_id_(user_id) , user_id_(user_id)
@ -2481,7 +2481,7 @@ class SetStickerSetThumbnailRequest final : public RequestOnceActor {
} }
public: public:
SetStickerSetThumbnailRequest(ActorShared<Td> td, uint64 request_id, int32 user_id, string &&name, SetStickerSetThumbnailRequest(ActorShared<Td> td, uint64 request_id, int64 user_id, string &&name,
tl_object_ptr<td_api::InputFile> &&thumbnail) tl_object_ptr<td_api::InputFile> &&thumbnail)
: RequestOnceActor(std::move(td), request_id) : RequestOnceActor(std::move(td), request_id)
, user_id_(user_id) , user_id_(user_id)
@ -2730,7 +2730,7 @@ class GetInlineQueryResultsRequest final : public RequestOnceActor {
} }
public: public:
GetInlineQueryResultsRequest(ActorShared<Td> td, uint64 request_id, int32 bot_user_id, int64 dialog_id, GetInlineQueryResultsRequest(ActorShared<Td> td, uint64 request_id, int64 bot_user_id, int64 dialog_id,
const tl_object_ptr<td_api::location> &user_location, string query, string offset) const tl_object_ptr<td_api::location> &user_location, string query, string offset)
: RequestOnceActor(std::move(td), request_id) : RequestOnceActor(std::move(td), request_id)
, bot_user_id_(bot_user_id) , bot_user_id_(bot_user_id)
@ -3456,7 +3456,7 @@ void Td::on_config_option_updated(const string &name) {
stickers_manager_->on_update_favorite_stickers_limit( stickers_manager_->on_update_favorite_stickers_limit(
narrow_cast<int32>(G()->shared_config().get_option_integer(name))); narrow_cast<int32>(G()->shared_config().get_option_integer(name)));
} else if (name == "my_id") { } else if (name == "my_id") {
G()->set_my_id(static_cast<int32>(G()->shared_config().get_option_integer(name))); G()->set_my_id(G()->shared_config().get_option_integer(name));
} else if (name == "session_count") { } else if (name == "session_count") {
G()->net_query_dispatcher().update_session_count(); G()->net_query_dispatcher().update_session_count();
} else if (name == "use_pfs") { } else if (name == "use_pfs") {
@ -3986,7 +3986,7 @@ Status Td::init(DbKey key) {
init_managers(); init_managers();
G()->set_my_id(static_cast<int32>(G()->shared_config().get_option_integer("my_id"))); G()->set_my_id(G()->shared_config().get_option_integer("my_id"));
storage_manager_ = create_actor<StorageManager>("StorageManager", create_reference(), storage_manager_ = create_actor<StorageManager>("StorageManager", create_reference(),
min(current_scheduler_id + 2, scheduler_count - 1)); min(current_scheduler_id + 2, scheduler_count - 1));

View File

@ -360,7 +360,7 @@ void TopDialogManager::do_get_top_peers() {
LOG(INFO) << "Send get top peers request"; LOG(INFO) << "Send get top peers request";
using telegram_api::contacts_getTopPeers; using telegram_api::contacts_getTopPeers;
std::vector<uint32> ids; std::vector<uint64> ids;
for (auto &category : by_category_) { for (auto &category : by_category_) {
for (auto &top_dialog : category.dialogs) { for (auto &top_dialog : category.dialogs) {
auto dialog_id = top_dialog.dialog_id; auto dialog_id = top_dialog.dialog_id;
@ -380,7 +380,7 @@ void TopDialogManager::do_get_top_peers() {
} }
} }
int32 hash = get_vector_hash(ids); int64 hash = get_vector_hash(ids);
int32 flags = contacts_getTopPeers::CORRESPONDENTS_MASK | contacts_getTopPeers::BOTS_PM_MASK | int32 flags = contacts_getTopPeers::CORRESPONDENTS_MASK | contacts_getTopPeers::BOTS_PM_MASK |
contacts_getTopPeers::BOTS_INLINE_MASK | contacts_getTopPeers::GROUPS_MASK | contacts_getTopPeers::BOTS_INLINE_MASK | contacts_getTopPeers::GROUPS_MASK |

View File

@ -15,17 +15,17 @@
namespace td { namespace td {
class UserId { class UserId {
int32 id = 0; int64 id = 0;
public: public:
UserId() = default; UserId() = default;
explicit UserId(int32 user_id) : id(user_id) { explicit UserId(int64 user_id) : id(user_id) {
} }
template <class T, typename = std::enable_if_t<std::is_convertible<T, int32>::value>> template <class T, typename = std::enable_if_t<std::is_convertible<T, int64>::value>>
UserId(T user_id) = delete; UserId(T user_id) = delete;
static vector<UserId> get_user_ids(const vector<int32> &input_user_ids) { static vector<UserId> get_user_ids(const vector<int64> &input_user_ids) {
vector<UserId> user_ids; vector<UserId> user_ids;
user_ids.reserve(input_user_ids.size()); user_ids.reserve(input_user_ids.size());
for (auto &input_user_id : input_user_ids) { for (auto &input_user_id : input_user_ids) {
@ -34,8 +34,8 @@ class UserId {
return user_ids; return user_ids;
} }
static vector<int32> get_input_user_ids(const vector<UserId> &user_ids) { static vector<int64> get_input_user_ids(const vector<UserId> &user_ids) {
vector<int32> input_user_ids; vector<int64> input_user_ids;
input_user_ids.reserve(user_ids.size()); input_user_ids.reserve(user_ids.size());
for (auto &user_id : user_ids) { for (auto &user_id : user_ids) {
input_user_ids.emplace_back(user_id.get()); input_user_ids.emplace_back(user_id.get());
@ -47,7 +47,7 @@ class UserId {
return id > 0; return id > 0;
} }
int32 get() const { int64 get() const {
return id; return id;
} }
@ -61,18 +61,22 @@ class UserId {
template <class StorerT> template <class StorerT>
void store(StorerT &storer) const { void store(StorerT &storer) const {
storer.store_int(id); storer.store_long(id);
} }
template <class ParserT> template <class ParserT>
void parse(ParserT &parser) { void parse(ParserT &parser) {
id = parser.fetch_int(); if (parser.version() >= static_cast<int32>(Version::Support64BitIds)) {
id = parser.fetch_long();
} else {
id = parser.fetch_int();
}
} }
}; };
struct UserIdHash { struct UserIdHash {
std::size_t operator()(UserId user_id) const { std::size_t operator()(UserId user_id) const {
return std::hash<int32>()(user_id.get()); return std::hash<int64>()(user_id.get());
} }
}; };

View File

@ -8,7 +8,7 @@
namespace td { namespace td {
constexpr int32 MTPROTO_LAYER = 132; constexpr int32 MTPROTO_LAYER = 133;
enum class Version : int32 { enum class Version : int32 {
Initial, // 0 Initial, // 0
@ -44,6 +44,7 @@ enum class Version : int32 {
AddLiveLocationProximityAlertDistance, // 30 AddLiveLocationProximityAlertDistance, // 30
SupportBannedChannels, SupportBannedChannels,
RemovePhotoVolumeAndLocalId, RemovePhotoVolumeAndLocalId,
Support64BitIds,
Next Next
}; };

View File

@ -237,8 +237,8 @@ class CliClient final : public Actor {
string username; string username;
}; };
std::unordered_map<int32, User> users_; std::unordered_map<int64, User> users_;
std::unordered_map<string, int32> username_to_user_id_; std::unordered_map<string, int64> username_to_user_id_;
void register_user(const td_api::user &user) { void register_user(const td_api::user &user) {
User &new_user = users_[user.id_]; User &new_user = users_[user.id_];
@ -248,7 +248,7 @@ class CliClient final : public Actor {
username_to_user_id_[to_lower(new_user.username)] = user.id_; username_to_user_id_[to_lower(new_user.username)] = user.id_;
} }
void print_user(Logger &log, int32 user_id, bool full = false) { void print_user(Logger &log, int64 user_id, bool full = false) {
const User *user = &users_[user_id]; const User *user = &users_[user_id];
log << user->first_name << " " << user->last_name << " #" << user_id; log << user->first_name << " " << user->last_name << " #" << user_id;
if (!user->username.empty()) { if (!user->username.empty()) {
@ -267,7 +267,7 @@ class CliClient final : public Actor {
} }
} }
std::unordered_map<string, int32> username_to_supergroup_id_; std::unordered_map<string, int64> username_to_supergroup_id_;
void register_supergroup(const td_api::supergroup &supergroup) { void register_supergroup(const td_api::supergroup &supergroup) {
if (!supergroup.username_.empty()) { if (!supergroup.username_.empty()) {
username_to_supergroup_id_[to_lower(supergroup.username_)] = supergroup.id_; username_to_supergroup_id_[to_lower(supergroup.username_)] = supergroup.id_;
@ -276,7 +276,7 @@ class CliClient final : public Actor {
void update_option(const td_api::updateOption &option) { void update_option(const td_api::updateOption &option) {
if (option.name_ == "my_id" && option.value_->get_id() == td_api::optionValueInteger::ID) { if (option.name_ == "my_id" && option.value_->get_id() == td_api::optionValueInteger::ID) {
my_id_ = static_cast<int32>(static_cast<const td_api::optionValueInteger *>(option.value_.get())->value_); my_id_ = static_cast<const td_api::optionValueInteger *>(option.value_.get())->value_;
LOG(INFO) << "Set my user identifier to " << my_id_; LOG(INFO) << "Set my user identifier to " << my_id_;
} }
} }
@ -518,7 +518,7 @@ class CliClient final : public Actor {
return to_integer<int32>(trim(str)); return to_integer<int32>(trim(str));
} }
int32 as_user_id(Slice str) const { int64 as_user_id(Slice str) const {
str = trim(str); str = trim(str);
if (str == "me") { if (str == "me") {
return my_id_; return my_id_;
@ -534,23 +534,23 @@ class CliClient final : public Actor {
LOG(ERROR) << "Can't find user " << str; LOG(ERROR) << "Can't find user " << str;
return 0; return 0;
} }
return to_integer<int32>(str); return to_integer<int64>(str);
} }
vector<int32> as_user_ids(Slice user_ids) const { vector<int64> as_user_ids(Slice user_ids) const {
return transform(full_split(user_ids, get_delimiter(user_ids)), [this](Slice str) { return as_user_id(str); }); return transform(full_split(user_ids, get_delimiter(user_ids)), [this](Slice str) { return as_user_id(str); });
} }
static int32 as_basic_group_id(Slice str) { static int64 as_basic_group_id(Slice str) {
str = trim(str); str = trim(str);
auto result = to_integer<int32>(str); auto result = to_integer<int64>(str);
if (result < 0) { if (result < 0) {
return -result; return -result;
} }
return result; return result;
} }
int32 as_supergroup_id(Slice str) const { int64 as_supergroup_id(Slice str) const {
str = trim(str); str = trim(str);
if (str[0] == '@') { if (str[0] == '@') {
str.remove_prefix(1); str.remove_prefix(1);
@ -565,9 +565,9 @@ class CliClient final : public Actor {
auto result = to_integer<int64>(str); auto result = to_integer<int64>(str);
int64 shift = static_cast<int64>(-1000000000000ll); int64 shift = static_cast<int64>(-1000000000000ll);
if (result <= shift) { if (result <= shift) {
return static_cast<int32>(shift - result); return shift - result;
} }
return static_cast<int32>(result); return result;
} }
static int32 as_secret_chat_id(Slice str) { static int32 as_secret_chat_id(Slice str) {
@ -606,8 +606,8 @@ class CliClient final : public Actor {
if ((str.size() >= 20 && is_base64url(str)) || begins_with(str, "http")) { if ((str.size() >= 20 && is_base64url(str)) || begins_with(str, "http")) {
return as_remote_file(str); return as_remote_file(str);
} }
auto r_id = to_integer_safe<int32>(str); auto r_file_id = to_integer_safe<int32>(str);
if (r_id.is_ok()) { if (r_file_id.is_ok()) {
return as_input_file_id(str); return as_input_file_id(str);
} }
if (str.find(';') < str.size()) { if (str.find(';') < str.size()) {
@ -3923,7 +3923,7 @@ class CliClient final : public Actor {
string limit; string limit;
get_args(args, chat_id, limit); get_args(args, chat_id, limit);
send_request(td_api::make_object<td_api::getChatEventLog>(as_chat_id(chat_id), "", 0, as_limit(limit), nullptr, send_request(td_api::make_object<td_api::getChatEventLog>(as_chat_id(chat_id), "", 0, as_limit(limit), nullptr,
vector<int32>())); vector<int64>()));
} else if (op == "join") { } else if (op == "join") {
send_request(td_api::make_object<td_api::joinChat>(as_chat_id(args))); send_request(td_api::make_object<td_api::joinChat>(as_chat_id(args)));
} else if (op == "leave") { } else if (op == "leave") {
@ -4476,7 +4476,7 @@ class CliClient final : public Actor {
std::unordered_map<int32, double> being_downloaded_files_; std::unordered_map<int32, double> being_downloaded_files_;
int32 my_id_ = 0; int64 my_id_ = 0;
string schedule_date_; string schedule_date_;
string message_thread_id_; string message_thread_id_;

View File

@ -77,7 +77,7 @@ class SecretChatEvent : public LogEvent {
virtual Type get_type() const = 0; virtual Type get_type() const = 0;
static constexpr int32 version() { static constexpr int32 version() {
return 3; return 4;
} }
template <class F> template <class F>
@ -475,7 +475,7 @@ class CreateSecretChat final : public SecretChatLogEventBase<CreateSecretChat> {
void store(StorerT &storer) const { void store(StorerT &storer) const {
using td::store; using td::store;
store(random_id, storer); store(random_id, storer);
store(user_id.get(), storer); store(user_id, storer);
store(user_access_hash, storer); store(user_access_hash, storer);
} }
@ -483,9 +483,15 @@ class CreateSecretChat final : public SecretChatLogEventBase<CreateSecretChat> {
void parse(ParserT &parser) { void parse(ParserT &parser) {
using td::parse; using td::parse;
parse(random_id, parser); parse(random_id, parser);
int32 legacy_user_id; if (parser.version() >= 4) {
parse(legacy_user_id, parser); int32 legacy_user_id;
user_id = UserId(legacy_user_id); parse(legacy_user_id, parser);
user_id = UserId(static_cast<int64>(legacy_user_id));
} else {
int64 legacy_user_id;
parse(legacy_user_id, parser);
user_id = UserId(legacy_user_id);
}
parse(user_access_hash, parser); parse(user_access_hash, parser);
} }

View File

@ -239,12 +239,15 @@ bool is_empty_string(const string &str) {
return strip_empty_characters(str, str.size()).empty(); return strip_empty_characters(str, str.size()).empty();
} }
int32 get_vector_hash(const vector<uint32> &numbers) { int64 get_vector_hash(const vector<uint64> &numbers) {
uint32 acc = 0; uint64 acc = 0;
for (auto number : numbers) { for (auto number : numbers) {
acc = acc * 20261 + number; acc ^= acc >> 21;
acc ^= acc << 35;
acc ^= acc >> 4;
acc += number;
} }
return static_cast<int32>(acc & 0x7FFFFFFF); return static_cast<int64>(acc);
} }
string get_emoji_fingerprint(uint64 num) { string get_emoji_fingerprint(uint64 num) {

View File

@ -29,7 +29,7 @@ string strip_empty_characters(string str, size_t max_length, bool strip_rtlo = f
bool is_empty_string(const string &str) TD_WARN_UNUSED_RESULT; bool is_empty_string(const string &str) TD_WARN_UNUSED_RESULT;
// calculates hash of list of uint32 // calculates hash of list of uint32
int32 get_vector_hash(const vector<uint32> &numbers) TD_WARN_UNUSED_RESULT; int64 get_vector_hash(const vector<uint64> &numbers) TD_WARN_UNUSED_RESULT;
// returns emoji corresponding to the specified number // returns emoji corresponding to the specified number
string get_emoji_fingerprint(uint64 num); string get_emoji_fingerprint(uint64 num);

View File

@ -40,7 +40,7 @@ class DcAuthManager final : public NetQueryCallback {
enum class State : int32 { Waiting, Export, Import, BeforeOk, Ok }; enum class State : int32 { Waiting, Export, Import, BeforeOk, Ok };
State state = State::Waiting; State state = State::Waiting;
uint64 wait_id; uint64 wait_id;
int32 export_id; int64 export_id;
BufferSlice export_bytes; BufferSlice export_bytes;
}; };

View File

@ -17,7 +17,7 @@ namespace td {
int VERBOSITY_NAME(net_query) = VERBOSITY_NAME(INFO); int VERBOSITY_NAME(net_query) = VERBOSITY_NAME(INFO);
int32 NetQuery::get_my_id() { int64 NetQuery::get_my_id() {
return G()->get_my_id(); return G()->get_my_id();
} }

View File

@ -325,7 +325,7 @@ class NetQuery final : public TsListNode<NetQueryDebug> {
source_ = std::move(source); source_ = std::move(source);
} }
static int32 get_my_id(); static int64 get_my_id();
static int32 tl_magic(const BufferSlice &buffer_slice); static int32 tl_magic(const BufferSlice &buffer_slice);

View File

@ -17,7 +17,7 @@ namespace td {
struct NetQueryDebug { struct NetQueryDebug {
double start_timestamp_ = 0; double start_timestamp_ = 0;
int32 my_id_ = 0; int64 my_id_ = 0;
int32 resend_count_ = 0; int32 resend_count_ = 0;
string state_ = "empty"; string state_ = "empty";
double state_timestamp_ = 0; double state_timestamp_ = 0;

View File

@ -1428,7 +1428,8 @@ TEST(MessageEntities, parse_markdown) {
{{td::MessageEntity::Type::TextUrl, 0, 12, "https://telegram.dog/?\\("}}); {{td::MessageEntity::Type::TextUrl, 0, 12, "https://telegram.dog/?\\("}});
check_parse_markdown("[telegram\\.org]()", "telegram.org", {}); check_parse_markdown("[telegram\\.org]()", "telegram.org", {});
check_parse_markdown("[telegram\\.org](asdasd)", "telegram.org", {}); check_parse_markdown("[telegram\\.org](asdasd)", "telegram.org", {});
check_parse_markdown("[telegram\\.org](tg:user?id=123456)", "telegram.org", {{0, 12, td::UserId(123456)}}); check_parse_markdown("[telegram\\.org](tg:user?id=123456)", "telegram.org",
{{0, 12, td::UserId(static_cast<td::int64>(123456))}});
} }
static void check_parse_markdown_v3(td::string text, td::vector<td::MessageEntity> entities, static void check_parse_markdown_v3(td::string text, td::vector<td::MessageEntity> entities,
@ -1483,8 +1484,10 @@ TEST(MessageEntities, parse_markdown_v3) {
check_parse_markdown_v3("[ ](t.me)", "", {}, true); check_parse_markdown_v3("[ ](t.me)", "", {}, true);
check_parse_markdown_v3("[ ](t.me)a", " a", {{td::MessageEntity::Type::TextUrl, 0, 1, "http://t.me/"}}, true); check_parse_markdown_v3("[ ](t.me)a", " a", {{td::MessageEntity::Type::TextUrl, 0, 1, "http://t.me/"}}, true);
check_parse_markdown_v3( check_parse_markdown_v3(
"[ ](t.me) [ ](t.me)", {{td::MessageEntity::Type::TextUrl, 8, 1, "http://t.me/"}, {10, 1, td::UserId(1)}}, "[ ](t.me) [ ](t.me)",
"[ ](t.me) [ ](t.me)", {{td::MessageEntity::Type::TextUrl, 8, 1, "http://t.me/"}, {10, 1, td::UserId(1)}}); {{td::MessageEntity::Type::TextUrl, 8, 1, "http://t.me/"}, {10, 1, td::UserId(static_cast<td::int64>(1))}},
"[ ](t.me) [ ](t.me)",
{{td::MessageEntity::Type::TextUrl, 8, 1, "http://t.me/"}, {10, 1, td::UserId(static_cast<td::int64>(1))}});
check_parse_markdown_v3("[\n](t.me)", "\n", {{td::MessageEntity::Type::TextUrl, 0, 1, "http://t.me/"}}); check_parse_markdown_v3("[\n](t.me)", "\n", {{td::MessageEntity::Type::TextUrl, 0, 1, "http://t.me/"}});
check_parse_markdown_v3("[\n](t.me)a", "\na", {{td::MessageEntity::Type::TextUrl, 0, 1, "http://t.me/"}}, true); check_parse_markdown_v3("[\n](t.me)a", "\na", {{td::MessageEntity::Type::TextUrl, 0, 1, "http://t.me/"}}, true);
check_parse_markdown_v3("asd[abcd](google.com)", {{td::MessageEntity::Type::Italic, 0, 5}}, "asdabcd", check_parse_markdown_v3("asd[abcd](google.com)", {{td::MessageEntity::Type::Italic, 0, 5}}, "asdabcd",
@ -1528,14 +1531,14 @@ TEST(MessageEntities, parse_markdown_v3) {
{td::MessageEntity::Type::Bold, 15, 2}, {td::MessageEntity::Type::Bold, 15, 2},
{td::MessageEntity::Type::Bold, 18, 2}, {td::MessageEntity::Type::Bold, 18, 2},
{td::MessageEntity::Type::Bold, 26, 2}, {td::MessageEntity::Type::Bold, 26, 2},
{31, 2, td::UserId(1)}, {31, 2, td::UserId(static_cast<td::int64>(1))},
{td::MessageEntity::Type::Bold, 35, 1}, {td::MessageEntity::Type::Bold, 35, 1},
{td::MessageEntity::Type::Bold, 44, 2}, {td::MessageEntity::Type::Bold, 44, 2},
{td::MessageEntity::Type::Bold, 50, 2}, {td::MessageEntity::Type::Bold, 50, 2},
{td::MessageEntity::Type::Bold, 54, 2}, {td::MessageEntity::Type::Bold, 54, 2},
{56, 2, td::UserId(2)}, {56, 2, td::UserId(static_cast<td::int64>(2))},
{td::MessageEntity::Type::Bold, 58, 7}, {td::MessageEntity::Type::Bold, 58, 7},
{60, 2, td::UserId(3)}, {60, 2, td::UserId(static_cast<td::int64>(3))},
{td::MessageEntity::Type::Bold, 67, 7}, {td::MessageEntity::Type::Bold, 67, 7},
{td::MessageEntity::Type::Bold, 80, 7}, {td::MessageEntity::Type::Bold, 80, 7},
{td::MessageEntity::Type::Bold, 89, 25}}, {td::MessageEntity::Type::Bold, 89, 25}},
@ -1547,11 +1550,11 @@ TEST(MessageEntities, parse_markdown_v3) {
{td::MessageEntity::Type::Bold, 6, 2}, {td::MessageEntity::Type::Bold, 6, 2},
{td::MessageEntity::Type::Bold, 10, 2}, {td::MessageEntity::Type::Bold, 10, 2},
{td::MessageEntity::Type::Bold, 14, 2}, {td::MessageEntity::Type::Bold, 14, 2},
{18, 2, td::UserId(1)}, {18, 2, td::UserId(static_cast<td::int64>(1))},
{td::MessageEntity::Type::TextUrl, 22, 8, "http://www.🤙.tk/"}, {td::MessageEntity::Type::TextUrl, 22, 8, "http://www.🤙.tk/"},
{30, 2, td::UserId(2)}, {30, 2, td::UserId(static_cast<td::int64>(2))},
{td::MessageEntity::Type::Bold, 32, 2}, {td::MessageEntity::Type::Bold, 32, 2},
{34, 2, td::UserId(3)}, {34, 2, td::UserId(static_cast<td::int64>(3))},
{td::MessageEntity::Type::Bold, 34, 2}, {td::MessageEntity::Type::Bold, 34, 2},
{td::MessageEntity::Type::TextUrl, 36, 8, "http://www.🤙.tk/"}, {td::MessageEntity::Type::TextUrl, 36, 8, "http://www.🤙.tk/"},
{td::MessageEntity::Type::Bold, 36, 2}, {td::MessageEntity::Type::Bold, 36, 2},
@ -1757,8 +1760,9 @@ TEST(MessageEntities, get_markdown_v3) {
{{td::MessageEntity::Type::Code, 0, 1}, {td::MessageEntity::Type::Pre, 1, 1}}); {{td::MessageEntity::Type::Code, 0, 1}, {td::MessageEntity::Type::Pre, 1, 1}});
check_get_markdown_v3("[ ](http://t.me/)", {}, " ", {{td::MessageEntity::Type::TextUrl, 0, 1, "http://t.me/"}}); check_get_markdown_v3("[ ](http://t.me/)", {}, " ", {{td::MessageEntity::Type::TextUrl, 0, 1, "http://t.me/"}});
check_get_markdown_v3("[ ]t.me[)](http://t.me/) [ ](t.me)", {{25, 1, td::UserId(1)}}, "[ ]t.me) [ ](t.me)", check_get_markdown_v3(
{{td::MessageEntity::Type::TextUrl, 7, 1, "http://t.me/"}, {9, 1, td::UserId(1)}}); "[ ]t.me[)](http://t.me/) [ ](t.me)", {{25, 1, td::UserId(static_cast<td::int64>(1))}}, "[ ]t.me) [ ](t.me)",
{{td::MessageEntity::Type::TextUrl, 7, 1, "http://t.me/"}, {9, 1, td::UserId(static_cast<td::int64>(1))}});
check_get_markdown_v3("__ __", {}, " ", {{td::MessageEntity::Type::Italic, 0, 1}}); check_get_markdown_v3("__ __", {}, " ", {{td::MessageEntity::Type::Italic, 0, 1}});
check_get_markdown_v3("** **", {}, " ", {{td::MessageEntity::Type::Bold, 0, 1}}); check_get_markdown_v3("** **", {}, " ", {{td::MessageEntity::Type::Bold, 0, 1}});

View File

@ -280,7 +280,7 @@ class InitTask : public Task {
class GetMe : public Task { class GetMe : public Task {
public: public:
struct Result { struct Result {
int32 user_id; int64 user_id;
int64 chat_id; int64 chat_id;
}; };
GetMe(Promise<Result> promise) : promise_(std::move(promise)) { GetMe(Promise<Result> promise) : promise_(std::move(promise)) {
@ -293,9 +293,10 @@ class GetMe : public Task {
Promise<Result> promise_; Promise<Result> promise_;
Result result_; Result result_;
void with_user_id(int32 user_id) { void with_user_id(int64 user_id) {
result_.user_id = user_id; result_.user_id = user_id;
send_query(td::make_tl_object<td::td_api::createPrivateChat>(user_id, false), [this](auto res) { with_chat_id(res.move_as_ok()->id_); }); send_query(td::make_tl_object<td::td_api::createPrivateChat>(user_id, false),
[this](auto res) { with_chat_id(res.move_as_ok()->id_); });
} }
void with_chat_id(int64 chat_id) { void with_chat_id(int64 chat_id) {
@ -311,7 +312,8 @@ class UploadFile : public Task {
std::string content; std::string content;
std::string remote_id; std::string remote_id;
}; };
UploadFile(std::string dir, std::string content, int64 chat_id, Promise<Result> promise) : dir_(std::move(dir)), content_(std::move(content)), chat_id_(std::move(chat_id)), promise_(std::move(promise)) { UploadFile(std::string dir, std::string content, int64 chat_id, Promise<Result> promise)
: dir_(std::move(dir)), content_(std::move(content)), chat_id_(std::move(chat_id)), promise_(std::move(promise)) {
} }
void start_up() override { void start_up() override {
auto hash = hex_encode(sha256(content_)).substr(0, 10); auto hash = hex_encode(sha256(content_)).substr(0, 10);
@ -333,10 +335,10 @@ class UploadFile : public Task {
write_file(content_path_, content_).ensure(); write_file(content_path_, content_).ensure();
send_query(td::make_tl_object<td::td_api::sendMessage>( send_query(td::make_tl_object<td::td_api::sendMessage>(
chat_id_, 0, 0, nullptr, nullptr, chat_id_, 0, 0, nullptr, nullptr,
td::make_tl_object<td::td_api::inputMessageDocument>( td::make_tl_object<td::td_api::inputMessageDocument>(
td::make_tl_object<td::td_api::inputFileLocal>(content_path_), nullptr, true, td::make_tl_object<td::td_api::inputFileLocal>(content_path_), nullptr, true,
td::make_tl_object<td::td_api::formattedText>("tag", td::Auto()))), td::make_tl_object<td::td_api::formattedText>("tag", td::Auto()))),
[this](auto res) { with_message(res.move_as_ok()); }); [this](auto res) { with_message(res.move_as_ok()); });
} }
@ -388,12 +390,12 @@ class UploadFile : public Task {
class TestDownloadFile : public Task { class TestDownloadFile : public Task {
public: public:
TestDownloadFile(std::string remote_id, std::string content, Promise<Unit> promise) : remote_id_(std::move(remote_id)), content_(std::move(content)), promise_(std::move(promise)) { TestDownloadFile(std::string remote_id, std::string content, Promise<Unit> promise)
: remote_id_(std::move(remote_id)), content_(std::move(content)), promise_(std::move(promise)) {
} }
void start_up() override { void start_up() override {
send_query(td::make_tl_object<td::td_api::getRemoteFile>( send_query(td::make_tl_object<td::td_api::getRemoteFile>(remote_id_, nullptr),
remote_id_, nullptr [this](auto res) { start_file(*res.ok()); });
), [this](auto res) { start_file(*res.ok()); });
} }
private: private:
@ -407,13 +409,12 @@ class TestDownloadFile : public Task {
int32 file_id_{0}; int32 file_id_{0};
std::vector<Range> ranges_; std::vector<Range> ranges_;
void start_file(const td_api::file &file) { void start_file(const td_api::file &file) {
LOG(ERROR) << "Start"; LOG(ERROR) << "Start";
file_id_ = file.id_; file_id_ = file.id_;
// CHECK(!file.local_->is_downloading_active_); // CHECK(!file.local_->is_downloading_active_);
// CHECK(!file.local_->is_downloading_completed_); // CHECK(!file.local_->is_downloading_completed_);
// CHECK(file.local_->download_offset_ == 0); // CHECK(file.local_->download_offset_ == 0);
if (!file.local_->path_.empty()) { if (!file.local_->path_.empty()) {
unlink(file.local_->path_).ignore(); unlink(file.local_->path_).ignore();
} }
@ -453,11 +454,9 @@ class TestDownloadFile : public Task {
} }
void start_chunk() { void start_chunk() {
send_query(td::make_tl_object<td::td_api::downloadFile>(file_id_, 1, int(ranges_.back().begin),
send_query(td::make_tl_object<td::td_api::downloadFile>( int(ranges_.back().end - ranges_.back().begin), true),
file_id_, 1, int(ranges_.back().begin), int(ranges_.back().end - ranges_.back().begin), true [this](auto res) { got_chunk(*res.ok()); });
), [this](auto res) { got_chunk(*res.ok()); });
} }
}; };
@ -526,18 +525,20 @@ class TestTd : public Actor {
LOG(ERROR) << "Alice user_id=" << alice_id_.user_id << ", chat_id=" << alice_id_.chat_id; LOG(ERROR) << "Alice user_id=" << alice_id_.user_id << ", chat_id=" << alice_id_.chat_id;
auto content = gen_readable_file(65536, 20); auto content = gen_readable_file(65536, 20);
send_closure(alice_, &TestClient::add_listener, send_closure(alice_, &TestClient::add_listener,
td::make_unique<UploadFile>(alice_cache_dir_, std::move(content), alice_id_.chat_id, promise_send_closure(actor_id(this), &TestTd::with_file))); td::make_unique<UploadFile>(alice_cache_dir_, std::move(content), alice_id_.chat_id,
promise_send_closure(actor_id(this), &TestTd::with_file)));
} }
void with_file(Result<UploadFile::Result> r_result) { void with_file(Result<UploadFile::Result> r_result) {
auto result = r_result.move_as_ok(); auto result = r_result.move_as_ok();
send_closure(alice_, &TestClient::add_listener, send_closure(
td::make_unique<TestDownloadFile>(result.remote_id, std::move(result.content), promise_send_closure(actor_id(this), &TestTd::after_test_download_file))); alice_, &TestClient::add_listener,
td::make_unique<TestDownloadFile>(result.remote_id, std::move(result.content),
promise_send_closure(actor_id(this), &TestTd::after_test_download_file)));
} }
void after_test_download_file(Result<Unit>) { void after_test_download_file(Result<Unit>) {
close(); close();
} }
void close() { void close() {
MultiPromiseActorSafe mp("close"); MultiPromiseActorSafe mp("close");
mp.add_promise(promise_send_closure(actor_id(this), &TestTd::check_close)); mp.add_promise(promise_send_closure(actor_id(this), &TestTd::check_close));

View File

@ -85,7 +85,7 @@ class InputUser {
class inputUser final : public InputUser { class inputUser final : public InputUser {
public: public:
int32 user_id_{}; int64 user_id_{};
int64 access_hash_{}; int64 access_hash_{};
static const int32 ID = -668391402; static const int32 ID = -668391402;
@ -254,14 +254,14 @@ class encryptedChat final {
int32 id_{}; int32 id_{};
int64 access_hash_{}; int64 access_hash_{};
int32 date_{}; int32 date_{};
int32 admin_id_{}; int64 admin_id_{};
int32 participant_id_{}; int64 participant_id_{};
BufferSlice g_a_or_b_; BufferSlice g_a_or_b_;
int64 key_fingerprint_{}; int64 key_fingerprint_{};
encryptedChat() = default; encryptedChat() = default;
encryptedChat(int32 id_, int64 access_hash_, int32 date_, int32 admin_id_, int32 participant_id_, encryptedChat(int32 id_, int64 access_hash_, int32 date_, int64 admin_id_, int64 participant_id_,
BufferSlice &&g_a_or_b_, int64 key_fingerprint_) BufferSlice &&g_a_or_b_, int64 key_fingerprint_)
: id_(id_) : id_(id_)
, access_hash_(access_hash_) , access_hash_(access_hash_)
@ -763,8 +763,8 @@ class Master final : public Actor {
auto old_context = set_context(std::make_shared<Global>()); auto old_context = set_context(std::make_shared<Global>());
alice_ = create_actor<SecretChatProxy>("SecretChatProxy alice", "alice", actor_shared(this, 1)); alice_ = create_actor<SecretChatProxy>("SecretChatProxy alice", "alice", actor_shared(this, 1));
bob_ = create_actor<SecretChatProxy>("SecretChatProxy bob", "bob", actor_shared(this, 2)); bob_ = create_actor<SecretChatProxy>("SecretChatProxy bob", "bob", actor_shared(this, 2));
send_closure(alice_->get_actor_unsafe()->actor_, &SecretChatActor::create_chat, UserId(2), 0, 123, send_closure(alice_->get_actor_unsafe()->actor_, &SecretChatActor::create_chat, UserId(static_cast<int64>(2)), 0,
PromiseCreator::lambda([actor_id = actor_id(this)](Result<SecretChatId> res) { 123, PromiseCreator::lambda([actor_id = actor_id(this)](Result<SecretChatId> res) {
send_closure(actor_id, &Master::got_secret_chat_id, std::move(res), 0); send_closure(actor_id, &Master::got_secret_chat_id, std::move(res), 0);
})); }));
} }
@ -869,7 +869,7 @@ class Master final : public Actor {
send_message(2, "appo"); send_message(2, "appo");
set_timeout_in(1); set_timeout_in(1);
} }
void send_ping(int id, int cnt) { void send_ping(int32 id, int cnt) {
if (cnt % 200 == 0) { if (cnt % 200 == 0) {
LOG(ERROR) << "Send ping " << tag("id", id) << tag("cnt", cnt); LOG(ERROR) << "Send ping " << tag("id", id) << tag("cnt", cnt);
} else { } else {
@ -878,7 +878,7 @@ class Master final : public Actor {
string text = PSTRING() << "PING: " << cnt; string text = PSTRING() << "PING: " << cnt;
send_message(id, std::move(text)); send_message(id, std::move(text));
} }
void send_message(int id, string text) { void send_message(int32 id, string text) {
auto random_id = Random::secure_int64(); auto random_id = Random::secure_int64();
LOG(INFO) << "Send message: " << tag("id", id) << tag("text", text) << tag("random_id", random_id); LOG(INFO) << "Send message: " << tag("id", id) << tag("text", text) << tag("random_id", random_id);
sent_messages_[random_id] = Message{id, text}; sent_messages_[random_id] = Message{id, text};

View File

@ -282,7 +282,7 @@ class SetUsername final : public TestClinetTask {
private: private:
td::string username_; td::string username_;
td::Promise<> promise_; td::Promise<> promise_;
td::int32 self_id_ = 0; td::int64 self_id_ = 0;
td::string tag_; td::string tag_;
void start_up() final { void start_up() final {