From 87a989d0cf39f52b6bd3ebf4c493f8d8fc3eefee Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Fri, 29 Jun 2018 13:50:14 +0200 Subject: [PATCH] TOS update, update to layer 81, improve GUI/cli interface --- README.md | 2 +- build_docs.php | 6 +- docs | 2 +- src/danog/MadelineProto/APIFactory.php | 4 + .../MadelineProto/DocsBuilder/Methods.php | 2 +- src/danog/MadelineProto/InternalDoc.php | 252 +++- src/danog/MadelineProto/Lang.php | 650 ++++++++- src/danog/MadelineProto/Logger.php | 10 +- src/danog/MadelineProto/MTProto.php | 15 +- .../MTProtoTools/AuthKeyHandler.php | 10 +- .../MTProtoTools/UpdateHandler.php | 5 - src/danog/MadelineProto/RSA.php | 1 - src/danog/MadelineProto/TL/TL.php | 7 +- src/danog/MadelineProto/TL/TLParams.php | 6 +- src/danog/MadelineProto/TL_telegram_v81.tl | 1175 +++++++++++++++++ src/danog/MadelineProto/Wrappers/ApiStart.php | 4 +- .../MadelineProto/Wrappers/ApiTemplates.php | 2 +- src/danog/MadelineProto/Wrappers/Login.php | 1 + src/danog/MadelineProto/Wrappers/TOS.php | 55 + tests/testing.php | 8 + translator.php | 1 + 21 files changed, 2131 insertions(+), 87 deletions(-) create mode 100644 src/danog/MadelineProto/TL_telegram_v81.tl create mode 100644 src/danog/MadelineProto/Wrappers/TOS.php diff --git a/README.md b/README.md index df1e32aa..69ae21c6 100644 --- a/README.md +++ b/README.md @@ -77,7 +77,7 @@ Tip: if you receive an error (or nothing), [send us](https://t.me/pwrtelegramgro * [Avoiding FLOOD_WAITs](https://docs.madelineproto.xyz/docs/FLOOD_WAIT.html) * [Logging](https://docs.madelineproto.xyz/docs/LOGGING.html) * [Using methods](https://docs.madelineproto.xyz/docs/USING_METHODS.html) - * [FULL API Documentation with descriptions](https://docs.madelineproto.xyz/API_docs/methods) + * [FULL API Documentation with descriptions](https://docs.madelineproto.xyz/API_docs/methods/) * [Peers](https://docs.madelineproto.xyz/docs/USING_METHODS.html#peers) * [Files](https://docs.madelineproto.xyz/docs/FILES.html) * [Secret chats](https://docs.madelineproto.xyz/docs/USING_METHODS.html#secret-chats) diff --git a/build_docs.php b/build_docs.php index 71e6c231..9bfef52f 100755 --- a/build_docs.php +++ b/build_docs.php @@ -43,9 +43,9 @@ $docs = [ 'readme' => false, ], [ - 'tl_schema' => ['telegram' => __DIR__.'/src/danog/MadelineProto/TL_telegram_v75.tl', 'calls' => __DIR__.'/src/danog/MadelineProto/TL_calls.tl', 'secret' => __DIR__.'/src/danog/MadelineProto/TL_secret.tl', 'td' => __DIR__.'/src/danog/MadelineProto/TL_td.tl'], - 'title' => 'MadelineProto API documentation (layer 75)', - 'description' => 'MadelineProto API documentation (layer 75)', + 'tl_schema' => ['telegram' => __DIR__.'/src/danog/MadelineProto/TL_telegram_v81.tl', 'calls' => __DIR__.'/src/danog/MadelineProto/TL_calls.tl', 'secret' => __DIR__.'/src/danog/MadelineProto/TL_secret.tl', 'td' => __DIR__.'/src/danog/MadelineProto/TL_td.tl'], + 'title' => 'MadelineProto API documentation (layer 81)', + 'description' => 'MadelineProto API documentation (layer 81)', 'output_dir' => __DIR__.'/docs/docs/API_docs', 'readme' => false, ], diff --git a/docs b/docs index 329a5e2f..9a27a19f 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit 329a5e2f7bb99186c4b8f3c8693269774deed9c5 +Subproject commit 9a27a19fe5b9984e9f1d637aa516502fdfd1699e diff --git a/src/danog/MadelineProto/APIFactory.php b/src/danog/MadelineProto/APIFactory.php index 35c438d7..674c1471 100644 --- a/src/danog/MadelineProto/APIFactory.php +++ b/src/danog/MadelineProto/APIFactory.php @@ -139,6 +139,10 @@ class APIFactory Logger::log("Didn't serialize in a while, doing that now..."); $this->serialize($this->session); } + if ($name !== 'accept_tos' && $name !== 'decline_tos') { + $this->API->check_tos(); + } + if ($this->lua === false) { return method_exists($this->API, $this->namespace.$name) ? $this->API->{$this->namespace.$name}(...$arguments) : $this->API->method_call($this->namespace.$name, isset($arguments[0]) && is_array($arguments[0]) ? $arguments[0] : [], $aargs); } diff --git a/src/danog/MadelineProto/DocsBuilder/Methods.php b/src/danog/MadelineProto/DocsBuilder/Methods.php index 026f508b..ed787327 100644 --- a/src/danog/MadelineProto/DocsBuilder/Methods.php +++ b/src/danog/MadelineProto/DocsBuilder/Methods.php @@ -70,7 +70,7 @@ trait Methods $this->docs_methods[$method] = '$MadelineProto->'.$md_method.'(\\['.$params.'\\]) === [$'.str_replace('_', '\\_', $type).'](../types/'.$php_type.'.md) '; - if (!isset(\danog\MadelineProto\MTProto::DISALLOWED_METHODS[$data['method']])) { + if (!isset(\danog\MadelineProto\MTProto::DISALLOWED_METHODS[$data['method']]) && isset($this->td_descriptions['methods'][$data['method']])) { $this->human_docs_methods[$this->td_descriptions['methods'][$data['method']]['description'].': '.$data['method']] = '* '.$this->td_descriptions['methods'][$data['method']]['description'].': '.$data['method'].' '; diff --git a/src/danog/MadelineProto/InternalDoc.php b/src/danog/MadelineProto/InternalDoc.php index 0f7bc892..ccbf396e 100644 --- a/src/danog/MadelineProto/InternalDoc.php +++ b/src/danog/MadelineProto/InternalDoc.php @@ -9,15 +9,6 @@ namespace danog\MadelineProto; interface auth { - /** - * @param array params [ - * string phone_number, - * ] - * - * @return auth_CheckedPhone - */ - public function checkPhone(array $params); - /** * @param array params [ * boolean allow_flashcall, @@ -65,16 +56,6 @@ interface auth */ public function resetAuthorizations(); - /** - * @param array params [ - * string phone_numbers, - * string message, - * ] - * - * @return bool - */ - public function sendInvites(array $params); - /** * @param array params [ * int dc_id, @@ -177,6 +158,7 @@ interface account * int token_type, * string token, * Bool app_sandbox, + * bytes secret, * int other_uids, * ] * @@ -432,6 +414,128 @@ interface account * @return bool */ public function resetWebAuthorizations(); + + /** + * @return Vector_of_SecureValue + */ + public function getAllSecureValues(); + + /** + * @param array params [ + * SecureValueType types, + * ] + * + * @return Vector_of_SecureValue + */ + public function getSecureValue(array $params); + + /** + * @param array params [ + * InputSecureValue value, + * long secure_secret_id, + * ] + * + * @return SecureValue + */ + public function saveSecureValue(array $params); + + /** + * @param array params [ + * SecureValueType types, + * ] + * + * @return bool + */ + public function deleteSecureValue(array $params); + + /** + * @param array params [ + * int bot_id, + * string scope, + * string public_key, + * ] + * + * @return account_AuthorizationForm + */ + public function getAuthorizationForm(array $params); + + /** + * @param array params [ + * int bot_id, + * string scope, + * string public_key, + * SecureValueHash value_hashes, + * SecureCredentialsEncrypted credentials, + * ] + * + * @return bool + */ + public function acceptAuthorization(array $params); + + /** + * @param array params [ + * boolean allow_flashcall, + * string phone_number, + * Bool current_number, + * ] + * + * @return auth_SentCode + */ + public function sendVerifyPhoneCode(array $params); + + /** + * @param array params [ + * string phone_number, + * string phone_code_hash, + * string phone_code, + * ] + * + * @return bool + */ + public function verifyPhone(array $params); + + /** + * @param array params [ + * string email, + * ] + * + * @return account_SentEmailCode + */ + public function sendVerifyEmailCode(array $params); + + /** + * @param array params [ + * string email, + * string code, + * ] + * + * @return bool + */ + public function verifyEmail(array $params); + + /** + * @param array params [ + * boolean contacts, + * boolean message_users, + * boolean message_chats, + * boolean message_megagroups, + * boolean message_channels, + * boolean files, + * int file_max_size, + * ] + * + * @return account_Takeout + */ + public function initTakeoutSession(array $params); + + /** + * @param array params [ + * boolean success, + * ] + * + * @return bool + */ + public function finishTakeoutSession(array $params); } interface users @@ -453,6 +557,16 @@ interface users * @return UserFull */ public function getFullUser(array $params); + + /** + * @param array params [ + * InputUser id, + * SecureValueError errors, + * ] + * + * @return bool + */ + public function setSecureValueErrors(array $params); } interface contacts @@ -590,6 +704,11 @@ interface contacts * @return bool */ public function resetSaved(); + + /** + * @return Vector_of_SavedContact + */ + public function getSaved(); } interface messages @@ -645,6 +764,7 @@ interface messages * int limit, * int max_id, * int min_id, + * int hash, * ] * * @return messages_Messages @@ -777,6 +897,17 @@ interface messages */ public function getPeerSettings(array $params); + /** + * @param array params [ + * InputPeer peer, + * int id, + * ReportReason reason, + * ] + * + * @return bool + */ + public function report(array $params); + /** * @param array params [ * int id, @@ -967,7 +1098,7 @@ interface messages /** * @param array params [ * string emoticon, - * string hash, + * int hash, * ] * * @return messages_Stickers @@ -1223,6 +1354,7 @@ interface messages * InputPeer peer, * int id, * string message, + * InputMedia media, * ReplyMarkup reply_markup, * MessageEntity entities, * InputGeoPoint geo_point, @@ -1238,6 +1370,7 @@ interface messages * boolean stop_geo_live, * InputBotInlineMessageID id, * string message, + * InputMedia media, * ReplyMarkup reply_markup, * MessageEntity entities, * InputGeoPoint geo_point, @@ -1274,7 +1407,7 @@ interface messages /** * @param array params [ - * InputPeer peers, + * InputDialogPeer peers, * ] * * @return messages_PeerDialogs @@ -1457,7 +1590,7 @@ interface messages /** * @param array params [ * boolean pinned, - * InputPeer peer, + * InputDialogPeer peer, * ] * * @return bool @@ -1467,7 +1600,7 @@ interface messages /** * @param array params [ * boolean force, - * InputPeer order, + * InputDialogPeer order, * ] * * @return bool @@ -1567,6 +1700,7 @@ interface messages * @param array params [ * InputPeer peer, * int limit, + * int hash, * ] * * @return messages_Messages @@ -1596,6 +1730,22 @@ interface messages * @return EncryptedFile */ public function uploadEncryptedFile(array $params); + + /** + * @param array params [ + * boolean exclude_featured, + * string q, + * int hash, + * ] + * + * @return messages_FoundStickerSets + */ + public function searchStickerSets(array $params); + + /** + * @return Vector_of_MessageRange + */ + public function getSplitRanges(); } interface updates @@ -1737,7 +1887,7 @@ interface upload * bytes request_token, * ] * - * @return Vector_of_CdnFileHash + * @return Vector_of_FileHash */ public function reuploadCdnFile(array $params); @@ -1747,9 +1897,19 @@ interface upload * int offset, * ] * - * @return Vector_of_CdnFileHash + * @return Vector_of_FileHash */ public function getCdnFileHashes(array $params); + + /** + * @param array params [ + * InputFileLocation location, + * int offset, + * ] + * + * @return Vector_of_FileHash + */ + public function getFileHashes(array $params); } interface help @@ -1797,11 +1957,6 @@ interface help */ public function getAppChangelog(array $params); - /** - * @return help_TermsOfService - */ - public function getTermsOfService(); - /** * @param array params [ * int pending_updates_count, @@ -1825,6 +1980,34 @@ interface help * @return help_RecentMeUrls */ public function getRecentMeUrls(array $params); + + /** + * @return help_ProxyData + */ + public function getProxyData(); + + /** + * @return help_TermsOfServiceUpdate + */ + public function getTermsOfServiceUpdate(); + + /** + * @param array params [ + * DataJSON id, + * ] + * + * @return bool + */ + public function acceptTermsOfService(array $params); + + /** + * @param array params [ + * string path, + * ] + * + * @return help_DeepLinkInfo + */ + public function getDeepLinkInfo(array $params); } interface channels @@ -2152,6 +2335,15 @@ interface channels * @return Updates */ public function togglePreHistoryHidden(array $params); + + /** + * @param array params [ + * int offset, + * ] + * + * @return messages_Chats + */ + public function getLeftChannels(array $params); } interface bots diff --git a/src/danog/MadelineProto/Lang.php b/src/danog/MadelineProto/Lang.php index 319d9f28..db5846e5 100644 --- a/src/danog/MadelineProto/Lang.php +++ b/src/danog/MadelineProto/Lang.php @@ -1275,15 +1275,15 @@ class Lang 'object_resPQ' => 'Contains pq to factorize', 'object_resPQ_param_nonce_type_int128' => 'Nonce', 'object_resPQ_param_server_nonce_type_int128' => 'Server nonce', - 'object_resPQ_param_pq_type_bytes' => '', - 'object_resPQ_param_server_public_key_fingerprints_type_Vector t' => '', - 'object_p_q_inner_data' => '', - 'object_p_q_inner_data_param_pq_type_bytes' => '', - 'object_p_q_inner_data_param_p_type_bytes' => '', - 'object_p_q_inner_data_param_q_type_bytes' => '', - 'object_p_q_inner_data_param_nonce_type_int128' => '', - 'object_p_q_inner_data_param_server_nonce_type_int128' => '', - 'object_p_q_inner_data_param_new_nonce_type_int256' => '', + 'object_resPQ_param_pq_type_bytes' => 'PQ ', + 'object_resPQ_param_server_public_key_fingerprints_type_Vector t' => 'RSA key fingerprints', + 'object_p_q_inner_data' => 'PQ inner data', + 'object_p_q_inner_data_param_pq_type_bytes' => 'PQ', + 'object_p_q_inner_data_param_p_type_bytes' => 'P', + 'object_p_q_inner_data_param_q_type_bytes' => 'Q', + 'object_p_q_inner_data_param_nonce_type_int128' => 'Nonce', + 'object_p_q_inner_data_param_server_nonce_type_int128' => 'Nonce', + 'object_p_q_inner_data_param_new_nonce_type_int256' => 'Nonce', 'object_p_q_inner_data_temp' => '', 'object_p_q_inner_data_temp_param_pq_type_bytes' => '', 'object_p_q_inner_data_temp_param_p_type_bytes' => '', @@ -4108,6 +4108,306 @@ class Lang 'object_help.configSimple_param_dc_id_type_int' => '', 'object_help.configSimple_param_ip_port_list_type_Vector t' => '', 'object_inputMessagesFilterMyMentionsUnread' => '', + 'method_initConnection_param_proxy_type_InputClientProxy' => 'The current proxy', + 'method_account.registerDevice_param_secret_type_bytes' => 'Secret', + 'method_account.getAllSecureValues' => 'Get all secure telegram passport values', + 'method_account.getSecureValue' => 'Get secure value for telegram passport', + 'method_account.getSecureValue_param_types_type_Vector t' => 'Get telegram passport secure parameters', + 'method_account.saveSecureValue' => 'Save telegram passport secure value', + 'method_account.saveSecureValue_param_value_type_InputSecureValue' => 'Encrypted value', + 'method_account.saveSecureValue_param_secure_secret_id_type_long' => 'Secret', + 'method_account.deleteSecureValue' => 'Delete secure telegram passport value', + 'method_account.deleteSecureValue_param_types_type_Vector t' => 'The values to delete', + 'method_account.getAuthorizationForm' => 'Bots only: get telegram passport authorization form', + 'method_account.getAuthorizationForm_param_bot_id_type_int' => 'Bot ID', + 'method_account.getAuthorizationForm_param_scope_type_string' => 'Scope', + 'method_account.getAuthorizationForm_param_public_key_type_string' => 'Bot\'s public key', + 'method_account.acceptAuthorization' => 'Accept telegram password authorization', + 'method_account.acceptAuthorization_param_bot_id_type_int' => 'Bot ID', + 'method_account.acceptAuthorization_param_scope_type_string' => 'Scope', + 'method_account.acceptAuthorization_param_public_key_type_string' => 'The bot\'s RSA public key', + 'method_account.acceptAuthorization_param_value_hashes_type_Vector t' => 'Hashes of the encrypted credentials', + 'method_account.acceptAuthorization_param_credentials_type_SecureCredentialsEncrypted' => 'Encrypted secure credentials', + 'method_account.sendVerifyPhoneCode' => 'Send phone verification code', + 'method_account.sendVerifyPhoneCode_param_allow_flashcall_type_true' => 'Allow phone calls?', + 'method_account.sendVerifyPhoneCode_param_phone_number_type_string' => 'The phone number', + 'method_account.sendVerifyPhoneCode_param_current_number_type_Bool' => 'Is this the current number?', + 'method_account.verifyPhone' => 'Verify phone number', + 'method_account.verifyPhone_param_phone_number_type_string' => 'The phone number', + 'method_account.verifyPhone_param_phone_code_hash_type_string' => 'The phone code hash returned by account.sendVerifyPhoneCode', + 'method_account.verifyPhone_param_phone_code_type_string' => 'The phone code type returned by account.sendVerifyPhoneCode', + 'method_account.sendVerifyEmailCode' => 'Send email verification code', + 'method_account.sendVerifyEmailCode_param_email_type_string' => 'Email', + 'method_account.verifyEmail' => 'Verify email address', + 'method_account.verifyEmail_param_email_type_string' => 'The email address', + 'method_account.verifyEmail_param_code_type_string' => 'The received code', + 'method_users.setSecureValueErrors' => 'Set secure value error for telegram passport', + 'method_users.setSecureValueErrors_param_id_type_InputUser' => 'The user ID', + 'method_users.setSecureValueErrors_param_errors_type_Vector t' => 'The errors', + 'method_messages.search_param_hash_type_int' => '$MadelineProto->gen_vector_hash(ids of previously fetched messages);', + 'method_messages.report' => 'Report a message', + 'method_messages.report_param_peer_type_InputPeer' => 'The user that sent the messages', + 'method_messages.report_param_id_type_Vector t' => 'The messages to report', + 'method_messages.report_param_reason_type_ReportReason' => 'The reason why you\'re sending this report', + 'method_messages.getStickers_param_hash_type_int' => '$MadelineProto->gen_vector_hash(ids of previously fetched stickers, or []);', + 'method_messages.editMessage_param_media_type_InputMedia' => 'The media to substitute', + 'method_messages.editInlineBotMessage_param_media_type_InputMedia' => 'The media to substitute', + 'method_messages.toggleDialogPin_param_peer_type_InputDialogPeer' => 'The dialog to pin', + 'method_messages.getRecentLocations_param_hash_type_int' => '$MadelineProto->gen_vector_hash(ids of previously fetched locations, or []);', + 'method_messages.searchStickerSets' => 'Find a sticker set', + 'method_messages.searchStickerSets_param_exclude_featured_type_true' => 'Exclude featured sticker sets from the search?', + 'method_messages.searchStickerSets_param_q_type_string' => 'The search query', + 'method_messages.searchStickerSets_param_hash_type_int' => '$MadelineProto->gen_vector_hash(ids of previously searched stickers, or []);', + 'method_upload.getFileHashes' => 'Get file hashes', + 'method_upload.getFileHashes_param_location_type_InputFileLocation' => 'The file', + 'method_upload.getFileHashes_param_offset_type_int' => 'Offset', + 'method_help.getProxyData' => 'Get information about the current proxy', + 'method_help.getTermsOfServiceUpdate' => 'Get updated TOS', + 'method_help.acceptTermsOfService' => 'Accept telegram\'s TOS', + 'method_help.acceptTermsOfService_param_id_type_DataJSON' => 'TOS', + 'method_help.getDeepLinkInfo' => 'Get deep link info', + 'method_help.getDeepLinkInfo_param_path_type_string' => 'Deep link', + 'object_inputSecureFileLocation' => '', + 'object_inputSecureFileLocation_param_id_type_long' => '', + 'object_inputSecureFileLocation_param_access_hash_type_long' => '', + 'object_messageActionBotAllowed' => '', + 'object_messageActionBotAllowed_param_domain_type_string' => '', + 'object_messageActionSecureValuesSentMe' => '', + 'object_messageActionSecureValuesSentMe_param_values_type_Vector t' => '', + 'object_messageActionSecureValuesSentMe_param_credentials_type_SecureCredentialsEncrypted' => '', + 'object_messageActionSecureValuesSent' => '', + 'object_messageActionSecureValuesSent_param_types_type_Vector t' => '', + 'object_auth.sentCode_param_terms_of_service_type_help.TermsOfService' => '', + 'object_inputPeerNotifySettings_param_silent_type_Bool' => '', + 'object_peerNotifySettings_param_silent_type_Bool' => '', + 'object_updateDialogPinned_param_peer_type_DialogPeer' => '', + 'object_upload.fileCdnRedirect_param_file_hashes_type_Vector t' => '', + 'object_dcOption_param_secret_type_bytes' => '', + 'object_config_param_preload_featured_stickers_type_true' => '', + 'object_config_param_ignore_phone_entities_type_true' => '', + 'object_config_param_revoke_pm_inbox_type_true' => '', + 'object_config_param_blocked_mode_type_true' => '', + 'object_config_param_revoke_time_limit_type_int' => '', + 'object_config_param_revoke_pm_time_limit_type_int' => '', + 'object_config_param_autoupdate_url_prefix_type_string' => '', + 'object_messages.stickers_param_hash_type_int' => '', + 'object_account.noPassword_param_new_secure_salt_type_bytes' => '', + 'object_account.noPassword_param_secure_random_type_bytes' => '', + 'object_account.password_param_has_recovery_type_true' => '', + 'object_account.password_param_has_secure_values_type_true' => '', + 'object_account.password_param_new_secure_salt_type_bytes' => '', + 'object_account.password_param_secure_random_type_bytes' => '', + 'object_account.passwordSettings_param_secure_salt_type_bytes' => '', + 'object_account.passwordSettings_param_secure_secret_type_bytes' => '', + 'object_account.passwordSettings_param_secure_secret_id_type_long' => '', + 'object_account.passwordInputSettings_param_new_secure_salt_type_bytes' => '', + 'object_account.passwordInputSettings_param_new_secure_secret_type_bytes' => '', + 'object_account.passwordInputSettings_param_new_secure_secret_id_type_long' => '', + 'object_stickerSet_param_installed_date_type_int' => '', + 'object_messageEntityPhone' => '', + 'object_messageEntityPhone_param_offset_type_int' => '', + 'object_messageEntityPhone_param_length_type_int' => '', + 'object_messageEntityCashtag' => '', + 'object_messageEntityCashtag_param_offset_type_int' => '', + 'object_messageEntityCashtag_param_length_type_int' => '', + 'object_help.termsOfService_param_popup_type_true' => '', + 'object_help.termsOfService_param_id_type_DataJSON' => '', + 'object_help.termsOfService_param_entities_type_Vector t' => '', + 'object_help.termsOfService_param_min_age_confirm_type_int' => '', + 'object_inputBotInlineMessageMediaVenue_param_venue_type_type_string' => '', + 'object_inputBotInlineResult_param_thumb_type_InputWebDocument' => '', + 'object_inputBotInlineResult_param_content_type_InputWebDocument' => '', + 'object_botInlineMessageMediaVenue_param_venue_type_type_string' => '', + 'object_botInlineResult_param_thumb_type_WebDocument' => '', + 'object_botInlineResult_param_content_type_WebDocument' => '', + 'object_messages.recentStickers_param_packs_type_Vector t' => '', + 'object_messages.recentStickers_param_dates_type_Vector t' => '', + 'object_webDocumentNoProxy' => '', + 'object_webDocumentNoProxy_param_url_type_string' => '', + 'object_webDocumentNoProxy_param_size_type_int' => '', + 'object_webDocumentNoProxy_param_mime_type_type_string' => '', + 'object_webDocumentNoProxy_param_attributes_type_Vector t' => '', + 'object_inputWebFileGeoPointLocation' => '', + 'object_inputWebFileGeoPointLocation_param_geo_point_type_InputGeoPoint' => '', + 'object_inputWebFileGeoPointLocation_param_w_type_int' => '', + 'object_inputWebFileGeoPointLocation_param_h_type_int' => '', + 'object_inputWebFileGeoPointLocation_param_zoom_type_int' => '', + 'object_inputWebFileGeoPointLocation_param_scale_type_int' => '', + 'object_inputWebFileGeoMessageLocation' => '', + 'object_inputWebFileGeoMessageLocation_param_peer_type_InputPeer' => '', + 'object_inputWebFileGeoMessageLocation_param_msg_id_type_int' => '', + 'object_inputWebFileGeoMessageLocation_param_w_type_int' => '', + 'object_inputWebFileGeoMessageLocation_param_h_type_int' => '', + 'object_inputWebFileGeoMessageLocation_param_zoom_type_int' => '', + 'object_inputWebFileGeoMessageLocation_param_scale_type_int' => '', + 'object_channelAdminRights_param_manage_call_type_true' => '', + 'object_inputDialogPeer' => '', + 'object_inputDialogPeer_param_peer_type_InputPeer' => '', + 'object_dialogPeer' => '', + 'object_dialogPeer_param_peer_type_Peer' => '', + 'object_messages.foundStickerSetsNotModified' => '', + 'object_messages.foundStickerSets' => '', + 'object_messages.foundStickerSets_param_hash_type_int' => '', + 'object_messages.foundStickerSets_param_sets_type_Vector t' => '', + 'object_fileHash' => '', + 'object_fileHash_param_offset_type_int' => '', + 'object_fileHash_param_limit_type_int' => '', + 'object_fileHash_param_hash_type_bytes' => '', + 'object_inputClientProxy' => '', + 'object_inputClientProxy_param_address_type_string' => '', + 'object_inputClientProxy_param_port_type_int' => '', + 'object_help.proxyDataEmpty' => '', + 'object_help.proxyDataEmpty_param_expires_type_int' => '', + 'object_help.proxyDataPromo' => '', + 'object_help.proxyDataPromo_param_expires_type_int' => '', + 'object_help.proxyDataPromo_param_peer_type_Peer' => '', + 'object_help.proxyDataPromo_param_chats_type_Vector t' => '', + 'object_help.proxyDataPromo_param_users_type_Vector t' => '', + 'object_help.termsOfServiceUpdateEmpty' => '', + 'object_help.termsOfServiceUpdateEmpty_param_expires_type_int' => '', + 'object_help.termsOfServiceUpdate' => '', + 'object_help.termsOfServiceUpdate_param_expires_type_int' => '', + 'object_help.termsOfServiceUpdate_param_terms_of_service_type_help.TermsOfService' => '', + 'object_inputSecureFileUploaded' => '', + 'object_inputSecureFileUploaded_param_id_type_long' => '', + 'object_inputSecureFileUploaded_param_parts_type_int' => '', + 'object_inputSecureFileUploaded_param_md5_checksum_type_string' => '', + 'object_inputSecureFileUploaded_param_file_hash_type_bytes' => '', + 'object_inputSecureFileUploaded_param_secret_type_bytes' => '', + 'object_inputSecureFile' => '', + 'object_inputSecureFile_param_id_type_long' => '', + 'object_inputSecureFile_param_access_hash_type_long' => '', + 'object_secureFileEmpty' => '', + 'object_secureFile' => '', + 'object_secureFile_param_id_type_long' => '', + 'object_secureFile_param_access_hash_type_long' => '', + 'object_secureFile_param_size_type_int' => '', + 'object_secureFile_param_dc_id_type_int' => '', + 'object_secureFile_param_date_type_int' => '', + 'object_secureFile_param_file_hash_type_bytes' => '', + 'object_secureFile_param_secret_type_bytes' => '', + 'object_secureData' => '', + 'object_secureData_param_data_type_bytes' => '', + 'object_secureData_param_data_hash_type_bytes' => '', + 'object_secureData_param_secret_type_bytes' => '', + 'object_securePlainPhone' => '', + 'object_securePlainPhone_param_phone_type_string' => '', + 'object_securePlainEmail' => '', + 'object_securePlainEmail_param_email_type_string' => '', + 'object_secureValueTypePersonalDetails' => '', + 'object_secureValueTypePassport' => '', + 'object_secureValueTypeDriverLicense' => '', + 'object_secureValueTypeIdentityCard' => '', + 'object_secureValueTypeInternalPassport' => '', + 'object_secureValueTypeAddress' => '', + 'object_secureValueTypeUtilityBill' => '', + 'object_secureValueTypeBankStatement' => '', + 'object_secureValueTypeRentalAgreement' => '', + 'object_secureValueTypePassportRegistration' => '', + 'object_secureValueTypeTemporaryRegistration' => '', + 'object_secureValueTypePhone' => '', + 'object_secureValueTypeEmail' => '', + 'object_secureValue' => '', + 'object_secureValue_param_type_type_SecureValueType' => '', + 'object_secureValue_param_data_type_SecureData' => '', + 'object_secureValue_param_front_side_type_SecureFile' => '', + 'object_secureValue_param_reverse_side_type_SecureFile' => '', + 'object_secureValue_param_selfie_type_SecureFile' => '', + 'object_secureValue_param_files_type_Vector t' => '', + 'object_secureValue_param_plain_data_type_SecurePlainData' => '', + 'object_secureValue_param_hash_type_bytes' => '', + 'object_inputSecureValue' => '', + 'object_inputSecureValue_param_type_type_SecureValueType' => '', + 'object_inputSecureValue_param_data_type_SecureData' => '', + 'object_inputSecureValue_param_front_side_type_InputSecureFile' => '', + 'object_inputSecureValue_param_reverse_side_type_InputSecureFile' => '', + 'object_inputSecureValue_param_selfie_type_InputSecureFile' => '', + 'object_inputSecureValue_param_files_type_Vector t' => '', + 'object_inputSecureValue_param_plain_data_type_SecurePlainData' => '', + 'object_secureValueHash' => '', + 'object_secureValueHash_param_type_type_SecureValueType' => '', + 'object_secureValueHash_param_hash_type_bytes' => '', + 'object_secureValueErrorData' => '', + 'object_secureValueErrorData_param_type_type_SecureValueType' => '', + 'object_secureValueErrorData_param_data_hash_type_bytes' => '', + 'object_secureValueErrorData_param_field_type_string' => '', + 'object_secureValueErrorData_param_text_type_string' => '', + 'object_secureValueErrorFrontSide' => '', + 'object_secureValueErrorFrontSide_param_type_type_SecureValueType' => '', + 'object_secureValueErrorFrontSide_param_file_hash_type_bytes' => '', + 'object_secureValueErrorFrontSide_param_text_type_string' => '', + 'object_secureValueErrorReverseSide' => '', + 'object_secureValueErrorReverseSide_param_type_type_SecureValueType' => '', + 'object_secureValueErrorReverseSide_param_file_hash_type_bytes' => '', + 'object_secureValueErrorReverseSide_param_text_type_string' => '', + 'object_secureValueErrorSelfie' => '', + 'object_secureValueErrorSelfie_param_type_type_SecureValueType' => '', + 'object_secureValueErrorSelfie_param_file_hash_type_bytes' => '', + 'object_secureValueErrorSelfie_param_text_type_string' => '', + 'object_secureValueErrorFile' => '', + 'object_secureValueErrorFile_param_type_type_SecureValueType' => '', + 'object_secureValueErrorFile_param_file_hash_type_bytes' => '', + 'object_secureValueErrorFile_param_text_type_string' => '', + 'object_secureValueErrorFiles' => '', + 'object_secureValueErrorFiles_param_type_type_SecureValueType' => '', + 'object_secureValueErrorFiles_param_file_hash_type_Vector t' => '', + 'object_secureValueErrorFiles_param_text_type_string' => '', + 'object_secureCredentialsEncrypted' => '', + 'object_secureCredentialsEncrypted_param_data_type_bytes' => '', + 'object_secureCredentialsEncrypted_param_hash_type_bytes' => '', + 'object_secureCredentialsEncrypted_param_secret_type_bytes' => '', + 'object_account.authorizationForm' => '', + 'object_account.authorizationForm_param_selfie_required_type_true' => '', + 'object_account.authorizationForm_param_required_types_type_Vector t' => '', + 'object_account.authorizationForm_param_values_type_Vector t' => '', + 'object_account.authorizationForm_param_errors_type_Vector t' => '', + 'object_account.authorizationForm_param_users_type_Vector t' => '', + 'object_account.authorizationForm_param_privacy_policy_url_type_string' => '', + 'object_account.sentEmailCode' => '', + 'object_account.sentEmailCode_param_email_pattern_type_string' => '', + 'object_account.sentEmailCode_param_length_type_int' => '', + 'object_help.deepLinkInfoEmpty' => '', + 'object_help.deepLinkInfo' => '', + 'object_help.deepLinkInfo_param_update_app_type_true' => '', + 'object_help.deepLinkInfo_param_message_type_string' => '', + 'object_help.deepLinkInfo_param_entities_type_Vector t' => '', + 'method_invokeWithMessagesRange' => 'Invoke with messages range', + 'method_invokeWithMessagesRange_param_range_type_MessageRange' => 'The range', + 'method_invokeWithMessagesRange_param_query_type_!X' => 'The query', + 'method_invokeWithTakeout' => 'Invoke method from takeout session', + 'method_invokeWithTakeout_param_takeout_id_type_long' => 'The takeout session ID', + 'method_invokeWithTakeout_param_query_type_!X' => 'The query', + 'method_account.initTakeoutSession' => 'Start account exporting session', + 'method_account.initTakeoutSession_param_contacts_type_true' => 'Export contacts?', + 'method_account.initTakeoutSession_param_message_users_type_true' => 'Export users?', + 'method_account.initTakeoutSession_param_message_chats_type_true' => 'Export chats?', + 'method_account.initTakeoutSession_param_message_megagroups_type_true' => 'Export supergroups?', + 'method_account.initTakeoutSession_param_message_channels_type_true' => 'Export channel messages?', + 'method_account.initTakeoutSession_param_files_type_true' => 'Export files?', + 'method_account.initTakeoutSession_param_file_max_size_type_int' => 'Export only files smaller than this size', + 'method_account.finishTakeoutSession' => 'Finish account exporting session', + 'method_account.finishTakeoutSession_param_success_type_true' => 'Did the data export succeed?', + 'method_contacts.getSaved' => 'Get saved contacts', + 'method_messages.getSplitRanges' => 'Get message ranges to fetch', + 'method_channels.getLeftChannels' => 'Get all channels you left', + 'method_channels.getLeftChannels_param_offset_type_int' => 'Offset', + 'object_ipPortSecret' => '', + 'object_ipPortSecret_param_ipv4_type_int' => '', + 'object_ipPortSecret_param_port_type_int' => '', + 'object_ipPortSecret_param_secret_type_bytes' => '', + 'object_accessPointRule' => '', + 'object_accessPointRule_param_phone_prefix_rules_type_string' => '', + 'object_accessPointRule_param_dc_id_type_int' => '', + 'object_accessPointRule_param_ips_type_vector' => '', + 'object_help.configSimple_param_rules_type_vector' => '', + 'object_inputTakeoutFileLocation' => '', + 'object_savedPhoneContact' => '', + 'object_savedPhoneContact_param_phone_type_string' => '', + 'object_savedPhoneContact_param_first_name_type_string' => '', + 'object_savedPhoneContact_param_last_name_type_string' => '', + 'object_savedPhoneContact_param_date_type_int' => '', + 'object_account.takeout' => '', + 'object_account.takeout_param_id_type_long' => '', ), ); @@ -4490,7 +4790,7 @@ class Lang 'method_messages.search_param_filter_type_MessagesFilter' => 'Message filter', 'method_messages.search_param_min_date_type_int' => 'Minumum date of results to fetch', 'method_messages.search_param_max_date_type_int' => 'Maximum date of results to fetch', - 'method_messages.search_param_offset_id_type_int' => 'Offset ', + 'method_messages.search_param_offset_id_type_int' => 'Message ID offset', 'method_messages.search_param_add_offset_type_int' => 'Additional offset, can be 0', 'method_messages.search_param_limit_type_int' => 'Number of results to return', 'method_messages.search_param_max_id_type_int' => 'Maximum message id to return', @@ -4671,14 +4971,14 @@ class Lang 'method_messages.setInlineBotResults_param_cache_time_type_int' => 'Cache time', 'method_messages.setInlineBotResults_param_next_offset_type_string' => 'The next offset', 'method_messages.setInlineBotResults_param_switch_pm_type_InlineBotSwitchPM' => 'Switch to PM?', - 'method_messages.sendInlineBotResult' => 'Send a received bot result to the chat', + 'method_messages.sendInlineBotResult' => 'Send inline bot result obtained with messages.getInlineBotResults to the chat', 'method_messages.sendInlineBotResult_param_silent_type_true' => 'Disable notifications?', 'method_messages.sendInlineBotResult_param_background_type_true' => 'Disable background notifications?', 'method_messages.sendInlineBotResult_param_clear_draft_type_true' => 'Clear the message draft?', 'method_messages.sendInlineBotResult_param_peer_type_InputPeer' => 'Where to send the message', 'method_messages.sendInlineBotResult_param_reply_to_msg_id_type_int' => 'Reply to message by ID', 'method_messages.sendInlineBotResult_param_query_id_type_long' => 'The inline query ID', - 'method_messages.sendInlineBotResult_param_id_type_string' => 'The result ID', + 'method_messages.sendInlineBotResult_param_id_type_string' => 'The ID of one of the inline results', 'method_messages.getMessageEditData' => 'Check if about to edit a message or a media caption', 'method_messages.getMessageEditData_param_peer_type_InputPeer' => 'The chat', 'method_messages.getMessageEditData_param_id_type_int' => 'The message ID', @@ -4815,7 +5115,7 @@ class Lang 'method_messages.sendMultiMedia_param_reply_to_msg_id_type_int' => 'Reply to message by ID', 'method_messages.sendMultiMedia_param_multi_media_type_Vector t' => 'The album', 'method_messages.uploadEncryptedFile' => 'Upload a secret chat file without sending it to anyone', - 'method_messages.uploadEncryptedFile_param_peer_type_InputEncryptedChat' => 'Ignore this', + 'method_messages.uploadEncryptedFile_param_peer_type_InputEncryptedChat' => 'The chat where to upload the media', 'method_messages.uploadEncryptedFile_param_file_type_InputEncryptedFile' => 'The file', 'method_updates.getState' => 'You cannot use this method directly, see https://docs.madelineproto.xyz for more info on handling updates', 'method_updates.getDifference' => 'You cannot use this method directly, see https://docs.madelineproto.xyz for more info on handling updates', @@ -4892,9 +5192,9 @@ class Lang 'method_channels.deleteUserHistory' => 'Delete all messages of a user in a channel/supergroup', 'method_channels.deleteUserHistory_param_channel_type_InputChannel' => 'The channel/supergroup', 'method_channels.deleteUserHistory_param_user_id_type_InputUser' => 'The user', - 'method_channels.reportSpam' => 'Report a supergroup/channel for spam', + 'method_channels.reportSpam' => 'Report a message in a supergroup/channel for spam', 'method_channels.reportSpam_param_channel_type_InputChannel' => 'The channel', - 'method_channels.reportSpam_param_user_id_type_InputUser' => 'The user that added you to this channel', + 'method_channels.reportSpam_param_user_id_type_InputUser' => 'The user that sent the messages', 'method_channels.reportSpam_param_id_type_Vector t' => 'The IDs of messages to report', 'method_channels.getMessages' => 'Get channel/supergroup messages', 'method_channels.getMessages_param_channel_type_InputChannel' => 'The channel/supergroup', @@ -5229,15 +5529,15 @@ class Lang 'object_resPQ' => 'Contains pq to factorize', 'object_resPQ_param_nonce_type_int128' => 'Nonce', 'object_resPQ_param_server_nonce_type_int128' => 'Server nonce', - 'object_resPQ_param_pq_type_bytes' => '', - 'object_resPQ_param_server_public_key_fingerprints_type_Vector t' => '', - 'object_p_q_inner_data' => '', - 'object_p_q_inner_data_param_pq_type_bytes' => '', - 'object_p_q_inner_data_param_p_type_bytes' => '', - 'object_p_q_inner_data_param_q_type_bytes' => '', - 'object_p_q_inner_data_param_nonce_type_int128' => '', - 'object_p_q_inner_data_param_server_nonce_type_int128' => '', - 'object_p_q_inner_data_param_new_nonce_type_int256' => '', + 'object_resPQ_param_pq_type_bytes' => 'PQ ', + 'object_resPQ_param_server_public_key_fingerprints_type_Vector t' => 'RSA key fingerprints', + 'object_p_q_inner_data' => 'PQ inner data', + 'object_p_q_inner_data_param_pq_type_bytes' => 'PQ', + 'object_p_q_inner_data_param_p_type_bytes' => 'P', + 'object_p_q_inner_data_param_q_type_bytes' => 'Q', + 'object_p_q_inner_data_param_nonce_type_int128' => 'Nonce', + 'object_p_q_inner_data_param_server_nonce_type_int128' => 'Nonce', + 'object_p_q_inner_data_param_new_nonce_type_int256' => 'Nonce', 'object_p_q_inner_data_temp' => '', 'object_p_q_inner_data_temp_param_pq_type_bytes' => '', 'object_p_q_inner_data_temp_param_p_type_bytes' => '', @@ -8062,5 +8362,305 @@ class Lang 'object_help.configSimple_param_dc_id_type_int' => '', 'object_help.configSimple_param_ip_port_list_type_Vector t' => '', 'object_inputMessagesFilterMyMentionsUnread' => '', + 'method_initConnection_param_proxy_type_InputClientProxy' => 'The current proxy', + 'method_account.registerDevice_param_secret_type_bytes' => 'Secret', + 'method_account.getAllSecureValues' => 'Get all secure telegram passport values', + 'method_account.getSecureValue' => 'Get secure value for telegram passport', + 'method_account.getSecureValue_param_types_type_Vector t' => 'Get telegram passport secure parameters', + 'method_account.saveSecureValue' => 'Save telegram passport secure value', + 'method_account.saveSecureValue_param_value_type_InputSecureValue' => 'Encrypted value', + 'method_account.saveSecureValue_param_secure_secret_id_type_long' => 'Secret', + 'method_account.deleteSecureValue' => 'Delete secure telegram passport value', + 'method_account.deleteSecureValue_param_types_type_Vector t' => 'The values to delete', + 'method_account.getAuthorizationForm' => 'Bots only: get telegram passport authorization form', + 'method_account.getAuthorizationForm_param_bot_id_type_int' => 'Bot ID', + 'method_account.getAuthorizationForm_param_scope_type_string' => 'Scope', + 'method_account.getAuthorizationForm_param_public_key_type_string' => 'Bot\'s public key', + 'method_account.acceptAuthorization' => 'Accept telegram password authorization', + 'method_account.acceptAuthorization_param_bot_id_type_int' => 'Bot ID', + 'method_account.acceptAuthorization_param_scope_type_string' => 'Scope', + 'method_account.acceptAuthorization_param_public_key_type_string' => 'The bot\'s RSA public key', + 'method_account.acceptAuthorization_param_value_hashes_type_Vector t' => 'Hashes of the encrypted credentials', + 'method_account.acceptAuthorization_param_credentials_type_SecureCredentialsEncrypted' => 'Encrypted secure credentials', + 'method_account.sendVerifyPhoneCode' => 'Send phone verification code', + 'method_account.sendVerifyPhoneCode_param_allow_flashcall_type_true' => 'Allow phone calls?', + 'method_account.sendVerifyPhoneCode_param_phone_number_type_string' => 'The phone number', + 'method_account.sendVerifyPhoneCode_param_current_number_type_Bool' => 'Is this the current number?', + 'method_account.verifyPhone' => 'Verify phone number', + 'method_account.verifyPhone_param_phone_number_type_string' => 'The phone number', + 'method_account.verifyPhone_param_phone_code_hash_type_string' => 'The phone code hash returned by account.sendVerifyPhoneCode', + 'method_account.verifyPhone_param_phone_code_type_string' => 'The phone code type returned by account.sendVerifyPhoneCode', + 'method_account.sendVerifyEmailCode' => 'Send email verification code', + 'method_account.sendVerifyEmailCode_param_email_type_string' => 'Email', + 'method_account.verifyEmail' => 'Verify email address', + 'method_account.verifyEmail_param_email_type_string' => 'The email address', + 'method_account.verifyEmail_param_code_type_string' => 'The received code', + 'method_users.setSecureValueErrors' => 'Set secure value error for telegram passport', + 'method_users.setSecureValueErrors_param_id_type_InputUser' => 'The user ID', + 'method_users.setSecureValueErrors_param_errors_type_Vector t' => 'The errors', + 'method_messages.search_param_hash_type_int' => '$MadelineProto->gen_vector_hash(ids of previously fetched messages);', + 'method_messages.report' => 'Report a message', + 'method_messages.report_param_peer_type_InputPeer' => 'The user that sent the messages', + 'method_messages.report_param_id_type_Vector t' => 'The messages to report', + 'method_messages.report_param_reason_type_ReportReason' => 'The reason why you\'re sending this report', + 'method_messages.getStickers_param_hash_type_int' => '$MadelineProto->gen_vector_hash(ids of previously fetched stickers, or []);', + 'method_messages.editMessage_param_media_type_InputMedia' => 'The media to substitute', + 'method_messages.editInlineBotMessage_param_media_type_InputMedia' => 'The media to substitute', + 'method_messages.toggleDialogPin_param_peer_type_InputDialogPeer' => 'The dialog to pin', + 'method_messages.getRecentLocations_param_hash_type_int' => '$MadelineProto->gen_vector_hash(ids of previously fetched locations, or []);', + 'method_messages.searchStickerSets' => 'Find a sticker set', + 'method_messages.searchStickerSets_param_exclude_featured_type_true' => 'Exclude featured sticker sets from the search?', + 'method_messages.searchStickerSets_param_q_type_string' => 'The search query', + 'method_messages.searchStickerSets_param_hash_type_int' => '$MadelineProto->gen_vector_hash(ids of previously searched stickers, or []);', + 'method_upload.getFileHashes' => 'Get file hashes', + 'method_upload.getFileHashes_param_location_type_InputFileLocation' => 'The file', + 'method_upload.getFileHashes_param_offset_type_int' => 'Offset', + 'method_help.getProxyData' => 'Get information about the current proxy', + 'method_help.getTermsOfServiceUpdate' => 'Get updated TOS', + 'method_help.acceptTermsOfService' => 'Accept telegram\'s TOS', + 'method_help.acceptTermsOfService_param_id_type_DataJSON' => 'TOS', + 'method_help.getDeepLinkInfo' => 'Get deep link info', + 'method_help.getDeepLinkInfo_param_path_type_string' => 'Deep link', + 'object_inputSecureFileLocation' => '', + 'object_inputSecureFileLocation_param_id_type_long' => '', + 'object_inputSecureFileLocation_param_access_hash_type_long' => '', + 'object_messageActionBotAllowed' => '', + 'object_messageActionBotAllowed_param_domain_type_string' => '', + 'object_messageActionSecureValuesSentMe' => '', + 'object_messageActionSecureValuesSentMe_param_values_type_Vector t' => '', + 'object_messageActionSecureValuesSentMe_param_credentials_type_SecureCredentialsEncrypted' => '', + 'object_messageActionSecureValuesSent' => '', + 'object_messageActionSecureValuesSent_param_types_type_Vector t' => '', + 'object_auth.sentCode_param_terms_of_service_type_help.TermsOfService' => '', + 'object_inputPeerNotifySettings_param_silent_type_Bool' => '', + 'object_peerNotifySettings_param_silent_type_Bool' => '', + 'object_updateDialogPinned_param_peer_type_DialogPeer' => '', + 'object_upload.fileCdnRedirect_param_file_hashes_type_Vector t' => '', + 'object_dcOption_param_secret_type_bytes' => '', + 'object_config_param_preload_featured_stickers_type_true' => '', + 'object_config_param_ignore_phone_entities_type_true' => '', + 'object_config_param_revoke_pm_inbox_type_true' => '', + 'object_config_param_blocked_mode_type_true' => '', + 'object_config_param_revoke_time_limit_type_int' => '', + 'object_config_param_revoke_pm_time_limit_type_int' => '', + 'object_config_param_autoupdate_url_prefix_type_string' => '', + 'object_messages.stickers_param_hash_type_int' => '', + 'object_account.noPassword_param_new_secure_salt_type_bytes' => '', + 'object_account.noPassword_param_secure_random_type_bytes' => '', + 'object_account.password_param_has_recovery_type_true' => '', + 'object_account.password_param_has_secure_values_type_true' => '', + 'object_account.password_param_new_secure_salt_type_bytes' => '', + 'object_account.password_param_secure_random_type_bytes' => '', + 'object_account.passwordSettings_param_secure_salt_type_bytes' => '', + 'object_account.passwordSettings_param_secure_secret_type_bytes' => '', + 'object_account.passwordSettings_param_secure_secret_id_type_long' => '', + 'object_account.passwordInputSettings_param_new_secure_salt_type_bytes' => '', + 'object_account.passwordInputSettings_param_new_secure_secret_type_bytes' => '', + 'object_account.passwordInputSettings_param_new_secure_secret_id_type_long' => '', + 'object_stickerSet_param_installed_date_type_int' => '', + 'object_messageEntityPhone' => '', + 'object_messageEntityPhone_param_offset_type_int' => '', + 'object_messageEntityPhone_param_length_type_int' => '', + 'object_messageEntityCashtag' => '', + 'object_messageEntityCashtag_param_offset_type_int' => '', + 'object_messageEntityCashtag_param_length_type_int' => '', + 'object_help.termsOfService_param_popup_type_true' => '', + 'object_help.termsOfService_param_id_type_DataJSON' => '', + 'object_help.termsOfService_param_entities_type_Vector t' => '', + 'object_help.termsOfService_param_min_age_confirm_type_int' => '', + 'object_inputBotInlineMessageMediaVenue_param_venue_type_type_string' => '', + 'object_inputBotInlineResult_param_thumb_type_InputWebDocument' => '', + 'object_inputBotInlineResult_param_content_type_InputWebDocument' => '', + 'object_botInlineMessageMediaVenue_param_venue_type_type_string' => '', + 'object_botInlineResult_param_thumb_type_WebDocument' => '', + 'object_botInlineResult_param_content_type_WebDocument' => '', + 'object_messages.recentStickers_param_packs_type_Vector t' => '', + 'object_messages.recentStickers_param_dates_type_Vector t' => '', + 'object_webDocumentNoProxy' => '', + 'object_webDocumentNoProxy_param_url_type_string' => '', + 'object_webDocumentNoProxy_param_size_type_int' => '', + 'object_webDocumentNoProxy_param_mime_type_type_string' => '', + 'object_webDocumentNoProxy_param_attributes_type_Vector t' => '', + 'object_inputWebFileGeoPointLocation' => '', + 'object_inputWebFileGeoPointLocation_param_geo_point_type_InputGeoPoint' => '', + 'object_inputWebFileGeoPointLocation_param_w_type_int' => '', + 'object_inputWebFileGeoPointLocation_param_h_type_int' => '', + 'object_inputWebFileGeoPointLocation_param_zoom_type_int' => '', + 'object_inputWebFileGeoPointLocation_param_scale_type_int' => '', + 'object_inputWebFileGeoMessageLocation' => '', + 'object_inputWebFileGeoMessageLocation_param_peer_type_InputPeer' => '', + 'object_inputWebFileGeoMessageLocation_param_msg_id_type_int' => '', + 'object_inputWebFileGeoMessageLocation_param_w_type_int' => '', + 'object_inputWebFileGeoMessageLocation_param_h_type_int' => '', + 'object_inputWebFileGeoMessageLocation_param_zoom_type_int' => '', + 'object_inputWebFileGeoMessageLocation_param_scale_type_int' => '', + 'object_channelAdminRights_param_manage_call_type_true' => '', + 'object_inputDialogPeer' => '', + 'object_inputDialogPeer_param_peer_type_InputPeer' => '', + 'object_dialogPeer' => '', + 'object_dialogPeer_param_peer_type_Peer' => '', + 'object_messages.foundStickerSetsNotModified' => '', + 'object_messages.foundStickerSets' => '', + 'object_messages.foundStickerSets_param_hash_type_int' => '', + 'object_messages.foundStickerSets_param_sets_type_Vector t' => '', + 'object_fileHash' => '', + 'object_fileHash_param_offset_type_int' => '', + 'object_fileHash_param_limit_type_int' => '', + 'object_fileHash_param_hash_type_bytes' => '', + 'object_inputClientProxy' => '', + 'object_inputClientProxy_param_address_type_string' => '', + 'object_inputClientProxy_param_port_type_int' => '', + 'object_help.proxyDataEmpty' => '', + 'object_help.proxyDataEmpty_param_expires_type_int' => '', + 'object_help.proxyDataPromo' => '', + 'object_help.proxyDataPromo_param_expires_type_int' => '', + 'object_help.proxyDataPromo_param_peer_type_Peer' => '', + 'object_help.proxyDataPromo_param_chats_type_Vector t' => '', + 'object_help.proxyDataPromo_param_users_type_Vector t' => '', + 'object_help.termsOfServiceUpdateEmpty' => '', + 'object_help.termsOfServiceUpdateEmpty_param_expires_type_int' => '', + 'object_help.termsOfServiceUpdate' => '', + 'object_help.termsOfServiceUpdate_param_expires_type_int' => '', + 'object_help.termsOfServiceUpdate_param_terms_of_service_type_help.TermsOfService' => '', + 'object_inputSecureFileUploaded' => '', + 'object_inputSecureFileUploaded_param_id_type_long' => '', + 'object_inputSecureFileUploaded_param_parts_type_int' => '', + 'object_inputSecureFileUploaded_param_md5_checksum_type_string' => '', + 'object_inputSecureFileUploaded_param_file_hash_type_bytes' => '', + 'object_inputSecureFileUploaded_param_secret_type_bytes' => '', + 'object_inputSecureFile' => '', + 'object_inputSecureFile_param_id_type_long' => '', + 'object_inputSecureFile_param_access_hash_type_long' => '', + 'object_secureFileEmpty' => '', + 'object_secureFile' => '', + 'object_secureFile_param_id_type_long' => '', + 'object_secureFile_param_access_hash_type_long' => '', + 'object_secureFile_param_size_type_int' => '', + 'object_secureFile_param_dc_id_type_int' => '', + 'object_secureFile_param_date_type_int' => '', + 'object_secureFile_param_file_hash_type_bytes' => '', + 'object_secureFile_param_secret_type_bytes' => '', + 'object_secureData' => '', + 'object_secureData_param_data_type_bytes' => '', + 'object_secureData_param_data_hash_type_bytes' => '', + 'object_secureData_param_secret_type_bytes' => '', + 'object_securePlainPhone' => '', + 'object_securePlainPhone_param_phone_type_string' => '', + 'object_securePlainEmail' => '', + 'object_securePlainEmail_param_email_type_string' => '', + 'object_secureValueTypePersonalDetails' => '', + 'object_secureValueTypePassport' => '', + 'object_secureValueTypeDriverLicense' => '', + 'object_secureValueTypeIdentityCard' => '', + 'object_secureValueTypeInternalPassport' => '', + 'object_secureValueTypeAddress' => '', + 'object_secureValueTypeUtilityBill' => '', + 'object_secureValueTypeBankStatement' => '', + 'object_secureValueTypeRentalAgreement' => '', + 'object_secureValueTypePassportRegistration' => '', + 'object_secureValueTypeTemporaryRegistration' => '', + 'object_secureValueTypePhone' => '', + 'object_secureValueTypeEmail' => '', + 'object_secureValue' => '', + 'object_secureValue_param_type_type_SecureValueType' => '', + 'object_secureValue_param_data_type_SecureData' => '', + 'object_secureValue_param_front_side_type_SecureFile' => '', + 'object_secureValue_param_reverse_side_type_SecureFile' => '', + 'object_secureValue_param_selfie_type_SecureFile' => '', + 'object_secureValue_param_files_type_Vector t' => '', + 'object_secureValue_param_plain_data_type_SecurePlainData' => '', + 'object_secureValue_param_hash_type_bytes' => '', + 'object_inputSecureValue' => '', + 'object_inputSecureValue_param_type_type_SecureValueType' => '', + 'object_inputSecureValue_param_data_type_SecureData' => '', + 'object_inputSecureValue_param_front_side_type_InputSecureFile' => '', + 'object_inputSecureValue_param_reverse_side_type_InputSecureFile' => '', + 'object_inputSecureValue_param_selfie_type_InputSecureFile' => '', + 'object_inputSecureValue_param_files_type_Vector t' => '', + 'object_inputSecureValue_param_plain_data_type_SecurePlainData' => '', + 'object_secureValueHash' => '', + 'object_secureValueHash_param_type_type_SecureValueType' => '', + 'object_secureValueHash_param_hash_type_bytes' => '', + 'object_secureValueErrorData' => '', + 'object_secureValueErrorData_param_type_type_SecureValueType' => '', + 'object_secureValueErrorData_param_data_hash_type_bytes' => '', + 'object_secureValueErrorData_param_field_type_string' => '', + 'object_secureValueErrorData_param_text_type_string' => '', + 'object_secureValueErrorFrontSide' => '', + 'object_secureValueErrorFrontSide_param_type_type_SecureValueType' => '', + 'object_secureValueErrorFrontSide_param_file_hash_type_bytes' => '', + 'object_secureValueErrorFrontSide_param_text_type_string' => '', + 'object_secureValueErrorReverseSide' => '', + 'object_secureValueErrorReverseSide_param_type_type_SecureValueType' => '', + 'object_secureValueErrorReverseSide_param_file_hash_type_bytes' => '', + 'object_secureValueErrorReverseSide_param_text_type_string' => '', + 'object_secureValueErrorSelfie' => '', + 'object_secureValueErrorSelfie_param_type_type_SecureValueType' => '', + 'object_secureValueErrorSelfie_param_file_hash_type_bytes' => '', + 'object_secureValueErrorSelfie_param_text_type_string' => '', + 'object_secureValueErrorFile' => '', + 'object_secureValueErrorFile_param_type_type_SecureValueType' => '', + 'object_secureValueErrorFile_param_file_hash_type_bytes' => '', + 'object_secureValueErrorFile_param_text_type_string' => '', + 'object_secureValueErrorFiles' => '', + 'object_secureValueErrorFiles_param_type_type_SecureValueType' => '', + 'object_secureValueErrorFiles_param_file_hash_type_Vector t' => '', + 'object_secureValueErrorFiles_param_text_type_string' => '', + 'object_secureCredentialsEncrypted' => '', + 'object_secureCredentialsEncrypted_param_data_type_bytes' => '', + 'object_secureCredentialsEncrypted_param_hash_type_bytes' => '', + 'object_secureCredentialsEncrypted_param_secret_type_bytes' => '', + 'object_account.authorizationForm' => '', + 'object_account.authorizationForm_param_selfie_required_type_true' => '', + 'object_account.authorizationForm_param_required_types_type_Vector t' => '', + 'object_account.authorizationForm_param_values_type_Vector t' => '', + 'object_account.authorizationForm_param_errors_type_Vector t' => '', + 'object_account.authorizationForm_param_users_type_Vector t' => '', + 'object_account.authorizationForm_param_privacy_policy_url_type_string' => '', + 'object_account.sentEmailCode' => '', + 'object_account.sentEmailCode_param_email_pattern_type_string' => '', + 'object_account.sentEmailCode_param_length_type_int' => '', + 'object_help.deepLinkInfoEmpty' => '', + 'object_help.deepLinkInfo' => '', + 'object_help.deepLinkInfo_param_update_app_type_true' => '', + 'object_help.deepLinkInfo_param_message_type_string' => '', + 'object_help.deepLinkInfo_param_entities_type_Vector t' => '', + 'method_invokeWithMessagesRange' => 'Invoke with messages range', + 'method_invokeWithMessagesRange_param_range_type_MessageRange' => 'The range', + 'method_invokeWithMessagesRange_param_query_type_!X' => 'The query', + 'method_invokeWithTakeout' => 'Invoke method from takeout session', + 'method_invokeWithTakeout_param_takeout_id_type_long' => 'The takeout session ID', + 'method_invokeWithTakeout_param_query_type_!X' => 'The query', + 'method_account.initTakeoutSession' => 'Start account exporting session', + 'method_account.initTakeoutSession_param_contacts_type_true' => 'Export contacts?', + 'method_account.initTakeoutSession_param_message_users_type_true' => 'Export users?', + 'method_account.initTakeoutSession_param_message_chats_type_true' => 'Export chats?', + 'method_account.initTakeoutSession_param_message_megagroups_type_true' => 'Export supergroups?', + 'method_account.initTakeoutSession_param_message_channels_type_true' => 'Export channel messages?', + 'method_account.initTakeoutSession_param_files_type_true' => 'Export files?', + 'method_account.initTakeoutSession_param_file_max_size_type_int' => 'Export only files smaller than this size', + 'method_account.finishTakeoutSession' => 'Finish account exporting session', + 'method_account.finishTakeoutSession_param_success_type_true' => 'Did the data export succeed?', + 'method_contacts.getSaved' => 'Get saved contacts', + 'method_messages.getSplitRanges' => 'Get message ranges to fetch', + 'method_channels.getLeftChannels' => 'Get all channels you left', + 'method_channels.getLeftChannels_param_offset_type_int' => 'Offset', + 'object_ipPortSecret' => '', + 'object_ipPortSecret_param_ipv4_type_int' => '', + 'object_ipPortSecret_param_port_type_int' => '', + 'object_ipPortSecret_param_secret_type_bytes' => '', + 'object_accessPointRule' => '', + 'object_accessPointRule_param_phone_prefix_rules_type_string' => '', + 'object_accessPointRule_param_dc_id_type_int' => '', + 'object_accessPointRule_param_ips_type_vector' => '', + 'object_help.configSimple_param_rules_type_vector' => '', + 'object_inputTakeoutFileLocation' => '', + 'object_savedPhoneContact' => '', + 'object_savedPhoneContact_param_phone_type_string' => '', + 'object_savedPhoneContact_param_first_name_type_string' => '', + 'object_savedPhoneContact_param_last_name_type_string' => '', + 'object_savedPhoneContact_param_date_type_int' => '', + 'object_account.takeout' => '', + 'object_account.takeout_param_id_type_long' => '', ); -} +} \ No newline at end of file diff --git a/src/danog/MadelineProto/Logger.php b/src/danog/MadelineProto/Logger.php index e24383a8..a84dec61 100644 --- a/src/danog/MadelineProto/Logger.php +++ b/src/danog/MadelineProto/Logger.php @@ -49,12 +49,12 @@ class Logger * 4 - Call callable provided in logger_param. logger_param must accept two parameters: array $message, int $level * $message is an array containing the messages the log, $level, is the logging level */ - public static function constructor($mode, $optional = null, $prefix = '', $level = self::NOTICE) + public static function constructor($mode, $optional = null, $prefix = '', $level = self::NOTICE, $max_size = 100*1024*1024) { - self::$default = new self($mode, $optional, $prefix, $level); + self::$default = new self($mode, $optional, $prefix, $level, $max_size); } - public function __construct($mode, $optional = null, $prefix = '', $level = self::NOTICE) + public function __construct($mode, $optional, $prefix, $level, $max_size) { if ($mode === null) { throw new Exception(\danog\MadelineProto\Lang::$current_lang['no_mode_specified']); @@ -64,6 +64,10 @@ class Logger $this->prefix = $prefix === '' ? '' : ', '.$prefix; $this->level = $level; + if ($mode === 2 && $max_size !== -1 && file_exists($this->optional) && filesize($this->optional) > $max_size) { + unlink($this->optional); + } + $this->colors[self::ULTRA_VERBOSE] = implode(';', [self::foreground['light_gray'], self::set['dim']]); $this->colors[self::VERBOSE] = implode(';', [self::foreground['green'], self::set['bold']]); $this->colors[self::NOTICE] = implode(';', [self::foreground['yellow'], self::set['bold']]); diff --git a/src/danog/MadelineProto/MTProto.php b/src/danog/MadelineProto/MTProto.php index 17aed990..e70b5911 100644 --- a/src/danog/MadelineProto/MTProto.php +++ b/src/danog/MadelineProto/MTProto.php @@ -51,11 +51,12 @@ class MTProto use \danog\MadelineProto\Wrappers\Noop; use \danog\MadelineProto\Wrappers\Start; use \danog\MadelineProto\Wrappers\Templates; + use \danog\MadelineProto\Wrappers\TOS; /* const V = 71; */ - const V = 100; + const V = 102; const NOT_LOGGED_IN = 0; const WAITING_CODE = 1; const WAITING_SIGNUP = -1; @@ -74,6 +75,7 @@ class MTProto public $hook_url = false; public $settings = []; private $config = ['expires' => -1]; + private $tos = ['expires' => 0, 'accepted' => true]; private $initing_authorization = false; public $authorization = null; public $authorized = 0; @@ -152,7 +154,7 @@ class MTProto public function __sleep() { - return ['event_handler', 'event_handler_instance', 'loop_callback', 'web_template', 'encrypted_layer', 'settings', 'config', 'authorization', 'authorized', 'rsa_keys', 'last_recv', 'dh_config', 'chats', 'last_stored', 'qres', 'pending_updates', 'pending_pwrchat', 'postpone_pwrchat', 'updates_state', 'got_state', 'channels_state', 'updates', 'updates_key', 'full_chats', 'msg_ids', 'dialog_params', 'datacenter', 'v', 'constructors', 'td_constructors', 'methods', 'td_methods', 'td_descriptions', 'temp_requested_secret_chats', 'temp_rekeyed_secret_chats', 'secret_chats', 'hook_url', 'storage', 'authorized_dc']; + return ['event_handler', 'event_handler_instance', 'loop_callback', 'web_template', 'encrypted_layer', 'settings', 'config', 'authorization', 'authorized', 'rsa_keys', 'last_recv', 'dh_config', 'chats', 'last_stored', 'qres', 'pending_updates', 'pending_pwrchat', 'postpone_pwrchat', 'updates_state', 'got_state', 'channels_state', 'updates', 'updates_key', 'full_chats', 'msg_ids', 'dialog_params', 'datacenter', 'v', 'constructors', 'td_constructors', 'methods', 'td_methods', 'td_descriptions', 'temp_requested_secret_chats', 'temp_rekeyed_secret_chats', 'secret_chats', 'hook_url', 'storage', 'authorized_dc', 'tos']; } public function __wakeup() @@ -455,12 +457,12 @@ class MTProto 'lang_code' => $lang_code, ], 'tl_schema' => [ // TL scheme files - 'layer' => 75, + 'layer' => 81, // layer version 'src' => [ 'mtproto' => __DIR__.'/TL_mtproto_v1.json', // mtproto TL scheme - 'telegram' => __DIR__.'/TL_telegram_v75.tl', + 'telegram' => __DIR__.'/TL_telegram_v81.tl', // telegram TL scheme 'secret' => __DIR__.'/TL_secret.tl', // secret chats TL scheme @@ -485,6 +487,7 @@ class MTProto 'logger' => php_sapi_name() === 'cli' ? 3 : 2, // overwrite previous setting and echo logs 'logger_level' => Logger::VERBOSE, + 'max_size' => 100*1024*1024, // Logging level, available logging levels are: ULTRA_VERBOSE, VERBOSE, NOTICE, WARNING, ERROR, FATAL_ERROR. Can be provided as last parameter to the logging function. 'rollbar_token' => '', ], 'max_tries' => [ @@ -573,9 +576,9 @@ class MTProto Exception::$rollbar = false; RPCErrorException::$rollbar = false; } - $this->logger = new \danog\MadelineProto\Logger($this->settings['logger']['logger'], isset($this->settings['logger']['logger_param']) ? $this->settings['logger']['logger_param'] : '', isset($this->authorization['user']) ? isset($this->authorization['user']['username']) ? $this->authorization['user']['username'] : $this->authorization['user']['id'] : '', isset($this->settings['logger']['logger_level']) ? $this->settings['logger']['logger_level'] : Logger::VERBOSE); + $this->logger = new \danog\MadelineProto\Logger($this->settings['logger']['logger'], isset($this->settings['logger']['logger_param']) ? $this->settings['logger']['logger_param'] : '', isset($this->authorization['user']) ? isset($this->authorization['user']['username']) ? $this->authorization['user']['username'] : $this->authorization['user']['id'] : '', isset($this->settings['logger']['logger_level']) ? $this->settings['logger']['logger_level'] : Logger::VERBOSE, isset($this->settings['logger']['max_size']) ? $this->settings['logger']['max_size'] : 100*1024*1024); if (!\danog\MadelineProto\Logger::$default) { - \danog\MadelineProto\Logger::constructor($this->settings['logger']['logger'], $this->settings['logger']['logger_param'], isset($this->authorization['user']) ? isset($this->authorization['user']['username']) ? $this->authorization['user']['username'] : $this->authorization['user']['id'] : '', isset($this->settings['logger']['logger_level']) ? $this->settings['logger']['logger_level'] : Logger::VERBOSE); + \danog\MadelineProto\Logger::constructor($this->settings['logger']['logger'], $this->settings['logger']['logger_param'], isset($this->authorization['user']) ? isset($this->authorization['user']['username']) ? $this->authorization['user']['username'] : $this->authorization['user']['id'] : '', isset($this->settings['logger']['logger_level']) ? $this->settings['logger']['logger_level'] : Logger::VERBOSE, isset($this->settings['logger']['max_size']) ? $this->settings['logger']['max_size'] : 100*1024*1024); } } diff --git a/src/danog/MadelineProto/MTProtoTools/AuthKeyHandler.php b/src/danog/MadelineProto/MTProtoTools/AuthKeyHandler.php index 348126a7..0f6e0d80 100644 --- a/src/danog/MadelineProto/MTProtoTools/AuthKeyHandler.php +++ b/src/danog/MadelineProto/MTProtoTools/AuthKeyHandler.php @@ -38,10 +38,10 @@ trait AuthKeyHandler * ] * * @return ResPQ [ - * int128 $nonce : The value of nonce is selected randomly by the server - * int128 $server_nonce : The value of server_nonce is selected randomly by the server - * string $pq : This is a representation of a natural number (in binary big endian format). This number is the product of two different odd prime numbers - * Vector long $server_public_key_fingerprints : This is a list of public RSA key fingerprints + * int128 $nonce : The value of nonce is selected randomly by the server + * int128 $server_nonce : The value of server_nonce is selected randomly by the server + * string $pq : This is a representation of a natural number (in binary big endian format). This number is the product of two different odd prime numbers + * Vector long $server_public_key_fingerprints : This is a list of public RSA key fingerprints * ] */ $nonce = $this->random(16); @@ -496,7 +496,6 @@ trait AuthKeyHandler $encrypted_data = $this->random(16).$message_id.pack('VV', $seq_no, strlen($message_data)).$message_data; $message_key = substr(sha1($encrypted_data, true), -16); $padding = $this->random($this->posmod(-strlen($encrypted_data), 16)); - //$message_key = substr(hash('sha256', substr($this->datacenter->sockets[$datacenter]->auth_key['auth_key'], 88, 32).$encrypted_data.$padding, true), 8, 16); list($aes_key, $aes_iv) = $this->old_aes_calculate($message_key, $this->datacenter->sockets[$datacenter]->auth_key['auth_key']); $encrypted_message = $this->datacenter->sockets[$datacenter]->auth_key['id'].$message_key.$this->ige_encrypt($encrypted_data.$padding, $aes_key, $aes_iv); $res = $this->method_call('auth.bindTempAuthKey', ['perm_auth_key_id' => $perm_auth_key_id, 'nonce' => $nonce, 'expires_at' => $expires_at, 'encrypted_message' => $encrypted_message], ['message_id' => $message_id, 'datacenter' => $datacenter]); @@ -578,6 +577,7 @@ trait AuthKeyHandler $this->updates_state['sync_loading'] = false; $this->handle_pending_updates(); } + } public function sync_authorization($id) diff --git a/src/danog/MadelineProto/MTProtoTools/UpdateHandler.php b/src/danog/MadelineProto/MTProtoTools/UpdateHandler.php index abbd95b7..301eb56f 100644 --- a/src/danog/MadelineProto/MTProtoTools/UpdateHandler.php +++ b/src/danog/MadelineProto/MTProtoTools/UpdateHandler.php @@ -510,11 +510,6 @@ trait UpdateHandler public function save_update($update) { - array_walk($this->calls, function ($controller, $id) { - if ($controller->getCallState() === \danog\MadelineProto\VoIP::CALL_STATE_ENDED) { - $controller->discard(); - } - }); if ($update['_'] === 'updateDcOptions') { $this->logger->logger('Got new dc options', \danog\MadelineProto\Logger::VERBOSE); $this->parse_dc_options($update['dc_options']); diff --git a/src/danog/MadelineProto/RSA.php b/src/danog/MadelineProto/RSA.php index 5dbb6881..569b6fea 100644 --- a/src/danog/MadelineProto/RSA.php +++ b/src/danog/MadelineProto/RSA.php @@ -24,7 +24,6 @@ class RSA public function __magic_construct($rsa_key) { - //if ($this->unserialized($rsa_key)) return true; \danog\MadelineProto\Logger::log(\danog\MadelineProto\Lang::$current_lang['rsa_init'], Logger::ULTRA_VERBOSE); $key = new \phpseclib\Crypt\RSA(); \danog\MadelineProto\Logger::log(\danog\MadelineProto\Lang::$current_lang['loading_key'], Logger::ULTRA_VERBOSE); diff --git a/src/danog/MadelineProto/TL/TL.php b/src/danog/MadelineProto/TL/TL.php index 8ef48046..74aac4bd 100644 --- a/src/danog/MadelineProto/TL/TL.php +++ b/src/danog/MadelineProto/TL/TL.php @@ -133,6 +133,7 @@ trait TL $key++; } } else { + foreach ($TL_dict['constructors'] as $key => $value) { $TL_dict['constructors'][$key]['id'] = $this->pack_signed_int($TL_dict['constructors'][$key]['id']); } @@ -140,6 +141,7 @@ trait TL $TL_dict['methods'][$key]['id'] = $this->pack_signed_int($TL_dict['methods'][$key]['id']); } } + if (empty($TL_dict) || empty($TL_dict['constructors']) || !isset($TL_dict['methods'])) { throw new Exception(\danog\MadelineProto\Lang::$current_lang['src_file_invalid'].$file); } @@ -312,6 +314,9 @@ trait TL if (!is_array($object)) { throw new Exception(\danog\MadelineProto\Lang::$current_lang['array_invalid']); } + if (isset($object['_'])) { + throw new Exception('You must provide an array of '.$type['subtype']." objects, not a ".$type['subtype']." object. Example: [['_' => ".$type['subtype'].", ... ]]"); + } $concat = $this->constructors->find_by_predicate('vector')['id']; $concat .= $this->pack_unsigned_int(count($object)); foreach ($object as $k => $current_object) { @@ -597,7 +602,7 @@ trait TL stream_get_contents($stream, $resto); } } else { - $x = stream_get_contents($stream, $l); + $x = $l ? stream_get_contents($stream, $l) : ''; $resto = $this->posmod(-($l + 1), 4); if ($resto > 0) { stream_get_contents($stream, $resto); diff --git a/src/danog/MadelineProto/TL/TLParams.php b/src/danog/MadelineProto/TL/TLParams.php index 9278439f..b83d9402 100644 --- a/src/danog/MadelineProto/TL/TLParams.php +++ b/src/danog/MadelineProto/TL/TLParams.php @@ -18,9 +18,9 @@ trait TLParams public function parse_params($key, $mtproto = false) { foreach ($this->by_id[$key]['params'] as $kkey => $param) { - if (preg_match('/^flags\.(\d*)\?(.*)/', $param['type'], $matches)) { - $param['pow'] = pow(2, $matches[1]); - $param['type'] = $matches[2]; + if (preg_match('/(\w*)\.(\d*)\?(.*)/', $param['type'], $matches)) { + $param['pow'] = pow(2, $matches[2]); + $param['type'] = $matches[3]; } if (preg_match('/^(v|V)ector\<(.*)\>$/', $param['type'], $matches)) { $param['type'] = $matches[1] === 'v' ? 'vector' : 'Vector t'; diff --git a/src/danog/MadelineProto/TL_telegram_v81.tl b/src/danog/MadelineProto/TL_telegram_v81.tl new file mode 100644 index 00000000..bbf95c4b --- /dev/null +++ b/src/danog/MadelineProto/TL_telegram_v81.tl @@ -0,0 +1,1175 @@ +---types--- + + +ipPort#d433ad73 ipv4:int port:int = IpPort; +ipPortSecret#37982646 ipv4:int port:int secret:bytes = IpPort; +accessPointRule#4679b65f phone_prefix_rules:string dc_id:int ips:vector = AccessPointRule; +help.configSimple#5a592a6c date:int expires:int rules:vector = help.ConfigSimple; + + + +boolFalse#bc799737 = Bool; +boolTrue#997275b5 = Bool; + +true#3fedd339 = True; + +vector#1cb5c415 {t:Type} # [ t ] = Vector t; + +error#c4b9f9bb code:int text:string = Error; + +null#56730bcc = Null; + +inputPeerEmpty#7f3b18ea = InputPeer; +inputPeerSelf#7da07ec9 = InputPeer; +inputPeerChat#179be863 chat_id:int = InputPeer; +inputPeerUser#7b8e7de6 user_id:int access_hash:long = InputPeer; +inputPeerChannel#20adaef8 channel_id:int access_hash:long = InputPeer; + +inputUserEmpty#b98886cf = InputUser; +inputUserSelf#f7c1b13f = InputUser; +inputUser#d8292816 user_id:int access_hash:long = InputUser; + +inputPhoneContact#f392b7f4 client_id:long phone:string first_name:string last_name:string = InputContact; + +inputFile#f52ff27f id:long parts:int name:string md5_checksum:string = InputFile; +inputFileBig#fa4f0bb5 id:long parts:int name:string = InputFile; + +inputMediaEmpty#9664f57f = InputMedia; +inputMediaUploadedPhoto#1e287d04 flags:# file:InputFile stickers:flags.0?Vector ttl_seconds:flags.1?int = InputMedia; +inputMediaPhoto#b3ba0635 flags:# id:InputPhoto ttl_seconds:flags.0?int = InputMedia; +inputMediaGeoPoint#f9c44144 geo_point:InputGeoPoint = InputMedia; +inputMediaContact#a6e45987 phone_number:string first_name:string last_name:string = InputMedia; +inputMediaUploadedDocument#5b38c6c1 flags:# nosound_video:flags.3?true file:InputFile thumb:flags.2?InputFile mime_type:string attributes:Vector stickers:flags.0?Vector ttl_seconds:flags.1?int = InputMedia; +inputMediaDocument#23ab23d2 flags:# id:InputDocument ttl_seconds:flags.0?int = InputMedia; +inputMediaVenue#c13d1c11 geo_point:InputGeoPoint title:string address:string provider:string venue_id:string venue_type:string = InputMedia; +inputMediaGifExternal#4843b0fd url:string q:string = InputMedia; +inputMediaPhotoExternal#e5bbfe1a flags:# url:string ttl_seconds:flags.0?int = InputMedia; +inputMediaDocumentExternal#fb52dc99 flags:# url:string ttl_seconds:flags.0?int = InputMedia; +inputMediaGame#d33f43f3 id:InputGame = InputMedia; +inputMediaInvoice#f4e096c3 flags:# title:string description:string photo:flags.0?InputWebDocument invoice:Invoice payload:bytes provider:string provider_data:DataJSON start_param:string = InputMedia; +inputMediaGeoLive#7b1a118f geo_point:InputGeoPoint period:int = InputMedia; + +inputChatPhotoEmpty#1ca48f57 = InputChatPhoto; +inputChatUploadedPhoto#927c55b4 file:InputFile = InputChatPhoto; +inputChatPhoto#8953ad37 id:InputPhoto = InputChatPhoto; + +inputGeoPointEmpty#e4c123d6 = InputGeoPoint; +inputGeoPoint#f3b7acc9 lat:double long:double = InputGeoPoint; + +inputPhotoEmpty#1cd7bf0d = InputPhoto; +inputPhoto#fb95c6c4 id:long access_hash:long = InputPhoto; + +inputFileLocation#14637196 volume_id:long local_id:int secret:long = InputFileLocation; +inputEncryptedFileLocation#f5235d55 id:long access_hash:long = InputFileLocation; +inputDocumentFileLocation#430f0724 id:long access_hash:long version:int = InputFileLocation; +inputSecureFileLocation#cbc7ee28 id:long access_hash:long = InputFileLocation; +inputTakeoutFileLocation#29be5899 = InputFileLocation; + +inputAppEvent#770656a8 time:double type:string peer:long data:string = InputAppEvent; + +peerUser#9db1bc6d user_id:int = Peer; +peerChat#bad0e5bb chat_id:int = Peer; +peerChannel#bddde532 channel_id:int = Peer; + +storage.fileUnknown#aa963b05 = storage.FileType; +storage.filePartial#40bc6f52 = storage.FileType; +storage.fileJpeg#7efe0e = storage.FileType; +storage.fileGif#cae1aadf = storage.FileType; +storage.filePng#a4f63c0 = storage.FileType; +storage.filePdf#ae1e508d = storage.FileType; +storage.fileMp3#528a0677 = storage.FileType; +storage.fileMov#4b09ebbc = storage.FileType; +storage.fileMp4#b3cea0e4 = storage.FileType; +storage.fileWebp#1081464c = storage.FileType; + +fileLocationUnavailable#7c596b46 volume_id:long local_id:int secret:long = FileLocation; +fileLocation#53d69076 dc_id:int volume_id:long local_id:int secret:long = FileLocation; + +userEmpty#200250ba id:int = User; +user#2e13f4c3 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 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?string bot_inline_placeholder:flags.19?string lang_code:flags.22?string = User; + +userProfilePhotoEmpty#4f11bae1 = UserProfilePhoto; +userProfilePhoto#d559d8c8 photo_id:long photo_small:FileLocation photo_big:FileLocation = UserProfilePhoto; + +userStatusEmpty#9d05049 = UserStatus; +userStatusOnline#edb93949 expires:int = UserStatus; +userStatusOffline#8c703f was_online:int = UserStatus; +userStatusRecently#e26f42f1 = UserStatus; +userStatusLastWeek#7bf09fc = UserStatus; +userStatusLastMonth#77ebc742 = UserStatus; + +chatEmpty#9ba2d800 id:int = Chat; +chat#d91cdd54 flags:# creator:flags.0?true kicked:flags.1?true left:flags.2?true admins_enabled:flags.3?true admin:flags.4?true deactivated:flags.5?true id:int title:string photo:ChatPhoto participants_count:int date:int version:int migrated_to:flags.6?InputChannel = Chat; +chatForbidden#7328bdb id:int title:string = Chat; +channel#c88974ac flags:# creator:flags.0?true left:flags.2?true editor:flags.3?true broadcast:flags.5?true verified:flags.7?true megagroup:flags.8?true restricted:flags.9?true democracy:flags.10?true signatures:flags.11?true min:flags.12?true id:int access_hash:flags.13?long title:string username:flags.6?string photo:ChatPhoto date:int version:int restriction_reason:flags.9?string admin_rights:flags.14?ChannelAdminRights banned_rights:flags.15?ChannelBannedRights 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; + +chatFull#2e02a614 id:int participants:ChatParticipants chat_photo:Photo notify_settings:PeerNotifySettings exported_invite:ExportedChatInvite bot_info:Vector = ChatFull; +channelFull#76af5481 flags:# can_view_participants:flags.3?true can_set_username:flags.6?true can_set_stickers:flags.7?true hidden_prehistory:flags.10?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 read_inbox_max_id:int read_outbox_max_id:int unread_count:int chat_photo:Photo notify_settings:PeerNotifySettings exported_invite:ExportedChatInvite bot_info:Vector 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 = ChatFull; + +chatParticipant#c8d7493e user_id:int inviter_id:int date:int = ChatParticipant; +chatParticipantCreator#da13538a user_id:int = ChatParticipant; +chatParticipantAdmin#e2d6e436 user_id:int inviter_id:int date:int = ChatParticipant; + +chatParticipantsForbidden#fc900c2b flags:# chat_id:int self_participant:flags.0?ChatParticipant = ChatParticipants; +chatParticipants#3f460fed chat_id:int participants:Vector version:int = ChatParticipants; + +chatPhotoEmpty#37c1011c = ChatPhoto; +chatPhoto#6153276a photo_small:FileLocation photo_big:FileLocation = ChatPhoto; + +messageEmpty#83e5de54 id:int = Message; +message#44f9b43d flags:# out:flags.1?true mentioned:flags.4?true media_unread:flags.5?true silent:flags.13?true post:flags.14?true id:int from_id:flags.8?int to_id:Peer fwd_from:flags.2?MessageFwdHeader via_bot_id:flags.11?int reply_to_msg_id:flags.3?int date:int message:string media:flags.9?MessageMedia reply_markup:flags.6?ReplyMarkup entities:flags.7?Vector views:flags.10?int edit_date:flags.15?int post_author:flags.16?string grouped_id:flags.17?long = Message; +messageService#9e19a1f6 flags:# out:flags.1?true mentioned:flags.4?true media_unread:flags.5?true silent:flags.13?true post:flags.14?true id:int from_id:flags.8?int to_id:Peer reply_to_msg_id:flags.3?int date:int action:MessageAction = Message; + +messageMediaEmpty#3ded6320 = MessageMedia; +messageMediaPhoto#695150d7 flags:# photo:flags.0?Photo ttl_seconds:flags.2?int = MessageMedia; +messageMediaGeo#56e0d474 geo:GeoPoint = MessageMedia; +messageMediaContact#5e7d2f39 phone_number:string first_name:string last_name:string user_id:int = MessageMedia; +messageMediaUnsupported#9f84f49e = MessageMedia; +messageMediaDocument#9cb070d7 flags:# document:flags.0?Document ttl_seconds:flags.2?int = MessageMedia; +messageMediaWebPage#a32dd600 webpage:WebPage = MessageMedia; +messageMediaVenue#2ec0533f geo:GeoPoint title:string address:string provider:string venue_id:string venue_type:string = MessageMedia; +messageMediaGame#fdb19008 game:Game = MessageMedia; +messageMediaInvoice#84551347 flags:# shipping_address_requested:flags.1?true test:flags.3?true title:string description:string photo:flags.0?WebDocument receipt_msg_id:flags.2?int currency:string total_amount:long start_param:string = MessageMedia; +messageMediaGeoLive#7c3c2609 geo:GeoPoint period:int = MessageMedia; + +messageActionEmpty#b6aef7b0 = MessageAction; +messageActionChatCreate#a6638b9a title:string users:Vector = MessageAction; +messageActionChatEditTitle#b5a1ce5a title:string = MessageAction; +messageActionChatEditPhoto#7fcb13a8 photo:Photo = MessageAction; +messageActionChatDeletePhoto#95e3fbef = MessageAction; +messageActionChatAddUser#488a7337 users:Vector = MessageAction; +messageActionChatDeleteUser#b2ae9b0c user_id:int = MessageAction; +messageActionChatJoinedByLink#f89cf5e8 inviter_id:int = MessageAction; +messageActionChannelCreate#95d2ac92 title:string = MessageAction; +messageActionChatMigrateTo#51bdb021 channel_id:int = MessageAction; +messageActionChannelMigrateFrom#b055eaee title:string chat_id:int = MessageAction; +messageActionPinMessage#94bd38ed = MessageAction; +messageActionHistoryClear#9fbab604 = MessageAction; +messageActionGameScore#92a72876 game_id:long score:int = MessageAction; +messageActionPaymentSentMe#8f31b327 flags:# currency:string total_amount:long payload:bytes info:flags.0?PaymentRequestedInfo shipping_option_id:flags.1?string charge:PaymentCharge = MessageAction; +messageActionPaymentSent#40699cd0 currency:string total_amount:long = MessageAction; +messageActionPhoneCall#80e11a7f flags:# call_id:long reason:flags.0?PhoneCallDiscardReason duration:flags.1?int = MessageAction; +messageActionScreenshotTaken#4792929b = MessageAction; +messageActionCustomAction#fae69f56 message:string = MessageAction; +messageActionBotAllowed#abe9affe domain:string = MessageAction; +messageActionSecureValuesSentMe#1b287353 values:Vector credentials:SecureCredentialsEncrypted = MessageAction; +messageActionSecureValuesSent#d95c6154 types:Vector = MessageAction; + +dialog#e4def5db flags:# pinned:flags.2?true peer:Peer top_message:int read_inbox_max_id:int read_outbox_max_id:int unread_count:int unread_mentions_count:int notify_settings:PeerNotifySettings pts:flags.0?int draft:flags.1?DraftMessage = Dialog; + +photoEmpty#2331b22d id:long = Photo; +photo#9288dd29 flags:# has_stickers:flags.0?true id:long access_hash:long date:int sizes:Vector = Photo; + +photoSizeEmpty#e17e23c type:string = PhotoSize; +photoSize#77bfb61b type:string location:FileLocation w:int h:int size:int = PhotoSize; +photoCachedSize#e9a734fa type:string location:FileLocation w:int h:int bytes:bytes = PhotoSize; + +geoPointEmpty#1117dd5f = GeoPoint; +geoPoint#2049d70c long:double lat:double = GeoPoint; + +auth.checkedPhone#811ea28e phone_registered:Bool = auth.CheckedPhone; + +auth.sentCode#38faab5f flags:# phone_registered:flags.0?true type:auth.SentCodeType phone_code_hash:string next_type:flags.1?auth.CodeType timeout:flags.2?int terms_of_service:flags.3?help.TermsOfService = auth.SentCode; + +auth.authorization#cd050916 flags:# tmp_sessions:flags.0?int user:User = auth.Authorization; + +auth.exportedAuthorization#df969c2d id:int bytes:bytes = auth.ExportedAuthorization; + +inputNotifyPeer#b8bc5b0c peer:InputPeer = InputNotifyPeer; +inputNotifyUsers#193b4417 = InputNotifyPeer; +inputNotifyChats#4a95e84e = InputNotifyPeer; + +inputPeerNotifySettings#9c3d198e flags:# show_previews:flags.0?Bool silent:flags.1?Bool mute_until:flags.2?int sound:flags.3?string = InputPeerNotifySettings; + +peerNotifySettings#af509d20 flags:# show_previews:flags.0?Bool silent:flags.1?Bool mute_until:flags.2?int sound:flags.3?string = PeerNotifySettings; + +peerSettings#818426cd flags:# report_spam:flags.0?true = PeerSettings; + +wallPaper#ccb03657 id:int title:string sizes:Vector color:int = WallPaper; +wallPaperSolid#63117f24 id:int title:string bg_color:int color:int = WallPaper; + +inputReportReasonSpam#58dbcab8 = ReportReason; +inputReportReasonViolence#1e22c78d = ReportReason; +inputReportReasonPornography#2e59d922 = ReportReason; +inputReportReasonOther#e1746d0a text:string = ReportReason; + +userFull#f220f3f flags:# blocked:flags.0?true phone_calls_available:flags.4?true phone_calls_private:flags.5?true user:User about:flags.1?string link:contacts.Link profile_photo:flags.2?Photo notify_settings:PeerNotifySettings bot_info:flags.3?BotInfo common_chats_count:int = UserFull; + +contact#f911c994 user_id:int mutual:Bool = Contact; + +importedContact#d0028438 user_id:int client_id:long = ImportedContact; + +contactBlocked#561bc879 user_id:int date:int = ContactBlocked; + +contactStatus#d3680c61 user_id:int status:UserStatus = ContactStatus; + +contacts.link#3ace484c my_link:ContactLink foreign_link:ContactLink user:User = contacts.Link; + +contacts.contactsNotModified#b74ba9d2 = contacts.Contacts; +contacts.contacts#eae87e42 contacts:Vector saved_count:int users:Vector = contacts.Contacts; + +contacts.importedContacts#77d01c3b imported:Vector popular_invites:Vector retry_contacts:Vector users:Vector = contacts.ImportedContacts; + +contacts.blocked#1c138d15 blocked:Vector users:Vector = contacts.Blocked; +contacts.blockedSlice#900802a1 count:int blocked:Vector users:Vector = contacts.Blocked; + +messages.dialogs#15ba6c40 dialogs:Vector messages:Vector chats:Vector users:Vector = messages.Dialogs; +messages.dialogsSlice#71e094f3 count:int dialogs:Vector messages:Vector chats:Vector users:Vector = messages.Dialogs; + +messages.messages#8c718e87 messages:Vector chats:Vector users:Vector = messages.Messages; +messages.messagesSlice#b446ae3 count:int messages:Vector chats:Vector users:Vector = messages.Messages; +messages.channelMessages#99262e37 flags:# pts:int count:int messages:Vector chats:Vector users:Vector = messages.Messages; +messages.messagesNotModified#74535f21 count:int = messages.Messages; + +messages.chats#64ff9fd5 chats:Vector = messages.Chats; +messages.chatsSlice#9cd81144 count:int chats:Vector = messages.Chats; + +messages.chatFull#e5d7d19c full_chat:ChatFull chats:Vector users:Vector = messages.ChatFull; + +messages.affectedHistory#b45c69d1 pts:int pts_count:int offset:int = messages.AffectedHistory; + +inputMessagesFilterEmpty#57e2f66c = MessagesFilter; +inputMessagesFilterPhotos#9609a51c = MessagesFilter; +inputMessagesFilterVideo#9fc00e65 = MessagesFilter; +inputMessagesFilterPhotoVideo#56e9f0e4 = MessagesFilter; +inputMessagesFilterDocument#9eddf188 = MessagesFilter; +inputMessagesFilterUrl#7ef0dd87 = MessagesFilter; +inputMessagesFilterGif#ffc86587 = MessagesFilter; +inputMessagesFilterVoice#50f5c392 = MessagesFilter; +inputMessagesFilterMusic#3751b49e = MessagesFilter; +inputMessagesFilterChatPhotos#3a20ecb8 = MessagesFilter; +inputMessagesFilterPhoneCalls#80c99768 flags:# missed:flags.0?true = MessagesFilter; +inputMessagesFilterRoundVoice#7a7c17a4 = MessagesFilter; +inputMessagesFilterRoundVideo#b549da53 = MessagesFilter; +inputMessagesFilterMyMentions#c1f8e69a = MessagesFilter; +inputMessagesFilterGeo#e7026d0d = MessagesFilter; +inputMessagesFilterContacts#e062db83 = MessagesFilter; + +updateNewMessage#1f2b0afd message:Message pts:int pts_count:int = Update; +updateMessageID#4e90bfd6 id:int random_id:long = Update; +updateDeleteMessages#a20db0e5 messages:Vector pts:int pts_count:int = Update; +updateUserTyping#5c486927 user_id:int action:SendMessageAction = Update; +updateChatUserTyping#9a65ea1f chat_id:int user_id:int action:SendMessageAction = Update; +updateChatParticipants#7761198 participants:ChatParticipants = Update; +updateUserStatus#1bfbd823 user_id:int status:UserStatus = Update; +updateUserName#a7332b73 user_id:int first_name:string last_name:string username:string = Update; +updateUserPhoto#95313b0c user_id:int date:int photo:UserProfilePhoto previous:Bool = Update; +updateContactRegistered#2575bbb9 user_id:int date:int = Update; +updateContactLink#9d2e67c5 user_id:int my_link:ContactLink foreign_link:ContactLink = Update; +updateNewEncryptedMessage#12bcbd9a message:EncryptedMessage qts:int = Update; +updateEncryptedChatTyping#1710f156 chat_id:int = Update; +updateEncryption#b4a2e88d chat:EncryptedChat 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; +updateChatParticipantDelete#6e5f8c22 chat_id:int user_id:int version:int = Update; +updateDcOptions#8e5e9873 dc_options:Vector = Update; +updateUserBlocked#80ece81a user_id:int blocked:Bool = 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 = Update; +updatePrivacy#ee3b272a key:PrivacyKey rules:Vector = Update; +updateUserPhone#12b9417b user_id:int phone:string = Update; +updateReadHistoryInbox#9961fd5c 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; +updateReadMessagesContents#68c13933 messages:Vector pts:int pts_count:int = Update; +updateChannelTooLong#eb0467fb flags:# channel_id:int pts:flags.0?int = Update; +updateChannel#b6d45656 channel_id:int = Update; +updateNewChannelMessage#62ba04d9 message:Message pts:int pts_count:int = Update; +updateReadChannelInbox#4214f37f channel_id:int max_id:int = Update; +updateDeleteChannelMessages#c37521c9 channel_id:int messages:Vector pts:int pts_count:int = Update; +updateChannelMessageViews#98a12b4b channel_id:int id:int views:int = Update; +updateChatAdmins#6e947941 chat_id:int enabled:Bool version:int = Update; +updateChatParticipantAdmin#b6901959 chat_id:int user_id:int is_admin:Bool version:int = Update; +updateNewStickerSet#688a30aa stickerset:messages.StickerSet = Update; +updateStickerSetsOrder#bb2d201 flags:# masks:flags.0?true order:Vector = Update; +updateStickerSets#43ae3dec = Update; +updateSavedGifs#9375341e = Update; +updateBotInlineQuery#54826690 flags:# query_id:long user_id:int query:string geo:flags.0?GeoPoint offset:string = Update; +updateBotInlineSend#e48f964 flags:# user_id:int query:string geo:flags.0?GeoPoint id:string msg_id:flags.1?InputBotInlineMessageID = Update; +updateEditChannelMessage#1b3f4df7 message:Message pts:int pts_count:int = Update; +updateChannelPinnedMessage#98592475 channel_id:int id: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; +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; +updateReadChannelOutbox#25d6c9c7 channel_id:int max_id:int = Update; +updateDraftMessage#ee2bb969 peer:Peer draft:DraftMessage = Update; +updateReadFeaturedStickers#571d2742 = Update; +updateRecentStickers#9a422c20 = Update; +updateConfig#a229dd06 = Update; +updatePtsChanged#3354678f = Update; +updateChannelWebPage#40771900 channel_id:int webpage:WebPage pts:int pts_count:int = Update; +updateDialogPinned#19d27f3c flags:# pinned:flags.0?true peer:DialogPeer = Update; +updatePinnedDialogs#ea4cb65b flags:# order:flags.0?Vector = Update; +updateBotWebhookJSON#8317c0c3 data:DataJSON = 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; +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; +updatePhoneCall#ab0f6b1e phone_call:PhoneCall = Update; +updateLangPackTooLong#10c2404b = Update; +updateLangPack#56022f4d difference:LangPackDifference = Update; +updateFavedStickers#e511996d = Update; +updateChannelReadMessagesContents#89893b45 channel_id:int messages:Vector = Update; +updateContactsReset#7084a7be = Update; +updateChannelAvailableMessages#70db6837 channel_id:int available_min_id:int = Update; + +updates.state#a56c2a3e pts:int qts:int date:int seq:int unread_count:int = updates.State; + +updates.differenceEmpty#5d75a138 date:int seq:int = updates.Difference; +updates.difference#f49ca0 new_messages:Vector new_encrypted_messages:Vector other_updates:Vector chats:Vector users:Vector state:updates.State = updates.Difference; +updates.differenceSlice#a8fb1981 new_messages:Vector new_encrypted_messages:Vector other_updates:Vector chats:Vector users:Vector intermediate_state:updates.State = updates.Difference; +updates.differenceTooLong#4afe8f6d pts:int = updates.Difference; + +updatesTooLong#e317af7e = Updates; +updateShortMessage#914fbf11 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_msg_id:flags.3?int entities:flags.7?Vector = Updates; +updateShortChatMessage#16812688 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_msg_id:flags.3?int entities:flags.7?Vector = Updates; +updateShort#78d4dec1 update:Update date:int = Updates; +updatesCombined#725b04c3 updates:Vector users:Vector chats:Vector date:int seq_start:int seq:int = Updates; +updates#74ae4240 updates:Vector users:Vector chats:Vector date:int seq:int = Updates; +updateShortSentMessage#11f1331c flags:# out:flags.1?true id:int pts:int pts_count:int date:int media:flags.9?MessageMedia entities:flags.7?Vector = Updates; + +photos.photos#8dca6aa5 photos:Vector users:Vector = photos.Photos; +photos.photosSlice#15051f54 count:int photos:Vector users:Vector = photos.Photos; + +photos.photo#20212ca8 photo:Photo users:Vector = photos.Photo; + +upload.file#96a18d5 type:storage.FileType mtime:int bytes:bytes = upload.File; +upload.fileCdnRedirect#f18cda44 dc_id:int file_token:bytes encryption_key:bytes encryption_iv:bytes file_hashes:Vector = upload.File; + +dcOption#18b7a10d flags:# ipv6:flags.0?true media_only:flags.1?true tcpo_only:flags.2?true cdn:flags.3?true static:flags.4?true id:int ip_address:string port:int secret:flags.10?bytes = DcOption; + +config#eb7bb160 flags:# phonecalls_enabled:flags.1?true default_p2p_contacts:flags.3?true preload_featured_stickers:flags.4?true ignore_phone_entities:flags.5?true revoke_pm_inbox:flags.6?true blocked_mode:flags.8?true date:int expires:int test_mode:Bool this_dc:int dc_options:Vector chat_size_max:int megagroup_size_max:int forwarded_count_max:int online_update_period_ms:int offline_blur_timeout_ms:int offline_idle_timeout_ms:int online_cloud_timeout_ms:int notify_cloud_delay_ms:int notify_default_delay_ms:int push_chat_period_ms:int push_chat_limit:int saved_gifs_limit:int edit_time_limit:int revoke_time_limit:int revoke_pm_time_limit:int rating_e_decay:int stickers_recent_limit:int stickers_faved_limit:int channels_read_media_period:int tmp_sessions:flags.0?int pinned_dialogs_count_max:int call_receive_timeout_ms:int call_ring_timeout_ms:int call_connect_timeout_ms:int call_packet_timeout_ms:int me_url_prefix:string autoupdate_url_prefix:flags.7?string suggested_lang_code:flags.2?string lang_pack_version:flags.2?int = Config; + +nearestDc#8e1a1775 country:string this_dc:int nearest_dc:int = NearestDc; + +help.appUpdate#8987f311 id:int critical:Bool url:string text:string = help.AppUpdate; +help.noAppUpdate#c45a6536 = help.AppUpdate; + +help.inviteText#18cb9f78 message:string = help.InviteText; + +encryptedChatEmpty#ab7ec0a0 id:int = EncryptedChat; +encryptedChatWaiting#3bf703dc id:int access_hash:long date:int admin_id:int participant_id:int = EncryptedChat; +encryptedChatRequested#c878527e id:int access_hash:long date:int admin_id:int participant_id:int 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; +encryptedChatDiscarded#13d6dd27 id:int = EncryptedChat; + +inputEncryptedChat#f141b5e1 chat_id:int access_hash:long = InputEncryptedChat; + +encryptedFileEmpty#c21f497e = EncryptedFile; +encryptedFile#4a70994c id:long access_hash:long size:int dc_id:int key_fingerprint:int = EncryptedFile; + +inputEncryptedFileEmpty#1837c364 = InputEncryptedFile; +inputEncryptedFileUploaded#64bd0306 id:long parts:int md5_checksum:string key_fingerprint:int = InputEncryptedFile; +inputEncryptedFile#5a17b5e5 id:long access_hash:long = InputEncryptedFile; +inputEncryptedFileBigUploaded#2dc173c8 id:long parts:int key_fingerprint:int = InputEncryptedFile; + +encryptedMessage#ed18c118 random_id:long chat_id:int date:int bytes:bytes file:EncryptedFile = EncryptedMessage; +encryptedMessageService#23734b06 random_id:long chat_id:int date:int bytes:bytes = EncryptedMessage; + +messages.dhConfigNotModified#c0e24635 random:bytes = messages.DhConfig; +messages.dhConfig#2c221edd g:int p:bytes version:int random:bytes = messages.DhConfig; + +messages.sentEncryptedMessage#560f8935 date:int = messages.SentEncryptedMessage; +messages.sentEncryptedFile#9493ff32 date:int file:EncryptedFile = messages.SentEncryptedMessage; + +inputDocumentEmpty#72f0eaae = InputDocument; +inputDocument#18798952 id:long access_hash:long = InputDocument; + +documentEmpty#36f8c871 id:long = Document; +document#87232bc7 id:long access_hash:long date:int mime_type:string size:int thumb:PhotoSize dc_id:int version:int attributes:Vector = Document; + +help.support#17c6b5f6 phone_number:string user:User = help.Support; + +notifyPeer#9fd40bd8 peer:Peer = NotifyPeer; +notifyUsers#b4c83b4c = NotifyPeer; +notifyChats#c007cec3 = NotifyPeer; + +sendMessageTypingAction#16bf744e = SendMessageAction; +sendMessageCancelAction#fd5ec8f5 = SendMessageAction; +sendMessageRecordVideoAction#a187d66f = SendMessageAction; +sendMessageUploadVideoAction#e9763aec progress:int = SendMessageAction; +sendMessageRecordAudioAction#d52f73f7 = SendMessageAction; +sendMessageUploadAudioAction#f351d7ab progress:int = SendMessageAction; +sendMessageUploadPhotoAction#d1d34a26 progress:int = SendMessageAction; +sendMessageUploadDocumentAction#aa0cd9e4 progress:int = SendMessageAction; +sendMessageGeoLocationAction#176f8ba1 = SendMessageAction; +sendMessageChooseContactAction#628cbc6f = SendMessageAction; +sendMessageGamePlayAction#dd6a8f48 = SendMessageAction; +sendMessageRecordRoundAction#88f27fbc = SendMessageAction; +sendMessageUploadRoundAction#243e1c66 progress:int = SendMessageAction; + +contacts.found#b3134d9d my_results:Vector results:Vector chats:Vector users:Vector = contacts.Found; + +inputPrivacyKeyStatusTimestamp#4f96cb18 = InputPrivacyKey; +inputPrivacyKeyChatInvite#bdfb0426 = InputPrivacyKey; +inputPrivacyKeyPhoneCall#fabadc5f = InputPrivacyKey; + +privacyKeyStatusTimestamp#bc2eab30 = PrivacyKey; +privacyKeyChatInvite#500e6dfa = PrivacyKey; +privacyKeyPhoneCall#3d662b7b = PrivacyKey; + +inputPrivacyValueAllowContacts#d09e07b = InputPrivacyRule; +inputPrivacyValueAllowAll#184b35ce = InputPrivacyRule; +inputPrivacyValueAllowUsers#131cc67f users:Vector = InputPrivacyRule; +inputPrivacyValueDisallowContacts#ba52007 = InputPrivacyRule; +inputPrivacyValueDisallowAll#d66b66c9 = InputPrivacyRule; +inputPrivacyValueDisallowUsers#90110467 users:Vector = InputPrivacyRule; + +privacyValueAllowContacts#fffe1bac = PrivacyRule; +privacyValueAllowAll#65427b82 = PrivacyRule; +privacyValueAllowUsers#4d5bbe0c users:Vector = PrivacyRule; +privacyValueDisallowContacts#f888fa1a = PrivacyRule; +privacyValueDisallowAll#8b73e763 = PrivacyRule; +privacyValueDisallowUsers#c7f49b7 users:Vector = PrivacyRule; + +account.privacyRules#554abb6f rules:Vector users:Vector = account.PrivacyRules; + +accountDaysTTL#b8d0afdf days:int = AccountDaysTTL; + +documentAttributeImageSize#6c37c15c w:int h:int = DocumentAttribute; +documentAttributeAnimated#11b58939 = DocumentAttribute; +documentAttributeSticker#6319d612 flags:# mask:flags.1?true alt:string stickerset:InputStickerSet mask_coords:flags.0?MaskCoords = DocumentAttribute; +documentAttributeVideo#ef02ce6 flags:# round_message:flags.0?true supports_streaming:flags.1?true duration:int w:int h:int = DocumentAttribute; +documentAttributeAudio#9852f9c6 flags:# voice:flags.10?true duration:int title:flags.0?string performer:flags.1?string waveform:flags.2?bytes = DocumentAttribute; +documentAttributeFilename#15590068 file_name:string = DocumentAttribute; +documentAttributeHasStickers#9801d2f7 = DocumentAttribute; + +messages.stickersNotModified#f1749a22 = messages.Stickers; +messages.stickers#e4599bbd hash:int stickers:Vector = messages.Stickers; + +stickerPack#12b299d4 emoticon:string documents:Vector = StickerPack; + +messages.allStickersNotModified#e86602c3 = messages.AllStickers; +messages.allStickers#edfd405f hash:int sets:Vector = messages.AllStickers; + +messages.affectedMessages#84d19185 pts:int pts_count:int = messages.AffectedMessages; + +contactLinkUnknown#5f4f9247 = ContactLink; +contactLinkNone#feedd3ad = ContactLink; +contactLinkHasPhone#268f3f59 = ContactLink; +contactLinkContact#d502c2d0 = ContactLink; + +webPageEmpty#eb1477e8 id:long = WebPage; +webPagePending#c586da1c id:long date:int = WebPage; +webPage#5f07b4bc flags:# id:long url:string display_url:string hash:int type:flags.0?string site_name:flags.1?string title:flags.2?string description:flags.3?string photo:flags.4?Photo embed_url:flags.5?string embed_type:flags.5?string embed_width:flags.6?int embed_height:flags.6?int duration:flags.7?int author:flags.8?string document:flags.9?Document cached_page:flags.10?Page = WebPage; +webPageNotModified#85849473 = WebPage; + +authorization#7bf2e6f6 hash:long flags:int device_model:string platform:string system_version:string api_id:int app_name:string app_version:string date_created:int date_active:int ip:string country:string region:string = Authorization; + +account.authorizations#1250abde authorizations:Vector = account.Authorizations; + +account.noPassword#5ea182f6 new_salt:bytes new_secure_salt:bytes secure_random:bytes email_unconfirmed_pattern:string = account.Password; +account.password#ca39b447 flags:# has_recovery:flags.0?true has_secure_values:flags.1?true current_salt:bytes new_salt:bytes new_secure_salt:bytes secure_random:bytes hint:string email_unconfirmed_pattern:string = account.Password; + +account.passwordSettings#7bd9c3f1 email:string secure_salt:bytes secure_secret:bytes secure_secret_id:long = account.PasswordSettings; + +account.passwordInputSettings#21ffa60d flags:# new_salt:flags.0?bytes new_password_hash:flags.0?bytes hint:flags.0?string email:flags.1?string new_secure_salt:flags.2?bytes new_secure_secret:flags.2?bytes new_secure_secret_id:flags.2?long = account.PasswordInputSettings; + +auth.passwordRecovery#137948a5 email_pattern:string = auth.PasswordRecovery; + +receivedNotifyMessage#a384b779 id:int flags:int = ReceivedNotifyMessage; + +chatInviteEmpty#69df3769 = ExportedChatInvite; +chatInviteExported#fc2e05bc link:string = ExportedChatInvite; + +chatInviteAlready#5a686d7c chat:Chat = ChatInvite; +chatInvite#db74f558 flags:# channel:flags.0?true broadcast:flags.1?true public:flags.2?true megagroup:flags.3?true title:string photo:ChatPhoto participants_count:int participants:flags.4?Vector = ChatInvite; + +inputStickerSetEmpty#ffb62b95 = InputStickerSet; +inputStickerSetID#9de7a269 id:long access_hash:long = InputStickerSet; +inputStickerSetShortName#861cc8a0 short_name:string = InputStickerSet; + +stickerSet#5585a139 flags:# archived:flags.1?true official:flags.2?true masks:flags.3?true installed_date:flags.0?int id:long access_hash:long title:string short_name:string count:int hash:int = StickerSet; + +messages.stickerSet#b60a24a6 set:StickerSet packs:Vector documents:Vector = messages.StickerSet; + +botCommand#c27ac8c7 command:string description:string = BotCommand; + +botInfo#98e81d3a user_id:int description:string commands:Vector = BotInfo; + +keyboardButton#a2fa4880 text:string = KeyboardButton; +keyboardButtonUrl#258aff05 text:string url:string = KeyboardButton; +keyboardButtonCallback#683a5e46 text:string data:bytes = KeyboardButton; +keyboardButtonRequestPhone#b16a6c29 text:string = KeyboardButton; +keyboardButtonRequestGeoLocation#fc796b3f text:string = KeyboardButton; +keyboardButtonSwitchInline#568a748 flags:# same_peer:flags.0?true text:string query:string = KeyboardButton; +keyboardButtonGame#50f41ccf text:string = KeyboardButton; +keyboardButtonBuy#afd93fbb text:string = KeyboardButton; + +keyboardButtonRow#77608b83 buttons:Vector = KeyboardButtonRow; + +replyKeyboardHide#a03e5b85 flags:# selective:flags.2?true = ReplyMarkup; +replyKeyboardForceReply#f4108aa0 flags:# single_use:flags.1?true selective:flags.2?true = ReplyMarkup; +replyKeyboardMarkup#3502758c flags:# resize:flags.0?true single_use:flags.1?true selective:flags.2?true rows:Vector = ReplyMarkup; +replyInlineMarkup#48a30254 rows:Vector = ReplyMarkup; + +messageEntityUnknown#bb92ba95 offset:int length:int = MessageEntity; +messageEntityMention#fa04579d offset:int length:int = MessageEntity; +messageEntityHashtag#6f635b0d offset:int length:int = MessageEntity; +messageEntityBotCommand#6cef8ac7 offset:int length:int = MessageEntity; +messageEntityUrl#6ed02538 offset:int length:int = MessageEntity; +messageEntityEmail#64e475c2 offset:int length:int = MessageEntity; +messageEntityBold#bd610bc9 offset:int length:int = MessageEntity; +messageEntityItalic#826f8b60 offset:int length:int = MessageEntity; +messageEntityCode#28a20571 offset:int length:int = MessageEntity; +messageEntityPre#73924be0 offset:int length:int language:string = MessageEntity; +messageEntityTextUrl#76a6d327 offset:int length:int url:string = MessageEntity; +messageEntityMentionName#352dca58 offset:int length:int user_id:int = MessageEntity; +inputMessageEntityMentionName#208e68c9 offset:int length:int user_id:InputUser = MessageEntity; +messageEntityPhone#9b69e34b offset:int length:int = MessageEntity; +messageEntityCashtag#4c4e743f offset:int length:int = MessageEntity; + +inputChannelEmpty#ee8c1e86 = InputChannel; +inputChannel#afeb712e channel_id:int access_hash:long = InputChannel; + +contacts.resolvedPeer#7f077ad9 peer:Peer chats:Vector users:Vector = contacts.ResolvedPeer; + +messageRange#ae30253 min_id:int max_id:int = MessageRange; + +updates.channelDifferenceEmpty#3e11affb flags:# final:flags.0?true pts:int timeout:flags.1?int = updates.ChannelDifference; +updates.channelDifferenceTooLong#6a9d7b35 flags:# final:flags.0?true pts:int timeout:flags.1?int top_message:int read_inbox_max_id:int read_outbox_max_id:int unread_count:int unread_mentions_count:int messages:Vector chats:Vector users:Vector = updates.ChannelDifference; +updates.channelDifference#2064674e flags:# final:flags.0?true pts:int timeout:flags.1?int new_messages:Vector other_updates:Vector chats:Vector users:Vector = updates.ChannelDifference; + +channelMessagesFilterEmpty#94d42ee7 = ChannelMessagesFilter; +channelMessagesFilter#cd77d957 flags:# exclude_new_messages:flags.1?true ranges:Vector = ChannelMessagesFilter; + +channelParticipant#15ebac1d user_id:int date:int = ChannelParticipant; +channelParticipantSelf#a3289a6d user_id:int inviter_id:int date:int = ChannelParticipant; +channelParticipantCreator#e3e2e1f9 user_id:int = ChannelParticipant; +channelParticipantAdmin#a82fa898 flags:# can_edit:flags.0?true user_id:int inviter_id:int promoted_by:int date:int admin_rights:ChannelAdminRights = ChannelParticipant; +channelParticipantBanned#222c1886 flags:# left:flags.0?true user_id:int kicked_by:int date:int banned_rights:ChannelBannedRights = ChannelParticipant; + +channelParticipantsRecent#de3f3c79 = ChannelParticipantsFilter; +channelParticipantsAdmins#b4608969 = ChannelParticipantsFilter; +channelParticipantsKicked#a3b54985 q:string = ChannelParticipantsFilter; +channelParticipantsBots#b0d1865b = ChannelParticipantsFilter; +channelParticipantsBanned#1427a5e1 q:string = ChannelParticipantsFilter; +channelParticipantsSearch#656ac4b q:string = ChannelParticipantsFilter; + +channels.channelParticipants#f56ee2a8 count:int participants:Vector users:Vector = channels.ChannelParticipants; +channels.channelParticipantsNotModified#f0173fe9 = channels.ChannelParticipants; + +channels.channelParticipant#d0d9b163 participant:ChannelParticipant users:Vector = channels.ChannelParticipant; + +help.termsOfService#780a0310 flags:# popup:flags.0?true id:DataJSON text:string entities:Vector min_age_confirm:flags.1?int = help.wTermsOfService; + +foundGif#162ecc1f url:string thumb_url:string content_url:string content_type:string w:int h:int = FoundGif; +foundGifCached#9c750409 url:string photo:Photo document:Document = FoundGif; + +messages.foundGifs#450a1c0a next_offset:int results:Vector = messages.FoundGifs; + +messages.savedGifsNotModified#e8025ca2 = messages.SavedGifs; +messages.savedGifs#2e0709a5 hash:int gifs:Vector = messages.SavedGifs; + +inputBotInlineMessageMediaAuto#3380c786 flags:# message:string entities:flags.1?Vector reply_markup:flags.2?ReplyMarkup = InputBotInlineMessage; +inputBotInlineMessageText#3dcd7a87 flags:# no_webpage:flags.0?true message:string entities:flags.1?Vector reply_markup:flags.2?ReplyMarkup = InputBotInlineMessage; +inputBotInlineMessageMediaGeo#c1b15d65 flags:# geo_point:InputGeoPoint period:int reply_markup:flags.2?ReplyMarkup = InputBotInlineMessage; +inputBotInlineMessageMediaVenue#417bbf11 flags:# geo_point:InputGeoPoint title:string address:string provider:string venue_id:string venue_type:string reply_markup:flags.2?ReplyMarkup = InputBotInlineMessage; +inputBotInlineMessageMediaContact#2daf01a7 flags:# phone_number:string first_name:string last_name:string reply_markup:flags.2?ReplyMarkup = InputBotInlineMessage; +inputBotInlineMessageGame#4b425864 flags:# reply_markup:flags.2?ReplyMarkup = InputBotInlineMessage; + +inputBotInlineResult#88bf9319 flags:# id:string type:string title:flags.1?string description:flags.2?string url:flags.3?string thumb:flags.4?InputWebDocument content:flags.5?InputWebDocument send_message:InputBotInlineMessage = InputBotInlineResult; +inputBotInlineResultPhoto#a8d864a7 id:string type:string photo:InputPhoto send_message:InputBotInlineMessage = InputBotInlineResult; +inputBotInlineResultDocument#fff8fdc4 flags:# id:string type:string title:flags.1?string description:flags.2?string document:InputDocument send_message:InputBotInlineMessage = InputBotInlineResult; +inputBotInlineResultGame#4fa417f2 id:string short_name:string send_message:InputBotInlineMessage = InputBotInlineResult; + +botInlineMessageMediaAuto#764cf810 flags:# message:string entities:flags.1?Vector reply_markup:flags.2?ReplyMarkup = BotInlineMessage; +botInlineMessageText#8c7f65e2 flags:# no_webpage:flags.0?true message:string entities:flags.1?Vector reply_markup:flags.2?ReplyMarkup = BotInlineMessage; +botInlineMessageMediaGeo#b722de65 flags:# geo:GeoPoint period:int reply_markup:flags.2?ReplyMarkup = BotInlineMessage; +botInlineMessageMediaVenue#8a86659c flags:# geo:GeoPoint title:string address:string provider:string venue_id:string venue_type:string reply_markup:flags.2?ReplyMarkup = BotInlineMessage; +botInlineMessageMediaContact#35edb4d4 flags:# phone_number:string first_name:string last_name:string reply_markup:flags.2?ReplyMarkup = BotInlineMessage; + +botInlineResult#11965f3a flags:# id:string type:string title:flags.1?string description:flags.2?string url:flags.3?string thumb:flags.4?WebDocument content:flags.5?WebDocument send_message:BotInlineMessage = BotInlineResult; +botInlineMediaResult#17db940b flags:# id:string type:string photo:flags.0?Photo document:flags.1?Document title:flags.2?string description:flags.3?string send_message:BotInlineMessage = BotInlineResult; + +messages.botResults#947ca848 flags:# gallery:flags.0?true query_id:long next_offset:flags.1?string switch_pm:flags.2?InlineBotSwitchPM results:Vector cache_time:int users:Vector = messages.BotResults; + +exportedMessageLink#5dab1af4 link:string html:string = ExportedMessageLink; + +messageFwdHeader#559ebe6d flags:# from_id:flags.0?int date:int channel_id:flags.1?int channel_post:flags.2?int post_author:flags.3?string saved_from_peer:flags.4?Peer saved_from_msg_id:flags.4?int = MessageFwdHeader; + +auth.codeTypeSms#72a3158c = auth.CodeType; +auth.codeTypeCall#741cd3e3 = auth.CodeType; +auth.codeTypeFlashCall#226ccefb = auth.CodeType; + +auth.sentCodeTypeApp#3dbb5986 length:int = auth.SentCodeType; +auth.sentCodeTypeSms#c000bba2 length:int = auth.SentCodeType; +auth.sentCodeTypeCall#5353e5a7 length:int = auth.SentCodeType; +auth.sentCodeTypeFlashCall#ab03c6d9 pattern:string = auth.SentCodeType; + +messages.botCallbackAnswer#36585ea4 flags:# alert:flags.1?true has_url:flags.3?true native_ui:flags.4?true message:flags.0?string url:flags.2?string cache_time:int = messages.BotCallbackAnswer; + +messages.messageEditData#26b5dde6 flags:# caption:flags.0?true = messages.MessageEditData; + +inputBotInlineMessageID#890c3d89 dc_id:int id:long access_hash:long = InputBotInlineMessageID; + +inlineBotSwitchPM#3c20629f text:string start_param:string = InlineBotSwitchPM; + +messages.peerDialogs#3371c354 dialogs:Vector messages:Vector chats:Vector users:Vector state:updates.State = messages.PeerDialogs; + +topPeer#edcdc05b peer:Peer rating:double = TopPeer; + +topPeerCategoryBotsPM#ab661b5b = TopPeerCategory; +topPeerCategoryBotsInline#148677e2 = TopPeerCategory; +topPeerCategoryCorrespondents#637b7ed = TopPeerCategory; +topPeerCategoryGroups#bd17a14a = TopPeerCategory; +topPeerCategoryChannels#161d9628 = TopPeerCategory; +topPeerCategoryPhoneCalls#1e76a78c = TopPeerCategory; + +topPeerCategoryPeers#fb834291 category:TopPeerCategory count:int peers:Vector = TopPeerCategoryPeers; + +contacts.topPeersNotModified#de266ef5 = contacts.TopPeers; +contacts.topPeers#70b772a8 categories:Vector chats:Vector users:Vector = contacts.TopPeers; + +draftMessageEmpty#ba4baec5 = DraftMessage; +draftMessage#fd8e711f flags:# no_webpage:flags.1?true reply_to_msg_id:flags.0?int message:string entities:flags.3?Vector date:int = DraftMessage; + +messages.featuredStickersNotModified#4ede3cf = messages.FeaturedStickers; +messages.featuredStickers#f89d88e5 hash:int sets:Vector unread:Vector = messages.FeaturedStickers; + +messages.recentStickersNotModified#b17f890 = messages.RecentStickers; +messages.recentStickers#22f3afb3 hash:int packs:Vector stickers:Vector dates:Vector = messages.RecentStickers; + +messages.archivedStickers#4fcba9c8 count:int sets:Vector = messages.ArchivedStickers; + +messages.stickerSetInstallResultSuccess#38641628 = messages.StickerSetInstallResult; +messages.stickerSetInstallResultArchive#35e410a8 sets:Vector = messages.StickerSetInstallResult; + +stickerSetCovered#6410a5d2 set:StickerSet cover:Document = StickerSetCovered; +stickerSetMultiCovered#3407e51b set:StickerSet covers:Vector = StickerSetCovered; + +maskCoords#aed6dbb2 n:int x:double y:double zoom:double = MaskCoords; + +inputStickeredMediaPhoto#4a992157 id:InputPhoto = InputStickeredMedia; +inputStickeredMediaDocument#438865b id:InputDocument = InputStickeredMedia; + +game#bdf9653b flags:# id:long access_hash:long short_name:string title:string description:string photo:Photo document:flags.0?Document = Game; + +inputGameID#32c3e77 id:long access_hash:long = InputGame; +inputGameShortName#c331e80a bot_id:InputUser short_name:string = InputGame; + +highScore#58fffcd0 pos:int user_id:int score:int = HighScore; + +messages.highScores#9a3bfd99 scores:Vector users:Vector = messages.HighScores; + +textEmpty#dc3d824f = RichText; +textPlain#744694e0 text:string = RichText; +textBold#6724abc4 text:RichText = RichText; +textItalic#d912a59c text:RichText = RichText; +textUnderline#c12622c4 text:RichText = RichText; +textStrike#9bf8bb95 text:RichText = RichText; +textFixed#6c3f19b9 text:RichText = RichText; +textUrl#3c2884c1 text:RichText url:string webpage_id:long = RichText; +textEmail#de5a0dd6 text:RichText email:string = RichText; +textConcat#7e6260d7 texts:Vector = RichText; + +pageBlockUnsupported#13567e8a = PageBlock; +pageBlockTitle#70abc3fd text:RichText = PageBlock; +pageBlockSubtitle#8ffa9a1f text:RichText = PageBlock; +pageBlockAuthorDate#baafe5e0 author:RichText published_date:int = PageBlock; +pageBlockHeader#bfd064ec text:RichText = PageBlock; +pageBlockSubheader#f12bb6e1 text:RichText = PageBlock; +pageBlockParagraph#467a0766 text:RichText = PageBlock; +pageBlockPreformatted#c070d93e text:RichText language:string = PageBlock; +pageBlockFooter#48870999 text:RichText = PageBlock; +pageBlockDivider#db20b188 = PageBlock; +pageBlockAnchor#ce0d37b0 name:string = PageBlock; +pageBlockList#3a58c7f4 ordered:Bool items:Vector = PageBlock; +pageBlockBlockquote#263d7c26 text:RichText caption:RichText = PageBlock; +pageBlockPullquote#4f4456d3 text:RichText caption:RichText = PageBlock; +pageBlockPhoto#e9c69982 photo_id:long caption:RichText = PageBlock; +pageBlockVideo#d9d71866 flags:# autoplay:flags.0?true loop:flags.1?true video_id:long caption:RichText = PageBlock; +pageBlockCover#39f23300 cover:PageBlock = PageBlock; +pageBlockEmbed#cde200d1 flags:# full_width:flags.0?true allow_scrolling:flags.3?true url:flags.1?string html:flags.2?string poster_photo_id:flags.4?long w:int h:int caption:RichText = PageBlock; +pageBlockEmbedPost#292c7be9 url:string webpage_id:long author_photo_id:long author:string date:int blocks:Vector caption:RichText = PageBlock; +pageBlockCollage#8b31c4f items:Vector caption:RichText = PageBlock; +pageBlockSlideshow#130c8963 items:Vector caption:RichText = PageBlock; +pageBlockChannel#ef1751b5 channel:Chat = PageBlock; +pageBlockAudio#31b81a7f audio_id:long caption:RichText = PageBlock; + +pagePart#8e3f9ebe blocks:Vector photos:Vector documents:Vector = Page; +pageFull#556ec7aa blocks:Vector photos:Vector documents:Vector = Page; + +phoneCallDiscardReasonMissed#85e42301 = PhoneCallDiscardReason; +phoneCallDiscardReasonDisconnect#e095c1a0 = PhoneCallDiscardReason; +phoneCallDiscardReasonHangup#57adc690 = PhoneCallDiscardReason; +phoneCallDiscardReasonBusy#faf7e8c9 = PhoneCallDiscardReason; + +dataJSON#7d748d04 data:string = DataJSON; + +labeledPrice#cb296bf8 label:string amount:long = LabeledPrice; + +invoice#c30aa358 flags:# test:flags.0?true name_requested:flags.1?true phone_requested:flags.2?true email_requested:flags.3?true shipping_address_requested:flags.4?true flexible:flags.5?true phone_to_provider:flags.6?true email_to_provider:flags.7?true currency:string prices:Vector = Invoice; + +paymentCharge#ea02c27e id:string provider_charge_id:string = PaymentCharge; + +postAddress#1e8caaeb street_line1:string street_line2:string city:string state:string country_iso2:string post_code:string = PostAddress; + +paymentRequestedInfo#909c3f94 flags:# name:flags.0?string phone:flags.1?string email:flags.2?string shipping_address:flags.3?PostAddress = PaymentRequestedInfo; + +paymentSavedCredentialsCard#cdc27a1f id:string title:string = PaymentSavedCredentials; + +webDocument#c61acbd8 url:string access_hash:long size:int mime_type:string attributes:Vector dc_id:int = WebDocument; +webDocumentNoProxy#f9c8bcc6 url:string size:int mime_type:string attributes:Vector = WebDocument; + +inputWebDocument#9bed434d url:string size:int mime_type:string attributes:Vector = InputWebDocument; + +inputWebFileLocation#c239d686 url:string access_hash:long = InputWebFileLocation; + +upload.webFile#21e753bc size:int mime_type:string file_type:storage.FileType mtime:int bytes:bytes = upload.WebFile; + +payments.paymentForm#3f56aea3 flags:# can_save_credentials:flags.2?true password_missing:flags.3?true 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 = payments.PaymentForm; + +payments.validatedRequestedInfo#d1451883 flags:# id:flags.0?string shipping_options:flags.1?Vector = payments.ValidatedRequestedInfo; + +payments.paymentResult#4e5f810d updates:Updates = payments.PaymentResult; +payments.paymentVerficationNeeded#6b56b921 url:string = payments.PaymentResult; + +payments.paymentReceipt#500911e1 flags:# date:int bot_id:int invoice:Invoice provider_id:int info:flags.0?PaymentRequestedInfo shipping:flags.1?ShippingOption currency:string total_amount:long credentials_title:string users:Vector = payments.PaymentReceipt; + +payments.savedInfo#fb8fe43c flags:# has_saved_credentials:flags.1?true saved_info:flags.0?PaymentRequestedInfo = payments.SavedInfo; + +inputPaymentCredentialsSaved#c10eb2cf id:string tmp_password:bytes = InputPaymentCredentials; +inputPaymentCredentials#3417d728 flags:# save:flags.0?true data:DataJSON = InputPaymentCredentials; +inputPaymentCredentialsApplePay#aa1c39f payment_data:DataJSON = InputPaymentCredentials; +inputPaymentCredentialsAndroidPay#ca05d50e payment_token:DataJSON google_transaction_id:string = InputPaymentCredentials; + +account.tmpPassword#db64fd34 tmp_password:bytes valid_until:int = account.TmpPassword; + +shippingOption#b6213cdf id:string title:string prices:Vector = ShippingOption; + +inputStickerSetItem#ffa0a496 flags:# document:InputDocument emoji:string mask_coords:flags.0?MaskCoords = InputStickerSetItem; + +inputPhoneCall#1e36fded id:long access_hash:long = InputPhoneCall; + +phoneCallEmpty#5366c915 id:long = PhoneCall; +phoneCallWaiting#1b8f4ad1 flags:# id:long access_hash:long date:int admin_id:int participant_id:int protocol:PhoneCallProtocol receive_date:flags.0?int = PhoneCall; +phoneCallRequested#83761ce4 id:long access_hash:long date:int admin_id:int participant_id:int g_a_hash:bytes protocol:PhoneCallProtocol = PhoneCall; +phoneCallAccepted#6d003d3f id:long access_hash:long date:int admin_id:int participant_id:int g_b:bytes protocol:PhoneCallProtocol = PhoneCall; +phoneCall#ffe6ab67 id:long access_hash:long date:int admin_id:int participant_id:int g_a_or_b:bytes key_fingerprint:long protocol:PhoneCallProtocol connection:PhoneConnection alternative_connections:Vector start_date:int = PhoneCall; +phoneCallDiscarded#50ca4de1 flags:# need_rating:flags.2?true need_debug:flags.3?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; + +phoneCallProtocol#a2bb35cb flags:# udp_p2p:flags.0?true udp_reflector:flags.1?true min_layer:int max_layer:int = PhoneCallProtocol; + +phone.phoneCall#ec82e140 phone_call:PhoneCall users:Vector = phone.PhoneCall; + +upload.cdnFileReuploadNeeded#eea8e46e request_token:bytes = upload.CdnFile; +upload.cdnFile#a99fca4f bytes:bytes = upload.CdnFile; + +cdnPublicKey#c982eaba dc_id:int public_key:string = CdnPublicKey; + +cdnConfig#5725e40a public_keys:Vector = CdnConfig; + +langPackString#cad181f6 key:string value:string = LangPackString; +langPackStringPluralized#6c47ac9f flags:# key:string zero_value:flags.0?string one_value:flags.1?string two_value:flags.2?string few_value:flags.3?string many_value:flags.4?string other_value:string = LangPackString; +langPackStringDeleted#2979eeb2 key:string = LangPackString; + +langPackDifference#f385c1f6 lang_code:string from_version:int version:int strings:Vector = LangPackDifference; + +langPackLanguage#117698f1 name:string native_name:string lang_code:string = LangPackLanguage; + +channelAdminRights#5d7ceba5 flags:# change_info:flags.0?true post_messages:flags.1?true edit_messages:flags.2?true delete_messages:flags.3?true ban_users:flags.4?true invite_users:flags.5?true invite_link:flags.6?true pin_messages:flags.7?true add_admins:flags.9?true manage_call:flags.10?true = ChannelAdminRights; + +channelBannedRights#58cf4249 flags:# view_messages:flags.0?true send_messages:flags.1?true send_media:flags.2?true send_stickers:flags.3?true send_gifs:flags.4?true send_games:flags.5?true send_inline:flags.6?true embed_links:flags.7?true until_date:int = ChannelBannedRights; + +channelAdminLogEventActionChangeTitle#e6dfb825 prev_value:string new_value:string = ChannelAdminLogEventAction; +channelAdminLogEventActionChangeAbout#55188a2e prev_value:string new_value:string = ChannelAdminLogEventAction; +channelAdminLogEventActionChangeUsername#6a4afc38 prev_value:string new_value:string = ChannelAdminLogEventAction; +channelAdminLogEventActionChangePhoto#b82f55c3 prev_photo:ChatPhoto new_photo:ChatPhoto = ChannelAdminLogEventAction; +channelAdminLogEventActionToggleInvites#1b7907ae new_value:Bool = ChannelAdminLogEventAction; +channelAdminLogEventActionToggleSignatures#26ae0971 new_value:Bool = ChannelAdminLogEventAction; +channelAdminLogEventActionUpdatePinned#e9e82c18 message:Message = ChannelAdminLogEventAction; +channelAdminLogEventActionEditMessage#709b2405 prev_message:Message new_message:Message = ChannelAdminLogEventAction; +channelAdminLogEventActionDeleteMessage#42e047bb message:Message = ChannelAdminLogEventAction; +channelAdminLogEventActionParticipantJoin#183040d3 = ChannelAdminLogEventAction; +channelAdminLogEventActionParticipantLeave#f89777f2 = ChannelAdminLogEventAction; +channelAdminLogEventActionParticipantInvite#e31c34d8 participant:ChannelParticipant = ChannelAdminLogEventAction; +channelAdminLogEventActionParticipantToggleBan#e6d83d7e prev_participant:ChannelParticipant new_participant:ChannelParticipant = ChannelAdminLogEventAction; +channelAdminLogEventActionParticipantToggleAdmin#d5676710 prev_participant:ChannelParticipant new_participant:ChannelParticipant = ChannelAdminLogEventAction; +channelAdminLogEventActionChangeStickerSet#b1c3caa7 prev_stickerset:InputStickerSet new_stickerset:InputStickerSet = ChannelAdminLogEventAction; +channelAdminLogEventActionTogglePreHistoryHidden#5f5c95f1 new_value:Bool = ChannelAdminLogEventAction; + +channelAdminLogEvent#3b5a3e40 id:long date:int user_id:int action:ChannelAdminLogEventAction = ChannelAdminLogEvent; + +channels.adminLogResults#ed8af74d events:Vector chats:Vector users:Vector = channels.AdminLogResults; + +channelAdminLogEventsFilter#ea107ae4 flags:# join:flags.0?true leave:flags.1?true invite:flags.2?true ban:flags.3?true unban:flags.4?true kick:flags.5?true unkick:flags.6?true promote:flags.7?true demote:flags.8?true info:flags.9?true settings:flags.10?true pinned:flags.11?true edit:flags.12?true delete:flags.13?true = ChannelAdminLogEventsFilter; + +popularContact#5ce14175 client_id:long importers:int = PopularContact; + +messages.favedStickersNotModified#9e8fa6d3 = messages.FavedStickers; +messages.favedStickers#f37f2f16 hash:int packs:Vector stickers:Vector = messages.FavedStickers; + +recentMeUrlUnknown#46e1d13d url:string = RecentMeUrl; +recentMeUrlUser#8dbc3336 url:string user_id:int = RecentMeUrl; +recentMeUrlChat#a01b22f9 url:string chat_id:int = RecentMeUrl; +recentMeUrlChatInvite#eb49081d url:string chat_invite:ChatInvite = RecentMeUrl; +recentMeUrlStickerSet#bc0a57dc url:string set:StickerSetCovered = RecentMeUrl; + +help.recentMeUrls#e0310d7 urls:Vector chats:Vector users:Vector = help.RecentMeUrls; + +inputSingleMedia#1cc6e91f flags:# media:InputMedia random_id:long message:string entities:flags.0?Vector = 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; + +account.webAuthorizations#ed56c9fc authorizations:Vector users:Vector = account.WebAuthorizations; + +inputMessageID#a676a322 id:int = InputMessage; +inputMessageReplyTo#bad88395 id:int = InputMessage; +inputMessagePinned#86872538 = InputMessage; + +inputDialogPeer#fcaafeb7 peer:InputPeer = InputDialogPeer; + +dialogPeer#e56dbf05 peer:Peer = DialogPeer; + +messages.foundStickerSetsNotModified#d54b65d = messages.FoundStickerSets; +messages.foundStickerSets#5108d648 hash:int sets:Vector = messages.FoundStickerSets; + +fileHash#6242c773 offset:int limit:int hash:bytes = FileHash; + +inputClientProxy#75588b3f address:string port:int = InputClientProxy; + +help.proxyDataEmpty#e09e1fb8 expires:int = help.ProxyData; +help.proxyDataPromo#2bf7ee23 expires:int peer:Peer chats:Vector users:Vector = help.ProxyData; + +help.termsOfServiceUpdateEmpty#e3309f7f expires:int = help.TermsOfServiceUpdate; +help.termsOfServiceUpdate#28ecf961 expires:int terms_of_service:help.TermsOfService = help.TermsOfServiceUpdate; + +inputSecureFileUploaded#3334b0f0 id:long parts:int md5_checksum:string file_hash:bytes secret:bytes = InputSecureFile; +inputSecureFile#5367e5be id:long access_hash:long = InputSecureFile; + +secureFileEmpty#64199744 = SecureFile; +secureFile#e0277a62 id:long access_hash:long size:int dc_id:int date:int file_hash:bytes secret:bytes = SecureFile; + +secureData#8aeabec3 data:bytes data_hash:bytes secret:bytes = SecureData; + +securePlainPhone#7d6099dd phone:string = SecurePlainData; +securePlainEmail#21ec5a5f email:string = SecurePlainData; + +secureValueTypePersonalDetails#9d2a81e3 = SecureValueType; +secureValueTypePassport#3dac6a00 = SecureValueType; +secureValueTypeDriverLicense#6e425c4 = SecureValueType; +secureValueTypeIdentityCard#a0d0744b = SecureValueType; +secureValueTypeInternalPassport#99a48f23 = SecureValueType; +secureValueTypeAddress#cbe31e26 = SecureValueType; +secureValueTypeUtilityBill#fc36954e = SecureValueType; +secureValueTypeBankStatement#89137c0d = SecureValueType; +secureValueTypeRentalAgreement#8b883488 = SecureValueType; +secureValueTypePassportRegistration#99e3806a = SecureValueType; +secureValueTypeTemporaryRegistration#ea02ec33 = SecureValueType; +secureValueTypePhone#b320aadb = SecureValueType; +secureValueTypeEmail#8e3ca7ee = SecureValueType; + +secureValue#b4b4b699 flags:# type:SecureValueType data:flags.0?SecureData front_side:flags.1?SecureFile reverse_side:flags.2?SecureFile selfie:flags.3?SecureFile files:flags.4?Vector plain_data:flags.5?SecurePlainData hash:bytes = SecureValue; + +inputSecureValue#67872e8 flags:# type:SecureValueType data:flags.0?SecureData front_side:flags.1?InputSecureFile reverse_side:flags.2?InputSecureFile selfie:flags.3?InputSecureFile files:flags.4?Vector plain_data:flags.5?SecurePlainData = InputSecureValue; + +secureValueHash#ed1ecdb0 type:SecureValueType hash:bytes = SecureValueHash; + +secureValueErrorData#e8a40bd9 type:SecureValueType data_hash:bytes field:string text:string = SecureValueError; +secureValueErrorFrontSide#be3dfa type:SecureValueType file_hash:bytes text:string = SecureValueError; +secureValueErrorReverseSide#868a2aa5 type:SecureValueType file_hash:bytes text:string = SecureValueError; +secureValueErrorSelfie#e537ced6 type:SecureValueType file_hash:bytes text:string = SecureValueError; +secureValueErrorFile#7a700873 type:SecureValueType file_hash:bytes text:string = SecureValueError; +secureValueErrorFiles#666220e9 type:SecureValueType file_hash:Vector text:string = SecureValueError; + +secureCredentialsEncrypted#33f0ea47 data:bytes hash:bytes secret:bytes = SecureCredentialsEncrypted; + +account.authorizationForm#cb976d53 flags:# selfie_required:flags.1?true required_types:Vector values:Vector errors:Vector users:Vector privacy_policy_url:flags.0?string = account.AuthorizationForm; + +account.sentEmailCode#811f854f email_pattern:string length:int = account.SentEmailCode; + +help.deepLinkInfoEmpty#66afa166 = help.DeepLinkInfo; +help.deepLinkInfo#6a4ee832 flags:# update_app:flags.0?true message:string entities:flags.1?Vector = help.DeepLinkInfo; + +savedPhoneContact#1142bd56 phone:string first_name:string last_name:string date:int = SavedContact; + +account.takeout#4dba4501 id:long = account.Takeout; + +---functions--- + +invokeAfterMsg#cb9f372d {X:Type} msg_id:long query:!X = X; +invokeAfterMsgs#3dc4b4f0 {X:Type} msg_ids:Vector query:!X = X; +initConnection#785188b8 {X:Type} flags:# api_id:int device_model:string system_version:string app_version:string system_lang_code:string lang_pack:string lang_code:string proxy:flags.0?InputClientProxy query:!X = X; +invokeWithLayer#da9b0d0d {X:Type} layer:int query:!X = X; +invokeWithoutUpdates#bf9459b7 {X:Type} query:!X = X; +invokeWithMessagesRange#365275f2 {X:Type} range:MessageRange query:!X = X; +invokeWithTakeout#aca9fd2e {X:Type} takeout_id:long query:!X = X; + +auth.sendCode#86aef0ec flags:# allow_flashcall:flags.0?true phone_number:string current_number:flags.0?Bool api_id:int api_hash:string = auth.SentCode; +auth.signUp#1b067634 phone_number:string phone_code_hash:string phone_code:string first_name:string last_name:string = auth.Authorization; +auth.signIn#bcd51581 phone_number:string phone_code_hash:string phone_code:string = auth.Authorization; +auth.logOut#5717da40 = Bool; +auth.resetAuthorizations#9fab0d1a = Bool; +auth.exportAuthorization#e5bfffcd dc_id:int = auth.ExportedAuthorization; +auth.importAuthorization#e3ef9613 id:int bytes:bytes = auth.Authorization; +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.checkPassword#a63011e password_hash:bytes = auth.Authorization; +auth.requestPasswordRecovery#d897bc66 = auth.PasswordRecovery; +auth.recoverPassword#4ea56e92 code:string = auth.Authorization; +auth.resendCode#3ef1a9bf phone_number:string phone_code_hash:string = auth.SentCode; +auth.cancelCode#1f040578 phone_number:string phone_code_hash:string = Bool; +auth.dropTempAuthKeys#8e48a188 except_auth_keys:Vector = Bool; + +account.registerDevice#5cbea590 token_type:int token:string app_sandbox:Bool secret:bytes other_uids:Vector = Bool; +account.unregisterDevice#3076c4bf token_type:int token:string other_uids:Vector = Bool; +account.updateNotifySettings#84be5b93 peer:InputNotifyPeer settings:InputPeerNotifySettings = Bool; +account.getNotifySettings#12b3ad31 peer:InputNotifyPeer = PeerNotifySettings; +account.resetNotifySettings#db7e1747 = Bool; +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.getWallPapers#c04cfac2 = Vector; +account.reportPeer#ae189d5f peer:InputPeer reason:ReportReason = Bool; +account.checkUsername#2714d86c username:string = Bool; +account.updateUsername#3e0bdd7c username:string = User; +account.getPrivacy#dadbc950 key:InputPrivacyKey = account.PrivacyRules; +account.setPrivacy#c9f81ce8 key:InputPrivacyKey rules:Vector = account.PrivacyRules; +account.deleteAccount#418d4e0b reason:string = Bool; +account.getAccountTTL#8fc711d = AccountDaysTTL; +account.setAccountTTL#2442485e ttl:AccountDaysTTL = Bool; +account.sendChangePhoneCode#8e57deb flags:# allow_flashcall:flags.0?true phone_number:string current_number:flags.0?Bool = auth.SentCode; +account.changePhone#70c32edb phone_number:string phone_code_hash:string phone_code:string = User; +account.updateDeviceLocked#38df3532 period:int = Bool; +account.getAuthorizations#e320c158 = account.Authorizations; +account.resetAuthorization#df77f3bc hash:long = Bool; +account.getPassword#548a30f5 = account.Password; +account.getPasswordSettings#bc8d11bb current_password_hash:bytes = account.PasswordSettings; +account.updatePasswordSettings#fa7c4b86 current_password_hash:bytes new_settings:account.PasswordInputSettings = Bool; +account.sendConfirmPhoneCode#1516d7bd flags:# allow_flashcall:flags.0?true hash:string current_number:flags.0?Bool = auth.SentCode; +account.confirmPhone#5f2178c3 phone_code_hash:string phone_code:string = Bool; +account.getTmpPassword#4a82327e password_hash:bytes period:int = account.TmpPassword; +account.getWebAuthorizations#182e6d6f = account.WebAuthorizations; +account.resetWebAuthorization#2d01b9ef hash:long = Bool; +account.resetWebAuthorizations#682d2594 = Bool; +account.getAllSecureValues#b288bc7d = Vector; +account.getSecureValue#73665bc2 types:Vector = Vector; +account.saveSecureValue#899fe31d value:InputSecureValue secure_secret_id:long = SecureValue; +account.deleteSecureValue#b880bc4b types:Vector = Bool; +account.getAuthorizationForm#b86ba8e1 bot_id:int scope:string public_key:string = account.AuthorizationForm; +account.acceptAuthorization#e7027c94 bot_id:int scope:string public_key:string value_hashes:Vector credentials:SecureCredentialsEncrypted = Bool; +account.sendVerifyPhoneCode#823380b4 flags:# allow_flashcall:flags.0?true phone_number:string current_number:flags.0?Bool = auth.SentCode; +account.verifyPhone#4dd3a7f6 phone_number:string phone_code_hash:string phone_code:string = Bool; +account.sendVerifyEmailCode#7011509f email:string = account.SentEmailCode; +account.verifyEmail#ecba39db email:string code:string = Bool; +account.initTakeoutSession#f05b4804 flags:# contacts:flags.0?true message_users:flags.1?true message_chats:flags.2?true message_megagroups:flags.3?true message_channels:flags.4?true files:flags.5?true file_max_size:flags.5?int = account.Takeout; +account.finishTakeoutSession#1d2652ee flags:# success:flags.0?true = Bool; + +users.getUsers#d91a548 id:Vector = Vector; +users.getFullUser#ca30a5b1 id:InputUser = UserFull; +users.setSecureValueErrors#90c894b5 id:InputUser errors:Vector = Bool; + +contacts.getStatuses#c4a353ee = Vector; +contacts.getContacts#c023849f hash:int = contacts.Contacts; +contacts.importContacts#2c800be5 contacts:Vector = contacts.ImportedContacts; +contacts.deleteContact#8e953744 id:InputUser = contacts.Link; +contacts.deleteContacts#59ab389e id:Vector = Bool; +contacts.block#332b49fc id:InputUser = Bool; +contacts.unblock#e54100bd id:InputUser = Bool; +contacts.getBlocked#f57c350f offset:int limit:int = contacts.Blocked; +contacts.exportCard#84e53737 = Vector; +contacts.importCard#4fe196fe export_card:Vector = User; +contacts.search#11f812d8 q:string limit:int = contacts.Found; +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 groups:flags.10?true channels:flags.15?true offset:int limit:int hash:int = contacts.TopPeers; +contacts.resetTopPeerRating#1ae373ac category:TopPeerCategory peer:InputPeer = Bool; +contacts.resetSaved#879537f1 = Bool; +contacts.getSaved#82f1e39f = Vector; + +messages.getMessages#63c66506 id:Vector = messages.Messages; +messages.getDialogs#191ba9c5 flags:# exclude_pinned:flags.0?true offset_date:int offset_id:int offset_peer:InputPeer limit:int = 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.search#8614ef68 flags:# peer:InputPeer q:string from_id:flags.0?InputUser 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.readHistory#e306d3a peer:InputPeer max_id:int = messages.AffectedMessages; +messages.deleteHistory#1c015b09 flags:# just_clear:flags.0?true peer:InputPeer max_id:int = messages.AffectedHistory; +messages.deleteMessages#e58e95d2 flags:# revoke:flags.0?true id:Vector = messages.AffectedMessages; +messages.receivedMessages#5a954c0 max_id:int = Vector; +messages.setTyping#a3825e50 peer:InputPeer action:SendMessageAction = Bool; +messages.sendMessage#fa88427a flags:# no_webpage:flags.1?true silent:flags.5?true background:flags.6?true clear_draft:flags.7?true peer:InputPeer reply_to_msg_id:flags.0?int message:string random_id:long reply_markup:flags.2?ReplyMarkup entities:flags.3?Vector = Updates; +messages.sendMedia#b8d1262b flags:# silent:flags.5?true background:flags.6?true clear_draft:flags.7?true peer:InputPeer reply_to_msg_id:flags.0?int media:InputMedia message:string random_id:long reply_markup:flags.2?ReplyMarkup entities:flags.3?Vector = Updates; +messages.forwardMessages#708e0195 flags:# silent:flags.5?true background:flags.6?true with_my_score:flags.8?true grouped:flags.9?true from_peer:InputPeer id:Vector random_id:Vector to_peer:InputPeer = Updates; +messages.reportSpam#cf1592db peer:InputPeer = Bool; +messages.hideReportSpam#a8f1709b peer:InputPeer = Bool; +messages.getPeerSettings#3672e09c peer:InputPeer = PeerSettings; +messages.report#bd82b658 peer:InputPeer id:Vector reason:ReportReason = Bool; +messages.getChats#3c6aa187 id:Vector = messages.Chats; +messages.getFullChat#3b831c66 chat_id:int = messages.ChatFull; +messages.editChatTitle#dc452855 chat_id:int title:string = Updates; +messages.editChatPhoto#ca4c79d8 chat_id:int photo:InputChatPhoto = Updates; +messages.addChatUser#f9a0aa09 chat_id:int user_id:InputUser fwd_limit:int = Updates; +messages.deleteChatUser#e0611f16 chat_id:int user_id:InputUser = Updates; +messages.createChat#9cb126e users:Vector title:string = Updates; +messages.getDhConfig#26cf8950 version:int random_length:int = messages.DhConfig; +messages.requestEncryption#f64daf43 user_id:InputUser random_id:int g_a:bytes = EncryptedChat; +messages.acceptEncryption#3dbc0415 peer:InputEncryptedChat g_b:bytes key_fingerprint:long = EncryptedChat; +messages.discardEncryption#edd923c5 chat_id:int = Bool; +messages.setEncryptedTyping#791451ed peer:InputEncryptedChat typing:Bool = Bool; +messages.readEncryptedHistory#7f4b690a peer:InputEncryptedChat max_date:int = Bool; +messages.sendEncrypted#a9776773 peer:InputEncryptedChat random_id:long data:bytes = messages.SentEncryptedMessage; +messages.sendEncryptedFile#9a901b66 peer:InputEncryptedChat random_id:long data:bytes file:InputEncryptedFile = messages.SentEncryptedMessage; +messages.sendEncryptedService#32d439a4 peer:InputEncryptedChat random_id:long data:bytes = messages.SentEncryptedMessage; +messages.receivedQueue#55a5bb66 max_qts:int = Vector; +messages.reportEncryptedSpam#4b0c8c0f peer:InputEncryptedChat = Bool; +messages.readMessageContents#36a73f77 id:Vector = messages.AffectedMessages; +messages.getStickers#43d4f2c emoticon:string hash:int = messages.Stickers; +messages.getAllStickers#1c9618b1 hash:int = messages.AllStickers; +messages.getWebPagePreview#8b68b0cc flags:# message:string entities:flags.3?Vector = MessageMedia; +messages.exportChatInvite#7d885289 chat_id:int = ExportedChatInvite; +messages.checkChatInvite#3eadb1bb hash:string = ChatInvite; +messages.importChatInvite#6c50051c hash:string = Updates; +messages.getStickerSet#2619a90e stickerset:InputStickerSet = messages.StickerSet; +messages.installStickerSet#c78fe460 stickerset:InputStickerSet archived:Bool = messages.StickerSetInstallResult; +messages.uninstallStickerSet#f96e55de stickerset:InputStickerSet = Bool; +messages.startBot#e6df7378 bot:InputUser peer:InputPeer random_id:long start_param:string = Updates; +messages.getMessagesViews#c4c8a55d peer:InputPeer id:Vector increment:Bool = Vector; +messages.toggleChatAdmins#ec8bd9e1 chat_id:int enabled:Bool = Updates; +messages.editChatAdmin#a9e69f2e chat_id:int user_id:InputUser is_admin:Bool = Bool; +messages.migrateChat#15a3b8e3 chat_id:int = Updates; +messages.searchGlobal#9e3cacb0 q:string offset_date:int offset_peer:InputPeer offset_id:int limit:int = messages.Messages; +messages.reorderStickerSets#78337739 flags:# masks:flags.0?true order:Vector = Bool; +messages.getDocumentByHash#338e2464 sha256:bytes size:int mime_type:string = Document; +messages.searchGifs#bf9a776b q:string offset:int = messages.FoundGifs; +messages.getSavedGifs#83bf3d52 hash:int = messages.SavedGifs; +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.setInlineBotResults#eb5ea206 flags:# gallery:flags.0?true private:flags.1?true query_id:long results:Vector cache_time:int next_offset:flags.2?string switch_pm:flags.3?InlineBotSwitchPM = Bool; +messages.sendInlineBotResult#b16e06fe flags:# silent:flags.5?true background:flags.6?true clear_draft:flags.7?true peer:InputPeer reply_to_msg_id:flags.0?int random_id:long query_id:long id:string = Updates; +messages.getMessageEditData#fda68d36 peer:InputPeer id:int = messages.MessageEditData; +messages.editMessage#c000e4c8 flags:# no_webpage:flags.1?true stop_geo_live:flags.12?true peer:InputPeer id:int message:flags.11?string media:flags.14?InputMedia reply_markup:flags.2?ReplyMarkup entities:flags.3?Vector geo_point:flags.13?InputGeoPoint = Updates; +messages.editInlineBotMessage#adc3e828 flags:# no_webpage:flags.1?true stop_geo_live:flags.12?true id:InputBotInlineMessageID message:flags.11?string media:flags.14?InputMedia reply_markup:flags.2?ReplyMarkup entities:flags.3?Vector geo_point:flags.13?InputGeoPoint = Bool; +messages.getBotCallbackAnswer#810a9fec flags:# game:flags.1?true peer:InputPeer msg_id:int data:flags.0?bytes = messages.BotCallbackAnswer; +messages.setBotCallbackAnswer#d58f130a flags:# alert:flags.1?true query_id:long message:flags.0?string url:flags.2?string cache_time:int = Bool; +messages.getPeerDialogs#e470bcfd peers:Vector = 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 = Bool; +messages.getAllDrafts#6a3f8d65 = Updates; +messages.getFeaturedStickers#2dacca4f hash:int = messages.FeaturedStickers; +messages.readFeaturedStickers#5b118126 id:Vector = Bool; +messages.getRecentStickers#5ea192c9 flags:# attached:flags.0?true hash:int = messages.RecentStickers; +messages.saveRecentSticker#392718f8 flags:# attached:flags.0?true id:InputDocument unsave:Bool = 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.getMaskStickers#65b8c79f hash:int = messages.AllStickers; +messages.getAttachedStickers#cc5b67cc media:InputStickeredMedia = Vector; +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.getGameHighScores#e822649d peer:InputPeer id:int 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.getAllChats#eba80ff0 except_ids:Vector = messages.Chats; +messages.getWebPage#32ca8f91 url:string hash:int = WebPage; +messages.toggleDialogPin#a731e257 flags:# pinned:flags.0?true peer:InputDialogPeer = Bool; +messages.reorderPinnedDialogs#5b51d63f flags:# force:flags.0?true order:Vector = Bool; +messages.getPinnedDialogs#e254d64e = messages.PeerDialogs; +messages.setBotShippingResults#e5f672fa flags:# query_id:long error:flags.0?string shipping_options:flags.1?Vector = 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.sendScreenshotNotification#c97df020 peer:InputPeer reply_to_msg_id:int random_id:long = Updates; +messages.getFavedStickers#21ce0b0e hash:int = messages.FavedStickers; +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.readMentions#f0189d3 peer:InputPeer = messages.AffectedHistory; +messages.getRecentLocations#bbc45b09 peer:InputPeer limit:int hash:int = messages.Messages; +messages.sendMultiMedia#2095512f 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 = Updates; +messages.uploadEncryptedFile#5057c497 peer:InputEncryptedChat file:InputEncryptedFile = EncryptedFile; +messages.searchStickerSets#c2b7d08b flags:# exclude_featured:flags.0?true q:string hash:int = messages.FoundStickerSets; +messages.getSplitRanges#1cff7e08 = Vector; + +updates.getState#edd4882a = updates.State; +updates.getDifference#25939651 flags:# pts:int pts_total_limit:flags.0?int date:int qts:int = updates.Difference; +updates.getChannelDifference#3173d78 flags:# force:flags.0?true channel:InputChannel filter:ChannelMessagesFilter pts:int limit:int = updates.ChannelDifference; + +photos.updateProfilePhoto#f0bb5152 id:InputPhoto = UserProfilePhoto; +photos.uploadProfilePhoto#4f32c098 file:InputFile = photos.Photo; +photos.deletePhotos#87cf7f2f id:Vector = Vector; +photos.getUserPhotos#91cd32a8 user_id:InputUser offset:int max_id:long limit:int = photos.Photos; + +upload.saveFilePart#b304a621 file_id:long file_part:int bytes:bytes = Bool; +upload.getFile#e3a6cfb5 location:InputFileLocation offset:int limit:int = upload.File; +upload.saveBigFilePart#de7b673d file_id:long file_part:int file_total_parts:int bytes:bytes = Bool; +upload.getWebFile#24e6818d location:InputWebFileLocation offset:int limit:int = upload.WebFile; +upload.getCdnFile#2000bcc3 file_token:bytes offset:int limit:int = upload.CdnFile; +upload.reuploadCdnFile#9b2754a8 file_token:bytes request_token:bytes = Vector; +upload.getCdnFileHashes#4da54231 file_token:bytes offset:int = Vector; +upload.getFileHashes#c7025931 location:InputFileLocation offset:int = Vector; + +help.getConfig#c4f9186b = Config; +help.getNearestDc#1fb33026 = NearestDc; +help.getAppUpdate#ae2de196 = help.AppUpdate; +help.saveAppLog#6f02f748 events:Vector = Bool; +help.getInviteText#4d392343 = help.InviteText; +help.getSupport#9cdf08cd = help.Support; +help.getAppChangelog#9010ef6f prev_app_version:string = Updates; +help.setBotUpdatesStatus#ec22cfcd pending_updates_count:int message:string = Bool; +help.getCdnConfig#52029342 = CdnConfig; +help.getRecentMeUrls#3dc0f114 referer:string = help.RecentMeUrls; +help.getProxyData#3d7758e1 = help.ProxyData; +help.getTermsOfServiceUpdate#2ca51fd1 = help.TermsOfServiceUpdate; +help.acceptTermsOfService#ee72f79a id:DataJSON = Bool; +help.getDeepLinkInfo#3fedc75f path:string = help.DeepLinkInfo; + +channels.readHistory#cc104937 channel:InputChannel max_id:int = Bool; +channels.deleteMessages#84c1fd4e channel:InputChannel id:Vector = messages.AffectedMessages; +channels.deleteUserHistory#d10dd71b channel:InputChannel user_id:InputUser = messages.AffectedHistory; +channels.reportSpam#fe087810 channel:InputChannel user_id:InputUser id:Vector = Bool; +channels.getMessages#ad8c9a23 channel:InputChannel id:Vector = messages.Messages; +channels.getParticipants#123e05e9 channel:InputChannel filter:ChannelParticipantsFilter offset:int limit:int hash:int = channels.ChannelParticipants; +channels.getParticipant#546dd7a6 channel:InputChannel user_id:InputUser = channels.ChannelParticipant; +channels.getChannels#a7f6bbb id:Vector = messages.Chats; +channels.getFullChannel#8736a09 channel:InputChannel = messages.ChatFull; +channels.createChannel#f4893d7f flags:# broadcast:flags.0?true megagroup:flags.1?true title:string about:string = Updates; +channels.editAbout#13e27f1e channel:InputChannel about:string = Bool; +channels.editAdmin#20b88214 channel:InputChannel user_id:InputUser admin_rights:ChannelAdminRights = Updates; +channels.editTitle#566decd0 channel:InputChannel title:string = Updates; +channels.editPhoto#f12e57c9 channel:InputChannel photo:InputChatPhoto = Updates; +channels.checkUsername#10e6bd2c channel:InputChannel username:string = Bool; +channels.updateUsername#3514b3de channel:InputChannel username:string = Bool; +channels.joinChannel#24b524c5 channel:InputChannel = Updates; +channels.leaveChannel#f836aa95 channel:InputChannel = Updates; +channels.inviteToChannel#199f3a6c channel:InputChannel users:Vector = Updates; +channels.exportInvite#c7560885 channel:InputChannel = ExportedChatInvite; +channels.deleteChannel#c0111fe3 channel:InputChannel = Updates; +channels.toggleInvites#49609307 channel:InputChannel enabled:Bool = Updates; +channels.exportMessageLink#ceb77163 channel:InputChannel id:int grouped:Bool = ExportedMessageLink; +channels.toggleSignatures#1f69b606 channel:InputChannel enabled:Bool = Updates; +channels.updatePinnedMessage#a72ded52 flags:# silent:flags.0?true channel:InputChannel id:int = Updates; +channels.getAdminedPublicChannels#8d8d82d7 = messages.Chats; +channels.editBanned#bfd915cd channel:InputChannel user_id:InputUser banned_rights:ChannelBannedRights = Updates; +channels.getAdminLog#33ddf480 flags:# channel:InputChannel q:string events_filter:flags.0?ChannelAdminLogEventsFilter admins:flags.1?Vector max_id:long min_id:long limit:int = channels.AdminLogResults; +channels.setStickers#ea8ca4f9 channel:InputChannel stickerset:InputStickerSet = Bool; +channels.readMessageContents#eab5dc38 channel:InputChannel id:Vector = Bool; +channels.deleteHistory#af369d42 channel:InputChannel max_id:int = Bool; +channels.togglePreHistoryHidden#eabbb94c channel:InputChannel enabled:Bool = Updates; +channels.getLeftChannels#8341ecc0 offset:int = messages.Chats; + +bots.sendCustomRequest#aa2769ed custom_method:string params:DataJSON = DataJSON; +bots.answerWebhookJSONQuery#e6213f4d query_id:long data:DataJSON = Bool; + +payments.getPaymentForm#99f09745 msg_id:int = payments.PaymentForm; +payments.getPaymentReceipt#a092a980 msg_id:int = payments.PaymentReceipt; +payments.validateRequestedInfo#770a8e74 flags:# save:flags.0?true msg_id:int info:PaymentRequestedInfo = payments.ValidatedRequestedInfo; +payments.sendPaymentForm#2b8879b3 flags:# msg_id:int requested_info_id:flags.0?string shipping_option_id:flags.1?string credentials:InputPaymentCredentials = payments.PaymentResult; +payments.getSavedInfo#227d824b = payments.SavedInfo; +payments.clearSavedInfo#d83d70c1 flags:# credentials:flags.0?true info:flags.1?true = Bool; + +stickers.createStickerSet#9bd86e6a flags:# masks:flags.0?true user_id:InputUser title:string short_name:string stickers:Vector = messages.StickerSet; +stickers.removeStickerFromSet#f7760f51 sticker:InputDocument = messages.StickerSet; +stickers.changeStickerPosition#ffb6d4ca sticker:InputDocument position:int = messages.StickerSet; +stickers.addStickerToSet#8653febe stickerset:InputStickerSet sticker:InputStickerSetItem = messages.StickerSet; + +phone.getCallConfig#55451fa9 = DataJSON; +phone.requestCall#5b95b3d4 user_id:InputUser random_id:int g_a_hash:bytes protocol:PhoneCallProtocol = phone.PhoneCall; +phone.acceptCall#3bd2b4a0 peer:InputPhoneCall g_b:bytes protocol:PhoneCallProtocol = phone.PhoneCall; +phone.confirmCall#2efe1722 peer:InputPhoneCall g_a:bytes key_fingerprint:long protocol:PhoneCallProtocol = phone.PhoneCall; +phone.receivedCall#17d54f61 peer:InputPhoneCall = Bool; +phone.discardCall#78d413a6 peer:InputPhoneCall duration:int reason:PhoneCallDiscardReason connection_id:long = Updates; +phone.setCallRating#1c536a34 peer:InputPhoneCall rating:int comment:string = Updates; +phone.saveCallDebug#277add7e peer:InputPhoneCall debug:DataJSON = Bool; + +langpack.getLangPack#9ab5c58e lang_code:string = LangPackDifference; +langpack.getStrings#2e1ee318 lang_code:string keys:Vector = Vector; +langpack.getDifference#b2e4d7d from_version:int = LangPackDifference; +langpack.getLanguages#800fd57d = Vector; + +// LAYER 81 diff --git a/src/danog/MadelineProto/Wrappers/ApiStart.php b/src/danog/MadelineProto/Wrappers/ApiStart.php index 4c8a05a4..1ba1a7fa 100644 --- a/src/danog/MadelineProto/Wrappers/ApiStart.php +++ b/src/danog/MadelineProto/Wrappers/ApiStart.php @@ -33,7 +33,9 @@ trait ApiStart return $line; } } - if (strpos($res = readline('You did not define a valid API ID/API hash. Do you want to define it now manually, or automatically? (m/a): '), 'm') !== false) { + echo 'You did not define a valid API ID/API hash. Do you want to define it now manually, or automatically? (m/a) +Note that you can also provide the API parameters directly in the code using the settings: https://docs.madelineproto.xyz/docs/SETTINGS.html#settingsapp_infoapi_id'.PHP_EOL; + if (strpos($res = readline('Your choice (m/a): '), 'm') !== false) { echo '1) Login to my.telegram.org 2) Go to API development tools 3) App title: your app\'s name, can be anything diff --git a/src/danog/MadelineProto/Wrappers/ApiTemplates.php b/src/danog/MadelineProto/Wrappers/ApiTemplates.php index 37999f75..4e237ad6 100644 --- a/src/danog/MadelineProto/Wrappers/ApiTemplates.php +++ b/src/danog/MadelineProto/Wrappers/ApiTemplates.php @@ -67,7 +67,7 @@ trait ApiTemplates echo $this->web_api_echo_template('Enter your phone number
'.$message.'', ''); } } else { - echo $this->web_api_echo_template('Do you want to enter the API id and the API hash manually or automatically?
'.$message.'', ''); + echo $this->web_api_echo_template('Do you want to enter the API id and the API hash manually or automatically?
Note that you can also provide it directly in the code using the settings.'.$message.'', ''); } } else { echo $this->web_api_echo_template('Enter your code
'.$message.'', ''); diff --git a/src/danog/MadelineProto/Wrappers/Login.php b/src/danog/MadelineProto/Wrappers/Login.php index 282486bf..7ec13432 100644 --- a/src/danog/MadelineProto/Wrappers/Login.php +++ b/src/danog/MadelineProto/Wrappers/Login.php @@ -31,6 +31,7 @@ trait Login $this->chats = []; $this->users = []; $this->state = []; + $this->tos = ['expires' => 0, 'accepted' => true]; if (!$this->method_call('auth.logOut', [], ['datacenter' => $this->datacenter->curdc])) { throw new \danog\MadelineProto\Exception(\danog\MadelineProto\Lang::$current_lang['logout_error']); } diff --git a/src/danog/MadelineProto/Wrappers/TOS.php b/src/danog/MadelineProto/Wrappers/TOS.php new file mode 100644 index 00000000..fcfd4e79 --- /dev/null +++ b/src/danog/MadelineProto/Wrappers/TOS.php @@ -0,0 +1,55 @@ +. +*/ + +namespace danog\MadelineProto\Wrappers; + +/** + * Manages logging in and out. + */ +trait TOS +{ + public function check_tos() + { + if ($this->authorized === self::LOGGED_IN) { + if ($this->tos['expires'] < time()) { + $this->logger->logger('Fetching TOS...'); + $this->tos = $this->method_call('help.getTermsOfServiceUpdate', [], ['datacenter' => $this->datacenter->curdc]); + $this->tos['accepted'] = $this->tos['_'] === 'help.termsOfServiceUpdateEmpty'; + } + + if (!$this->tos['accepted']) { + $this->logger->logger('Telegram has updated their Terms Of Service', \danog\MadelineProto\Logger::ERROR); + $this->logger->logger('Accept the TOS before proceeding by calling $MadelineProto->accept_tos().', \danog\MadelineProto\Logger::ERROR); + $this->logger->logger('You can also decline the TOS by calling $MadelineProto->decline_tos().', \danog\MadelineProto\Logger::ERROR); + $this->logger->logger('By declining the TOS, the currently logged in account will be PERMANENTLY DELETED.', \danog\MadelineProto\Logger::FATAL_ERROR); + $this->logger->logger('Read the following TOS very carefully: ', \danog\MadelineProto\Logger::ERROR); + $this->logger->logger($this->tos); + throw new \danog\MadelineProto\Exception('TOS action required, check the logs', 0, null, 'MadelineProto', 1); + } + } + } + public function accept_tos() + { + $this->tos['accepted'] = $this->method_call('help.acceptTermsOfService', ['id' => $this->tos['terms_of_service']['id']], ['datacenter' => $this->datacenter->curdc]); + if ($this->tos['accepted']) { + $this->logger->logger('TOS accepted successfully'); + } else { + throw new \danog\MadelineProto\Exception('An error occurred while accepting the TOS'); + } + } + public function decline_tos() + { + $this->method_call('account.deleteAccount', ['reason' => 'Decline ToS update'], ['datacenter' => $this->datacenter->curdc]); + $this->logout(); + } +} diff --git a/tests/testing.php b/tests/testing.php index 837f4c60..2b5d8e7e 100755 --- a/tests/testing.php +++ b/tests/testing.php @@ -45,6 +45,14 @@ echo 'Loading MadelineProto...'.PHP_EOL; $MadelineProto = new \danog\MadelineProto\API(getcwd().'/testing.madeline', $settings); +try { + $MadelineProto->get_self(); +} catch (\danog\MadelineProto\Exception $e) { + if ($e->getMessage() === 'TOS action required, check the logs') { + $MadelineProto->accept_tos(); + } +} + /* * If this session is not logged in, login */ diff --git a/translator.php b/translator.php index f353bf84..8c0339cf 100644 --- a/translator.php +++ b/translator.php @@ -34,6 +34,7 @@ if (!isset(\danog\MadelineProto\Lang::$lang[$lang_code])) { } $count = count(\danog\MadelineProto\Lang::$lang[$lang_code]); $curcount = 0; +ksort(\danog\MadelineProto\Lang::$current_lang); foreach (\danog\MadelineProto\Lang::$current_lang as $key => $value) { if (!isset(\danog\MadelineProto\Lang::$lang[$lang_code][$key])) { \danog\MadelineProto\Lang::$lang[$lang_code][$key] = $value;