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