From df24fa46115af01c5e8274ff8f3b6446a51a1f4c Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Wed, 26 Dec 2018 20:51:14 +0100 Subject: [PATCH] Merge alpha into master (async, huge bugfixes and more) (#546) * Implement async and lots of bugfixes * Implement more async * Implement async, implement bugfixes for the connection module, for the datacenter module, huge bugfixes, huge perfomance improvements, media DCs for https, advanced selecting, custom var_dump, totally rewritten IOLoop and response mechanism, promises, improvements to the TL parser, custom mb_substr * Apply fixes from StyleCI * Bugfixes * Apply fixes from StyleCI * Bugfixes, implement combined promises * Apply fixes from StyleCI * Support passing method arguments as callable * Starting to write async upload logic * Apply fixes from StyleCI * Start implementing async file upload * Apply fixes from StyleCI * bugfix * Apply fixes from StyleCI * Start rewriting connection module * Add PHP file docblocks for all classes * Start working on new async stream API * Finish writing stream API * More stream API fixes * Apply fixes from StyleCI * Rewrite DataCenter and Connection modules * Clean up stream API documentation * Fixes * Apply fixes from StyleCI * Add referenced parameter to get length of buffer to read in getReadBuffer API * Moved all MessageHandler code in the Connection module, added a PHP version warning in the phar * Start fixing reads * Fix all protocol stream wrappers * Apply fixes from StyleCI * Implement disconnection, and remove end function * Working async RPC * Implement async file upload * Bugfix * Method recall bugfixes * Bugfixes * Trait bugfixes * Fix FIFO buffer * Bugfixes and speedtests * Async logging * Implement websocket streams * Implement loop API, signal API, clean closing and start changing layer * Small magna, websocket and HTTP fixes * Clean up loop API * Improved stack traces, 2FA and async * Login fixes * Added instructions for manual verification * Small fixes * More app info improvements * More app info improvements * TL and 2FA fixes * Update to layer 89 * More bugfixes * Implement broken media reporting * Remove debug comments * PHP 7.2 backwards compatibility * Bugfixes * Async key generation * Some simplifications * Transport fixes * Cleanup * async API * Performance fixes * Fixes to async API * Bugfixes * Implement one-time async loop * Authorization and logging fixes * Update to layer 91 * 7to5 fix * Null coalesce conversion * Implement socks5 proxy * Implement HTTP proxy * Fixes to HTTP proxy * MTProxy and socks5 fixes * Disable PHP 5 conversion * Proxies have higher priority * Avoid error handling in vendor * Override composer dependencies * Fix travis build * Final composer fixes * Proxy logic fixes * Fix get_updates update handling * Do not use parallel file driver if not supported * Refactor loader and implement HTTP fixes * Suppress errors in loader * HTTP and authorization fixes * HTTP fixes * Improved peer management * Use HTTP protocol on altervista * Small bugfixes * Minor fixes * Docufix * Docufix * Legacy fixes * Fix message queue * Avoid updating if using MTProxy * Improve logs and examples * Trim final newlines while converting parse mode * Reimplement noResponse flag * Async combined event handler and APIFactory fixes * Actually return config * Case-insensitive methods * Bugfix * Apply fixes from StyleCI (#545) * MTProxy fixes * PHP 5 warning * Improved PHP 5 warning * Use
along with newlines in web logs * Update docs --- .gitignore | 1 + bot.php | 10 +- build_docs.php | 6 +- combined_bot.php | 72 + composer.json | 12 +- docs | 2 +- magna.php | 21 +- makephar.php | 4 +- phar.php | 75 +- songs.php | 3 + src/BigIntegor.php | 19 +- src/CustomHTTPProxy.php | 17 +- src/HttpProxy.php | 27 +- src/Socket.php | 26 +- src/SocksProxy.php | 27 +- src/danog/MadelineProto/API.php | 87 +- src/danog/MadelineProto/APIFactory.php | 78 +- src/danog/MadelineProto/Absolute.php | 26 +- .../MadelineProto/AnnotationsBuilder.php | 26 +- .../MadelineProto/Async/AsyncParameters.php | 69 + src/danog/MadelineProto/Async/Parameters.php | 79 + src/danog/MadelineProto/Bug74586Exception.php | 26 +- src/danog/MadelineProto/CombinedAPI.php | 152 +- .../MadelineProto/CombinedEventHandler.php | 26 +- src/danog/MadelineProto/Connection.php | 582 +- src/danog/MadelineProto/Conversion.php | 26 +- src/danog/MadelineProto/Coroutine.php | 156 + src/danog/MadelineProto/DataCenter.php | 383 +- src/danog/MadelineProto/DocsBuilder.php | 51 +- .../DocsBuilder/Constructors.php | 26 +- .../MadelineProto/DocsBuilder/Methods.php | 26 +- src/danog/MadelineProto/EventHandler.php | 31 +- src/danog/MadelineProto/Exception.php | 37 +- src/danog/MadelineProto/FileCallback.php | 26 +- .../MadelineProto/FileCallbackInterface.php | 26 +- src/danog/MadelineProto/InternalDoc.php | 232 +- src/danog/MadelineProto/Lang.php | 12941 ++++++++-------- src/danog/MadelineProto/Logger.php | 55 +- .../Loop/Connection/CheckLoop.php | 158 + .../Loop/Connection/HttpWaitLoop.php | 83 + .../Loop/Connection/ReadLoop.php | 220 + .../Loop/Connection/UpdateLoop.php | 85 + .../Loop/Connection/WriteLoop.php | 330 + src/danog/MadelineProto/Loop/Impl/Loop.php | 75 + .../Loop/Impl/ResumableSignalLoop.php | 76 + .../MadelineProto/Loop/Impl/SignalLoop.php | 62 + .../MadelineProto/Loop/LoopInterface.php | 41 + .../Loop/ResumableLoopInterface.php | 45 + .../Loop/SignalLoopInterface.php | 47 + src/danog/MadelineProto/Lua.php | 28 +- src/danog/MadelineProto/MTProto.php | 336 +- .../MadelineProto/MTProtoTools/AckHandler.php | 67 +- .../MTProtoTools/AuthKeyHandler.php | 290 +- .../MTProtoTools/CallHandler.php | 752 +- .../MadelineProto/MTProtoTools/Crypt.php | 26 +- .../MadelineProto/MTProtoTools/Files.php | 216 +- .../MTProtoTools/MessageHandler.php | 161 - .../MTProtoTools/MsgIdHandler.php | 95 - .../MTProtoTools/PasswordCalculator.php | 202 + .../MTProtoTools/PeerHandler.php | 270 +- .../MTProtoTools/ReferenceDatabase.php | 593 + .../MTProtoTools/ResponseHandler.php | 601 +- .../MTProtoTools/SaltHandler.php | 39 - .../MTProtoTools/SeqNoHandler.php | 88 +- .../MTProtoTools/UpdateHandler.php | 110 +- src/danog/MadelineProto/Magic.php | 61 +- .../MadelineProto/MyTelegramOrgWrapper.php | 54 +- .../NothingInTheSocketException.php | 26 +- src/danog/MadelineProto/PTSException.php | 26 +- src/danog/MadelineProto/PayloadStream.php | 36 + src/danog/MadelineProto/Proxy.php | 26 +- src/danog/MadelineProto/RPCErrorException.php | 32 +- src/danog/MadelineProto/RSA.php | 27 +- src/danog/MadelineProto/ResponseException.php | 26 +- .../SecretChats/AuthKeyHandler.php | 26 +- .../SecretChats/MessageHandler.php | 26 +- .../SecretChats/ResponseHandler.php | 26 +- .../SecretChats/SeqNoHandler.php | 26 +- src/danog/MadelineProto/SecurityException.php | 26 +- src/danog/MadelineProto/Serialization.php | 26 +- src/danog/MadelineProto/Server.php | 26 +- src/danog/MadelineProto/Server/Handler.php | 26 +- src/danog/MadelineProto/Server/Proxy.php | 26 +- src/danog/MadelineProto/Server/Stream.php | 26 +- .../MadelineProto/Stream/Async/Buffer.php | 42 + .../Stream/Async/BufferedStream.php | 74 + .../MadelineProto/Stream/Async/RawStream.php | 49 + .../MadelineProto/Stream/Async/Stream.php | 38 + .../MadelineProto/Stream/BufferInterface.php | 47 + .../Stream/BufferedProxyStreamInterface.php | 28 + .../Stream/BufferedStreamInterface.php | 56 + .../Stream/Common/BufferedRawStream.php | 225 + .../Stream/Common/HashedBufferedStream.php | 319 + .../Stream/ConnectionContext.php | 391 + .../Stream/MTProtoBufferInterface.php | 28 + .../Stream/MTProtoTools/MsgIdHandler.php | 102 + .../Stream/MTProtoTools/SaltHandler.php | 45 + .../Stream/MTProtoTools/SeqNoHandler.php | 56 + .../MTProtoTransport/AbridgedStream.php | 106 + .../Stream/MTProtoTransport/FullStream.php | 114 + .../Stream/MTProtoTransport/HttpStream.php | 189 + .../Stream/MTProtoTransport/HttpsStream.php | 47 + .../IntermediatePaddedStream.php | 98 + .../MTProtoTransport/IntermediateStream.php | 95 + .../MTProtoTransport/ObfuscatedStream.php | 204 + .../MadelineProto/Stream/Proxy/HttpProxy.php | 195 + .../MadelineProto/Stream/Proxy/SocksProxy.php | 203 + .../Stream/ProxyStreamInterface.php | 36 + .../Stream/RawProxyStreamInterface.php | 28 + .../Stream/RawStreamInterface.php | 31 + .../MadelineProto/Stream/StreamInterface.php | 45 + .../Stream/Transport/DefaultStream.php | 109 + .../Stream/Transport/WsStream.php | 119 + .../Stream/Transport/WssStream.php | 46 + .../MadelineProto/TL/Conversion/BotAPI.php | 96 +- .../TL/Conversion/BotAPIFiles.php | 43 +- .../MadelineProto/TL/Conversion/Exception.php | 32 +- .../MadelineProto/TL/Conversion/Extension.php | 28 +- src/danog/MadelineProto/TL/Conversion/TD.php | 26 +- src/danog/MadelineProto/TL/Exception.php | 32 +- .../MadelineProto/TL/PrettyException.php | 26 +- src/danog/MadelineProto/TL/TL.php | 191 +- src/danog/MadelineProto/TL/TLCallback.php | 41 + src/danog/MadelineProto/TL/TLConstructor.php | 30 +- src/danog/MadelineProto/TL/TLMethod.php | 26 +- src/danog/MadelineProto/TL/TLParams.php | 26 +- src/danog/MadelineProto/TL/Types/Button.php | 26 +- src/danog/MadelineProto/TL/Types/Bytes.php | 26 +- src/danog/MadelineProto/TL_mtproto_v1.tl | 86 + src/danog/MadelineProto/TL_telegram_v86.tl | 1203 ++ src/danog/MadelineProto/TL_telegram_v89.tl | 1246 ++ src/danog/MadelineProto/TL_telegram_v91.tl | 1277 ++ .../MadelineProto/Threads/SocketHandler.php | 26 +- .../MadelineProto/Threads/SocketReader.php | 26 +- src/danog/MadelineProto/Tools.php | 122 +- .../MadelineProto/VoIP/AuthKeyHandler.php | 28 +- .../MadelineProto/VoIP/MessageHandler.php | 153 - src/danog/MadelineProto/Wrappers/ApiStart.php | 87 +- .../MadelineProto/Wrappers/ApiTemplates.php | 68 +- src/danog/MadelineProto/Wrappers/Callback.php | 29 +- .../MadelineProto/Wrappers/DialogHandler.php | 26 +- src/danog/MadelineProto/Wrappers/Events.php | 59 +- src/danog/MadelineProto/Wrappers/Login.php | 45 +- src/danog/MadelineProto/Wrappers/Loop.php | 83 +- src/danog/MadelineProto/Wrappers/Noop.php | 28 +- src/danog/MadelineProto/Wrappers/Start.php | 47 +- src/danog/MadelineProto/Wrappers/TOS.php | 26 +- .../MadelineProto/Wrappers/Templates.php | 26 +- src/danog/MadelineProto/Wrappers/Webhook.php | 28 +- tests/makephar.sh | 17 +- tests/makephardebug.sh | 13 +- tests/testing.php | 14 +- translator.php | 76 +- 153 files changed, 20653 insertions(+), 9159 deletions(-) create mode 100755 combined_bot.php create mode 100644 src/danog/MadelineProto/Async/AsyncParameters.php create mode 100644 src/danog/MadelineProto/Async/Parameters.php create mode 100644 src/danog/MadelineProto/Coroutine.php create mode 100644 src/danog/MadelineProto/Loop/Connection/CheckLoop.php create mode 100644 src/danog/MadelineProto/Loop/Connection/HttpWaitLoop.php create mode 100644 src/danog/MadelineProto/Loop/Connection/ReadLoop.php create mode 100644 src/danog/MadelineProto/Loop/Connection/UpdateLoop.php create mode 100644 src/danog/MadelineProto/Loop/Connection/WriteLoop.php create mode 100644 src/danog/MadelineProto/Loop/Impl/Loop.php create mode 100644 src/danog/MadelineProto/Loop/Impl/ResumableSignalLoop.php create mode 100644 src/danog/MadelineProto/Loop/Impl/SignalLoop.php create mode 100644 src/danog/MadelineProto/Loop/LoopInterface.php create mode 100644 src/danog/MadelineProto/Loop/ResumableLoopInterface.php create mode 100644 src/danog/MadelineProto/Loop/SignalLoopInterface.php delete mode 100644 src/danog/MadelineProto/MTProtoTools/MessageHandler.php delete mode 100644 src/danog/MadelineProto/MTProtoTools/MsgIdHandler.php create mode 100644 src/danog/MadelineProto/MTProtoTools/PasswordCalculator.php create mode 100644 src/danog/MadelineProto/MTProtoTools/ReferenceDatabase.php delete mode 100644 src/danog/MadelineProto/MTProtoTools/SaltHandler.php create mode 100644 src/danog/MadelineProto/PayloadStream.php create mode 100644 src/danog/MadelineProto/Stream/Async/Buffer.php create mode 100644 src/danog/MadelineProto/Stream/Async/BufferedStream.php create mode 100644 src/danog/MadelineProto/Stream/Async/RawStream.php create mode 100644 src/danog/MadelineProto/Stream/Async/Stream.php create mode 100644 src/danog/MadelineProto/Stream/BufferInterface.php create mode 100644 src/danog/MadelineProto/Stream/BufferedProxyStreamInterface.php create mode 100644 src/danog/MadelineProto/Stream/BufferedStreamInterface.php create mode 100644 src/danog/MadelineProto/Stream/Common/BufferedRawStream.php create mode 100644 src/danog/MadelineProto/Stream/Common/HashedBufferedStream.php create mode 100644 src/danog/MadelineProto/Stream/ConnectionContext.php create mode 100644 src/danog/MadelineProto/Stream/MTProtoBufferInterface.php create mode 100644 src/danog/MadelineProto/Stream/MTProtoTools/MsgIdHandler.php create mode 100644 src/danog/MadelineProto/Stream/MTProtoTools/SaltHandler.php create mode 100644 src/danog/MadelineProto/Stream/MTProtoTools/SeqNoHandler.php create mode 100644 src/danog/MadelineProto/Stream/MTProtoTransport/AbridgedStream.php create mode 100644 src/danog/MadelineProto/Stream/MTProtoTransport/FullStream.php create mode 100644 src/danog/MadelineProto/Stream/MTProtoTransport/HttpStream.php create mode 100644 src/danog/MadelineProto/Stream/MTProtoTransport/HttpsStream.php create mode 100644 src/danog/MadelineProto/Stream/MTProtoTransport/IntermediatePaddedStream.php create mode 100644 src/danog/MadelineProto/Stream/MTProtoTransport/IntermediateStream.php create mode 100644 src/danog/MadelineProto/Stream/MTProtoTransport/ObfuscatedStream.php create mode 100644 src/danog/MadelineProto/Stream/Proxy/HttpProxy.php create mode 100644 src/danog/MadelineProto/Stream/Proxy/SocksProxy.php create mode 100644 src/danog/MadelineProto/Stream/ProxyStreamInterface.php create mode 100644 src/danog/MadelineProto/Stream/RawProxyStreamInterface.php create mode 100644 src/danog/MadelineProto/Stream/RawStreamInterface.php create mode 100644 src/danog/MadelineProto/Stream/StreamInterface.php create mode 100644 src/danog/MadelineProto/Stream/Transport/DefaultStream.php create mode 100644 src/danog/MadelineProto/Stream/Transport/WsStream.php create mode 100644 src/danog/MadelineProto/Stream/Transport/WssStream.php create mode 100644 src/danog/MadelineProto/TL/TLCallback.php create mode 100644 src/danog/MadelineProto/TL_mtproto_v1.tl create mode 100644 src/danog/MadelineProto/TL_telegram_v86.tl create mode 100644 src/danog/MadelineProto/TL_telegram_v89.tl create mode 100644 src/danog/MadelineProto/TL_telegram_v91.tl delete mode 100644 src/danog/MadelineProto/VoIP/MessageHandler.php diff --git a/.gitignore b/.gitignore index d68e37ac..e909fae9 100644 --- a/.gitignore +++ b/.gitignore @@ -110,3 +110,4 @@ phar5 madeline.phar madeline.phar.version big +*.phar diff --git a/bot.php b/bot.php index 61bd8153..1797ca76 100755 --- a/bot.php +++ b/bot.php @@ -32,13 +32,18 @@ class EventHandler extends \danog\MadelineProto\EventHandler if (isset($update['message']['out']) && $update['message']['out']) { return; } + if (isset($update['message']['media'])) { + yield $this->messages->sendMedia(['peer' => $update, 'message' => $update['message']['message'], 'media' => $update]); + } + $res = json_encode($update, JSON_PRETTY_PRINT); if ($res == '') { $res = var_export($update, true); } + yield $this->sleep_async(3); try { - $this->messages->sendMessage(['peer' => $update, 'message' => $res, 'reply_to_msg_id' => isset($update['message']['id']) ? $update['message']['id'] : null, 'entities' => [['_' => 'messageEntityPre', 'offset' => 0, 'length' => strlen($res), 'language' => 'json']]]); + yield $this->messages->sendMessage(['peer' => $update, 'message' => "$res\n\nDopo 3 secondi, in modo asincrono", 'reply_to_msg_id' => isset($update['message']['id']) ? $update['message']['id'] : null, 'parse_mode' => 'HTML']); //'entities' => [['_' => 'messageEntityPre', 'offset' => 0, 'length' => strlen($res), 'language' => 'json']]]); } catch (\danog\MadelineProto\RPCErrorException $e) { \danog\MadelineProto\Logger::log((string) $e, \danog\MadelineProto\Logger::FATAL_ERROR); } catch (\danog\MadelineProto\Exception $e) { @@ -48,8 +53,9 @@ class EventHandler extends \danog\MadelineProto\EventHandler } } -$MadelineProto = new \danog\MadelineProto\API('bot.madeline'); +$MadelineProto = new \danog\MadelineProto\API('bot.madeline', ['logger' => ['logger_level' => 5]]); $MadelineProto->start(); +$MadelineProto->async(true); $MadelineProto->setEventHandler('\EventHandler'); $MadelineProto->loop(); diff --git a/build_docs.php b/build_docs.php index e2537c4d..48a51d99 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_v82.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 82)', - 'description' => 'MadelineProto API documentation (layer 82)', + 'tl_schema' => ['telegram' => __DIR__.'/src/danog/MadelineProto/TL_telegram_v91.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 91)', + 'description' => 'MadelineProto API documentation (layer 91)', 'output_dir' => __DIR__.'/docs/docs/API_docs', 'readme' => false, ], diff --git a/combined_bot.php b/combined_bot.php new file mode 100755 index 00000000..fcfc8759 --- /dev/null +++ b/combined_bot.php @@ -0,0 +1,72 @@ +#!/usr/bin/env php +. +*/ +set_include_path(get_include_path().':'.realpath(dirname(__FILE__).'/MadelineProto/')); + +/* + * Various ways to load MadelineProto + */ +if (!file_exists(__DIR__.'/vendor/autoload.php')) { + echo 'You did not run composer update, using madeline.php'.PHP_EOL; + if (!file_exists('madeline.php')) { + copy('https://phar.madelineproto.xyz/madeline.php', 'madeline.php'); + } + include 'madeline.php'; +} else { + require_once 'vendor/autoload.php'; +} + +class EventHandler extends \danog\MadelineProto\CombinedEventHandler +{ + public function onAny($update, $path) + { + if (isset($update['message']['out']) && $update['message']['out']) { + return; + } + $MadelineProto = $this->{$path}; + + if (isset($update['message']['media'])) { + yield $MadelineProto->messages->sendMedia(['peer' => $update, 'message' => $update['message']['message'], 'media' => $update]); + } + + $res = json_encode($update, JSON_PRETTY_PRINT); + if ($res == '') { + $res = var_export($update, true); + } + yield $MadelineProto->sleep_async(3); + + try { + yield $MadelineProto->messages->sendMessage(['peer' => $update, 'message' => "$res\n\nDopo 3 secondi, in modo asincrono", 'reply_to_msg_id' => isset($update['message']['id']) ? $update['message']['id'] : null, 'parse_mode' => 'HTML']); //'entities' => [['_' => 'messageEntityPre', 'offset' => 0, 'length' => strlen($res), 'language' => 'json']]]); + } catch (\danog\MadelineProto\RPCErrorException $e) { + \danog\MadelineProto\Logger::log((string) $e, \danog\MadelineProto\Logger::FATAL_ERROR); + } catch (\danog\MadelineProto\Exception $e) { + \danog\MadelineProto\Logger::log((string) $e, \danog\MadelineProto\Logger::FATAL_ERROR); + //$MadelineProto->messages->sendMessage(['peer' => '@danogentili', 'message' => $e->getCode().': '.$e->getMessage().PHP_EOL.$e->getTraceAsString()]); + } + } +} + +$settings = ['logger' => ['logger_level' => 5]]; +$CombinedMadelineProto = new \danog\MadelineProto\CombinedAPI('combined_session.madeline', ['bot.madeline' => $settings, 'user.madeline' => $settings]); + +\danog\MadelineProto\Logger::log('Bot login', \danog\MadelineProto\Logger::WARNING); +$CombinedMadelineProto->instances['bot.madeline']->start(); + +\danog\MadelineProto\Logger::log('Userbot login'); +$CombinedMadelineProto->instances['user.madeline']->start(); + +$CombinedMadelineProto->setEventHandler('\EventHandler'); +$CombinedMadelineProto->loop(); + +$CombinedMadelineProto->async(true); +$CombinedMadelineProto->setEventHandler('\EventHandler'); +$CombinedMadelineProto->loop(); diff --git a/composer.json b/composer.json index 7a2a1174..8e209d94 100644 --- a/composer.json +++ b/composer.json @@ -19,13 +19,21 @@ "ext-curl": "*", "ext-mbstring": "*", "ext-json": "*", - "ext-xml": "*" + "ext-xml": "*", + "amphp/amp": "^2.0", + "amphp/socket": "^0.10.11", + "amphp/log": "^1.0", + "amphp/parser": "^1.0", + "amphp/dns": "dev-master#861cc857b1ba6e02e8a7439c30403682785fce96 as 0.9.9", + "amphp/file": "dev-master#5a69fca406ac5fd220de0aa68c887bc8046eb93c as 0.3.3", + "amphp/uri": "dev-master#f3195b163275383909ded7770a11d8eb865cbc86 as 0.1.3", + "amphp/websocket-client": "dev-master" }, "require-dev": { "phpdocumentor/reflection-docblock": "^3.1" }, "suggest": { - "ext-libtgvoip": "Install the php-libtgvoip extension to make phone calls (https:/github.com/danog/php-libtgvoip)", + "ext-libtgvoip": "Install the php-libtgvoip extension to make phone calls (https://github.com/danog/php-libtgvoip)", "ext-sockets": "Install the socket extension to speed up MadelineProto" }, "authors": [ diff --git a/docs b/docs index 20e50a34..0fcff8e5 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit 20e50a34f0b4aa2efd6b36fed66504999a404a57 +Subproject commit 0fcff8e5a31af300511949c4dbafc7be6c0d4dd7 diff --git a/magna.php b/magna.php index 512c579b..64b0dc7e 100755 --- a/magna.php +++ b/magna.php @@ -21,8 +21,9 @@ if (!file_exists(__DIR__.'/vendor/autoload.php')) { } else { require_once 'vendor/autoload.php'; } -if (file_exists('web_data.php')) { - require_once 'web_data.php'; + +if (!file_exists('songs.php')) { + copy('https://github.com/danog/MadelineProto/raw/master/songs.php', 'songs.php'); } echo 'Deserializing MadelineProto from session.madeline...'.PHP_EOL; @@ -88,8 +89,10 @@ Propic art by @magnaluna on [deviantart](https://magnaluna.deviantart.com).", 'p if (!isset($this->calls[$from_id]) && $message === '/call') { $call = $this->request_call($from_id); $this->configureCall($call); - $this->calls[$call->getOtherID()] = $call; - $this->times[$call->getOtherID()] = [time(), $this->messages->sendMessage(['peer' => $call->getOtherID(), 'message' => 'Total running calls: '.count($this->calls).PHP_EOL.PHP_EOL.$call->getDebugString()])['id']]; + if ($call->getCallState() !== \danog\MadelineProto\VoIP::CALL_STATE_ENDED) { + $this->calls[$call->getOtherID()] = $call; + $this->times[$call->getOtherID()] = [time(), $this->messages->sendMessage(['peer' => $call->getOtherID(), 'message' => 'Total running calls: '.count($this->calls).PHP_EOL.PHP_EOL.$call->getDebugString()])['id']]; + } } if (strpos($message, '/program') === 0) { $time = strtotime(str_replace('/program ', '', $message)); @@ -198,8 +201,10 @@ Propic art by @magnaluna on [deviantart](https://magnaluna.deviantart.com).", 'p try { $call = $this->request_call($user); $this->configureCall($call); - $this->calls[$call->getOtherID()] = $call; - $this->times[$call->getOtherID()] = [time(), $this->messages->sendMessage(['peer' => $call->getOtherID(), 'message' => 'Total running calls: '.count($this->calls).PHP_EOL.PHP_EOL.$call->getDebugString()])['id']]; + if ($call->getCallState() !== \danog\MadelineProto\VoIP::CALL_STATE_ENDED) { + $this->calls[$call->getOtherID()] = $call; + $this->times[$call->getOtherID()] = [time(), $this->messages->sendMessage(['peer' => $call->getOtherID(), 'message' => 'Total running calls: '.count($this->calls).PHP_EOL.PHP_EOL.$call->getDebugString()])['id']]; + } } catch (\danog\MadelineProto\RPCErrorException $e) { try { if ($e->rpc === 'USER_PRIVACY_RESTRICTED') { @@ -262,6 +267,8 @@ Propic art by @magnaluna on [deviantart](https://magnaluna.deviantart.com).", 'p ], ]); } + } catch (\danog\MadelineProto\Exception $e) { + echo $e; } catch (\danog\MadelineProto\RPCErrorException $e) { echo $e; } catch (\danog\MadelineProto\Exception $e) { @@ -282,7 +289,7 @@ Propic art by @magnaluna on [deviantart](https://magnaluna.deviantart.com).", 'p } } } -$MadelineProto = new \danog\MadelineProto\API('session.madeline', ['secret_chats' => ['accept_chats' => false], 'logger' => ['logger' => 2, 'logger_param' => getcwd().'/MadelineProto.log']]); +$MadelineProto = new \danog\MadelineProto\API('session.madeline', ['secret_chats' => ['accept_chats' => false], 'logger' => ['logger' => 3, 'logger_param' => getcwd().'/MadelineProto.log']]); $MadelineProto->start(); if (!isset($MadelineProto->programmed_call)) { diff --git a/makephar.php b/makephar.php index b81d3c2f..2025fbc0 100755 --- a/makephar.php +++ b/makephar.php @@ -25,9 +25,9 @@ $p->addFromString('.git/refs/heads/master', $argv[3]); $p->setStub(''.$newline; + echo "**********************************************************************$newline"; + echo "**********************************************************************$newline$newline"; + echo "YOU ARE USING AN OLD AND BUGGED VERSION OF PHP, PLEASE UPDATE TO PHP 7$newline"; + echo "PHP 5 USERS WILL NOT RECEIVE MADELINEPROTO UPDATES AND BUGFIXES$newline$newline"; + echo "RECOMMENDED VERSION: PHP 7.3$newline"; + echo "ALL PHP 7 VERSIONS (7.0, 7.1, 7.2, 7.3) ARE SUPPORTED$newline$newline"; + echo "**********************************************************************$newline"; + echo "**********************************************************************$newline"; + unset($newline); } -$file = debug_backtrace(0, 1)[0]['file']; -if (file_exists($file)) { - $contents = file_get_contents($file); - // Should've added the self-update code in mtproxyd right away, but it's too late now - if (strpos($contents, 'new \danog\MadelineProto\Server') && in_array($contents, [file_get_contents('https://github.com/danog/MadelineProtoPhar/raw/2270bd9a94d168a5e6731ffd7e61821ea244beff/mtproxyd'), file_get_contents('https://github.com/danog/MadelineProtoPhar/raw/7cabb718ec3ccb79e3c8e3d34f5bccbe3f63b0fd/mtproxyd')]) && ($mtproxyd = file_get_contents('https://phar.madelineproto.xyz/mtproxyd?v=new'))) { - file_put_contents($file, $mtproxyd); - unset($mtproxyd); +function ___install_madeline() +{ + if (count(debug_backtrace(0)) === 1) { + die('You must include this file in another PHP script'.PHP_EOL); + } + + // MTProxy update + $file = debug_backtrace(0, 1)[0]['file']; + if (file_exists($file)) { + $contents = file_get_contents($file); + + if (strpos($contents, 'new \danog\MadelineProto\Server') && in_array($contents, [file_get_contents('https://github.com/danog/MadelineProtoPhar/raw/2270bd9a94d168a5e6731ffd7e61821ea244beff/mtproxyd'), file_get_contents('https://github.com/danog/MadelineProtoPhar/raw/7cabb718ec3ccb79e3c8e3d34f5bccbe3f63b0fd/mtproxyd')]) && ($mtproxyd = file_get_contents('https://phar.madelineproto.xyz/mtproxyd?v=new'))) { + file_put_contents($file, $mtproxyd); + + return; + } + } + + // MadelineProto update + $release_template = 'https://phar.madelineproto.xyz/release%s?v=new'; + $phar_template = 'https://phar.madelineproto.xyz/madeline%s.phar?v=new'; + + $release_branch = defined('MADELINE_BRANCH') ? '-'.MADELINE_BRANCH : ''; + $release_default = ''; + + if (PHP_MAJOR_VERSION === 5) { + $release_branch = '5'.$release_branch; + $release_default = '5'; + } + + if (!($release = @file_get_contents(sprintf($release_template, $release_branch)))) { + if (!($release = @file_get_contents(sprintf($release_template, $release_default)))) { + return; + } + $release_branch = $release_default; + } + + if (!file_exists('madeline.phar') || !file_exists('madeline.phar.version') || file_get_contents('madeline.phar.version') !== $release) { + $phar = file_get_contents(sprintf($phar_template, $release_branch)); + + if ($phar) { + file_put_contents('madeline.phar', $phar); + file_put_contents('madeline.phar.version', $release); + } } } +___install_madeline(); + require 'madeline.phar'; diff --git a/songs.php b/songs.php index d3cbd117..2aa4902f 100644 --- a/songs.php +++ b/songs.php @@ -1,6 +1,9 @@ . + * + * @author Daniil Gentili + * @copyright 2016-2018 Daniil Gentili + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ + namespace phpseclib\Math; if (PHP_MAJOR_VERSION < 7 && !(class_exists('\\Phar') && \Phar::running())) { - throw new \Exception('MadelineProto requires php 7 to run'); + throw new \Exception('MadelineProto requires php 7 to run natively, use phar.madelineproto.xyz to run on PHP 5.6'); } if (defined('HHVM_VERSION')) { $engines = [['PHP64', ['OpenSSL']], ['BCMath', ['OpenSSL']], ['PHP32', ['OpenSSL']]]; diff --git a/src/CustomHTTPProxy.php b/src/CustomHTTPProxy.php index afb5a044..ed625320 100644 --- a/src/CustomHTTPProxy.php +++ b/src/CustomHTTPProxy.php @@ -1,5 +1,20 @@ . + * + * @author Daniil Gentili + * @copyright 2016-2018 Daniil Gentili + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ class CustomHTTPProxy implements \danog\MadelineProto\Proxy { private $sock; diff --git a/src/HttpProxy.php b/src/HttpProxy.php index 8d30b97f..686d0a32 100644 --- a/src/HttpProxy.php +++ b/src/HttpProxy.php @@ -1,15 +1,20 @@ . -*/ - +/** + * HttpProxy module. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see . + * + * @author Daniil Gentili + * @copyright 2016-2018 Daniil Gentili + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ class HttpProxy implements \danog\MadelineProto\Proxy { private $domain; diff --git a/src/Socket.php b/src/Socket.php index c67647dd..d41ef293 100644 --- a/src/Socket.php +++ b/src/Socket.php @@ -1,14 +1,20 @@ . -*/ +/** + * Socket module. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see . + * + * @author Daniil Gentili + * @copyright 2016-2018 Daniil Gentili + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ class FSocket { private $sock; diff --git a/src/SocksProxy.php b/src/SocksProxy.php index 24666fc2..50f176db 100644 --- a/src/SocksProxy.php +++ b/src/SocksProxy.php @@ -1,15 +1,20 @@ . -*/ - +/** + * SocksProxy module. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see . + * + * @author Daniil Gentili + * @copyright 2016-2018 Daniil Gentili + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ class SocksProxy implements \danog\MadelineProto\Proxy { private $domain; diff --git a/src/danog/MadelineProto/API.php b/src/danog/MadelineProto/API.php index dadf3612..928a220f 100644 --- a/src/danog/MadelineProto/API.php +++ b/src/danog/MadelineProto/API.php @@ -1,15 +1,21 @@ . -*/ +/** + * API module. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see . + * + * @author Daniil Gentili + * @copyright 2016-2018 Daniil Gentili + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ namespace danog\MadelineProto; @@ -103,6 +109,19 @@ class API extends APIFactory \danog\MadelineProto\Logger::log(\danog\MadelineProto\Lang::$current_lang['madelineproto_ready'], Logger::NOTICE); } + public function async($async) + { + $this->async = $async; + foreach ($this->API->get_methods_namespaced() as $pair) { + $namespace = key($pair); + $this->{$namespace}->async = $async; + } + + if ($this->API->event_handler && class_exists($this->API->event_handler) && is_subclass_of($this->API->event_handler, '\danog\MadelineProto\EventHandler')) { + $this->API->setEventHandler($this->API->event_handler); + } + } + public function __wakeup() { $this->APIFactory(); @@ -161,13 +180,61 @@ class API extends APIFactory unset($this->API->storage[$name]); } + private function from_camel_case($input) + { + preg_match_all('!([A-Z][A-Z0-9]*(?=$|[A-Z][a-z0-9])|[A-Za-z][a-z0-9]+)!', $input, $matches); + $ret = $matches[0]; + foreach ($ret as &$match) { + $match = $match == strtoupper($match) ? strtolower($match) : lcfirst($match); + } + + return implode('_', $ret); + } + public function APIFactory() { if ($this->API) { foreach ($this->API->get_method_namespaces() as $namespace) { $this->{$namespace} = new APIFactory($namespace, $this->API); } + $methods = get_class_methods($this->API); + foreach ($methods as $key => $method) { + if ($method == 'method_call_async_read') { + unset($methods[array_search('method_call', $methods)]); + } elseif (stripos($method, 'async') !== false) { + if (strpos($method, '_async') !== false) { + unset($methods[array_search(str_ireplace('_async', '', $method), $methods)]); + } else { + unset($methods[array_search(str_ireplace('async', '', $method), $methods)]); + } + } + } + $this->methods = []; + foreach ($methods as $method) { + $actual_method = $method; + + if ($method == 'method_call_async_read') { + $method = 'method_call'; + } elseif (stripos($method, 'async') !== false) { + if (strpos($method, '_async') !== false) { + $method = str_ireplace('_async', '', $method); + } else { + $method = str_ireplace('async', '', $method); + } + } + + $this->methods[strtolower($method)] = [$this->API, $actual_method]; + if (strpos($method, '_') !== false) { + $this->methods[strtolower(str_replace('_', '', $method))] = [$this->API, $actual_method]; + } else { + $this->methods[strtolower($this->from_camel_case($method))] = [$this->API, $actual_method]; + } + } + $this->API->wrapper = $this; + if ($this->API->event_handler && class_exists($this->API->event_handler) && is_subclass_of($this->API->event_handler, '\danog\MadelineProto\EventHandler')) { + $this->API->setEventHandler($this->API->event_handler); + } } } diff --git a/src/danog/MadelineProto/APIFactory.php b/src/danog/MadelineProto/APIFactory.php index 674c1471..179b6b3f 100644 --- a/src/danog/MadelineProto/APIFactory.php +++ b/src/danog/MadelineProto/APIFactory.php @@ -1,18 +1,26 @@ . -*/ +/** + * APIFactory module. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see . + * + * @author Daniil Gentili + * @copyright 2016-2018 Daniil Gentili + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ namespace danog\MadelineProto; +use Amp\Promise; + class APIFactory { /** @@ -105,10 +113,14 @@ class APIFactory * @var auth */ public $auth; + use Tools; public $namespace = ''; public $API; public $lua = false; + public $async = false; + + protected $methods = []; public function __construct($namespace, $API) { @@ -132,9 +144,7 @@ class APIFactory $this->API->__construct($this->API->settings); } $this->API->get_config([], ['datacenter' => $this->API->datacenter->curdc]); - $aargs = isset($arguments[1]) && is_array($arguments[1]) ? $arguments[1] : []; - $aargs['datacenter'] = $this->API->datacenter->curdc; - $aargs['apifactory'] = true; + if (isset($this->session) && !is_null($this->session) && time() - $this->serialized > $this->API->settings['serialization']['serialization_interval']) { Logger::log("Didn't serialize in a while, doing that now..."); $this->serialize($this->session); @@ -142,13 +152,15 @@ class APIFactory if ($name !== 'accept_tos' && $name !== 'decline_tos') { $this->API->check_tos(); } + $lower_name = strtolower($name); 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); + return $this->namespace !== '' || !isset($this->methods[$lower_name]) ? $this->__mtproto_call($this->namespace.$name, $arguments) : $this->__api_call($lower_name, $arguments); } try { - $deserialized = 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); + $deserialized = $this->namespace !== '' || !isset($this->methods[$lower_name]) ? $this->__mtproto_call($this->namespace.$name, $arguments) : $this->__api_call($lower_name, $arguments); + Lua::convert_objects($deserialized); return $deserialized; @@ -168,4 +180,40 @@ class APIFactory return ['error_code' => $e->getCode(), 'error' => $e->getMessage()]; } } + + public function __api_call($name, $arguments) + { + $result = $this->methods[$name](...$arguments); + if (is_object($result) && ($result instanceof \Generator || $result instanceof Promise)) { + $async = isset(end($arguments)['async']) ? end($arguments)['async'] : $this->async; + if ($async && ($name !== 'loop' || isset(end($arguments)['async']))) { + return $result; + } else { + return $this->wait($result); + } + } + + return $result; + } + + public function __mtproto_call($name, $arguments) + { + if (array_key_exists($name, \danog\MadelineProto\MTProto::DISALLOWED_METHODS)) { + throw new \danog\MadelineProto\Exception(\danog\MadelineProto\MTProto::DISALLOWED_METHODS[$name], 0, null, 'MadelineProto', 1); + } + + $aargs = isset($arguments[1]) && is_array($arguments[1]) ? $arguments[1] : []; + $aargs['datacenter'] = $this->API->datacenter->curdc; + $aargs['apifactory'] = true; + $args = isset($arguments[0]) && is_array($arguments[0]) ? $arguments[0] : []; + + $async = isset(end($arguments)['async']) ? end($arguments)['async'] : $this->async; + $res = $this->API->method_call_async_read($name, $args, $aargs); + + if ($async) { + return $res; + } else { + return $this->wait($res); + } + } } diff --git a/src/danog/MadelineProto/Absolute.php b/src/danog/MadelineProto/Absolute.php index 4f69dd0e..9b081a24 100644 --- a/src/danog/MadelineProto/Absolute.php +++ b/src/danog/MadelineProto/Absolute.php @@ -1,15 +1,21 @@ . -*/ +/** + * Absolute module. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see . + * + * @author Daniil Gentili + * @copyright 2016-2018 Daniil Gentili + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ namespace danog\MadelineProto; diff --git a/src/danog/MadelineProto/AnnotationsBuilder.php b/src/danog/MadelineProto/AnnotationsBuilder.php index 3534c909..825e6f91 100644 --- a/src/danog/MadelineProto/AnnotationsBuilder.php +++ b/src/danog/MadelineProto/AnnotationsBuilder.php @@ -1,15 +1,21 @@ . -*/ +/** + * AnnotationsBuilder module. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see . + * + * @author Daniil Gentili + * @copyright 2016-2018 Daniil Gentili + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ namespace danog\MadelineProto; diff --git a/src/danog/MadelineProto/Async/AsyncParameters.php b/src/danog/MadelineProto/Async/AsyncParameters.php new file mode 100644 index 00000000..62264819 --- /dev/null +++ b/src/danog/MadelineProto/Async/AsyncParameters.php @@ -0,0 +1,69 @@ +. + * + * @author Daniil Gentili + * @copyright 2016-2018 Daniil Gentili + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ + +namespace danog\MadelineProto\Async; + +use Amp\Success; + +/** + * Async parameters class. + * + * Manages asynchronous generation of method parameters + * + * @author Daniil Gentili + */ +class AsyncParameters extends Parameters +{ + private $callable; + private $refetchable = true; + + public function __construct(callable $callable, bool $refetchable = true) + { + $this->callable = $callable; + $this->refetchable = $refetchable; + } + + public function setRefetchable(bool $refetchable) + { + $this->refetchable = $refetchable; + } + + public function setCallable(callable $callable) + { + $this->callable = $callable; + } + + public function isRefetchable(): bool + { + return $this->refetchable; + } + + public function getParameters(): \Generator + { + $callable = $this->callable; + $params = $callable(); + + if ($params instanceof \Generator) { + $params = yield coroutine($params); + } else { + $params = yield new Success($params); + } + + return $params; + } +} diff --git a/src/danog/MadelineProto/Async/Parameters.php b/src/danog/MadelineProto/Async/Parameters.php new file mode 100644 index 00000000..cfa458d3 --- /dev/null +++ b/src/danog/MadelineProto/Async/Parameters.php @@ -0,0 +1,79 @@ +. + * + * @author Daniil Gentili + * @copyright 2016-2018 Daniil Gentili + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ + +namespace danog\MadelineProto\Async; + +use Amp\Promise; +use function Amp\call; + +/** + * Parameters module. + * + * Manages asynchronous generation of method parameters + * + * @author Daniil Gentili + */ +abstract class Parameters +{ + private $fetched = false; + private $params = []; + + /** + * Fetch parameters asynchronously. + * + * @return Promise + */ + public function fetchParameters(): Promise + { + return call([$this, 'fetchParametersAsync']); + } + + /** + * Fetch parameters asynchronously. + * + * @return \Generator + */ + public function fetchParametersAsync(): \Generator + { + $refetchable = $this->isRefetchable(); + if ($this->fetched && !$refetchable) { + return $this->params; + } + $params = yield call([$this, 'getParameters']); + + if (!$refetchable) { + $this->params = $params; + } + + return $params; + } + + /** + * Check if the parameters can be fetched more than once. + * + * @return bool + */ + abstract public function isRefetchable(): bool; + + /** + * Gets the parameters asynchronously. + * + * @return \Generator + */ + abstract public function getParameters(): \Generator; +} diff --git a/src/danog/MadelineProto/Bug74586Exception.php b/src/danog/MadelineProto/Bug74586Exception.php index 3fdf8edf..dda6f932 100644 --- a/src/danog/MadelineProto/Bug74586Exception.php +++ b/src/danog/MadelineProto/Bug74586Exception.php @@ -1,15 +1,21 @@ . -*/ +/** + * Bug74586Exception module. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see . + * + * @author Daniil Gentili + * @copyright 2016-2018 Daniil Gentili + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ namespace danog\MadelineProto; diff --git a/src/danog/MadelineProto/CombinedAPI.php b/src/danog/MadelineProto/CombinedAPI.php index d73edb9b..8eae88da 100644 --- a/src/danog/MadelineProto/CombinedAPI.php +++ b/src/danog/MadelineProto/CombinedAPI.php @@ -1,27 +1,38 @@ . +/** + * CombinedAPI module. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see . + * + * @author Daniil Gentili + * @copyright 2016-2018 Daniil Gentili + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation */ namespace danog\MadelineProto; +use Amp\Loop; +use function Amp\Promise\all; + class CombinedAPI { use \danog\Serializable; + use Tools; public $session; public $instance_paths = []; public $instances = []; public $timeout = 5; public $serialization_interval = 30; public $serialized = 0; + protected $async; public function __magic_construct($session, $paths = []) { @@ -153,6 +164,7 @@ class CombinedAPI public $event_handler; private $event_handler_instance; + private $event_handler_methods = []; public function setEventHandler($event_handler) { @@ -168,23 +180,41 @@ class CombinedAPI } elseif ($this->event_handler_instance) { $this->event_handler_instance->__construct($this); } - if (method_exists($this->event_handler_instance, 'onLoop')) { - $this->loop_callback = [$this->event_handler_instance, 'onLoop']; + $this->event_handler_methods = []; + + foreach (\get_class_methods($this->event_handler) as $method) { + if ($method === 'onLoop') { + $this->loop_callback = [$this->event_handler_instance, 'onLoop']; + } elseif ($method === 'onAny') { + foreach (end($this->instances)->API->constructors->by_id as $id => $constructor) { + if ($constructor['type'] === 'Update' && !isset($this->event_handler_methods[$constructor['predicate']])) { + $this->event_handler_methods[$constructor['predicate']] = [$this->event_handler_instance, 'onAny']; + } + } + } else { + $method_name = lcfirst(substr($method, 2)); + $this->event_handler_methods[$method_name] = [$this->event_handler_instance, $method]; + } } } public function event_update_handler($update, $instance) { - $method_name = 'on'.ucfirst($update['_']); - if (method_exists($this->event_handler_instance, $method_name)) { - $this->event_handler_instance->$method_name($update, $instance); - } elseif (method_exists($this->event_handler_instance, 'onAny')) { - $this->event_handler_instance->onAny($update, $instance); + if (isset($this->event_handler_methods[$update['_']])) { + return $this->event_handler_methods[$update['_']]($update, $instance); } } private $loop_callback; + public function async($async) + { + $this->async = $async; + foreach ($this->instances as $instance) { + $instance->async($async); + } + } + public function setLoopCallback($callback) { $this->loop_callback = $callback; @@ -207,89 +237,31 @@ class CombinedAPI }); } } + + $loops = []; foreach ($this->instances as $path => $instance) { if ($instance->API->authorized !== MTProto::LOGGED_IN) { continue; } if (!$instance->API->settings['updates']['handle_updates']) { $instance->API->settings['updates']['handle_updates'] = true; + $instance->API->datacenter->sockets[$instance->API->settings['connection_settings']['default_dc']]->updater->start(); } - ksort($instance->API->updates); - foreach ($instance->API->updates as $key => $value) { - unset($instance->API->updates[$key]); - $this->event_update_handler($value, $path); - } - } - \danog\MadelineProto\Logger::log('Started update loop', \danog\MadelineProto\Logger::NOTICE); - - while (true) { - $read = []; - $write = []; - $except = []; - foreach ($this->instances as $path => $instance) { - if ($instance->API->authorized !== MTProto::LOGGED_IN) { - continue; - } - if (time() - $instance->API->last_getdifference > $instance->API->settings['updates']['getdifference_interval']) { - $instance->API->get_updates_difference(); - } - if (isset($instance->session) && !is_null($instance->session) && time() - $instance->serialized > $instance->API->settings['serialization']['serialization_interval']) { - $instance->API->logger->logger("Didn't serialize in a while, doing that now..."); - $instance->serialize($instance->session); - } - - foreach ($instance->API->datacenter->sockets as $id => $connection) { - $read[$id.'-'.$path] = $connection->getSocket(); - } - } - if (time() - $this->serialized > $this->serialization_interval) { - \danog\MadelineProto\Logger::log('Serializing combined event handler'); - $this->serialize(); - } - - try { - \Socket::select($read, $write, $except, $this->timeout); - if (count($read)) { - foreach (array_keys($read) as $id) { - list($dc, $path) = explode('-', $id, 2); - if (($error = $this->instances[$path]->API->recv_message($dc)) !== true) { - if ($error === -404) { - if ($this->instances[$path]->API->datacenter->sockets[$dc]->temp_auth_key !== null) { - $this->instances[$path]->API->logger->logger('WARNING: Resetting auth key...', \danog\MadelineProto\Logger::WARNING); - $this->instances[$path]->API->datacenter->sockets[$dc]->temp_auth_key = null; - $this->instances[$path]->API->init_authorization(); - - throw new \danog\MadelineProto\Exception('I had to recreate the temporary authorization key'); - } - } - - throw new \danog\MadelineProto\RPCErrorException($error, $error); - } - $only_updates = $this->instances[$path]->API->handle_messages($dc); - } - } - } catch (\danog\MadelineProto\NothingInTheSocketException $e) { - foreach ($this->instances as $instance) { - $instance->get_updates_difference(); - } - } catch (\danog\MadelineProto\RPCErrorException $e) { - if ($e->rpc !== 'RPC_CALL_FAIL') { - throw $e; - } - } catch (\danog\MadelineProto\Exception $e) { - $this->instances[$path]->API->connect_to_all_dcs(); - } - foreach ($this->instances as $path => $instance) { - ksort($instance->API->updates); - foreach ($instance->API->updates as $key => $value) { - unset($instance->API->updates[$key]); - $this->event_update_handler($value, $path); - } - } + $instance->setCallback(function ($update) use ($path) { + return $this->event_update_handler($update, $path); + }); if ($this->loop_callback !== null) { - $callback = $this->loop_callback; - $callback(); + $instance->setLoopCallback($this->loop_callback); } + $loops[] = $this->call($instance->loop(0, ['async' => true])); } + + Loop::repeat($this->serialization_interval * 1000, function () { + \danog\MadelineProto\Logger::log('Serializing combined event handler'); + $this->serialize(); + }); + + \danog\MadelineProto\Logger::log('Started update loop', \danog\MadelineProto\Logger::NOTICE); + $this->wait(all($loops)); } } diff --git a/src/danog/MadelineProto/CombinedEventHandler.php b/src/danog/MadelineProto/CombinedEventHandler.php index 23699303..84100866 100644 --- a/src/danog/MadelineProto/CombinedEventHandler.php +++ b/src/danog/MadelineProto/CombinedEventHandler.php @@ -1,15 +1,21 @@ . -*/ +/** + * CombinedEventHandler module. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see . + * + * @author Daniil Gentili + * @copyright 2016-2018 Daniil Gentili + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ namespace danog\MadelineProto; diff --git a/src/danog/MadelineProto/Connection.php b/src/danog/MadelineProto/Connection.php index 7346451b..d3bbf762 100644 --- a/src/danog/MadelineProto/Connection.php +++ b/src/danog/MadelineProto/Connection.php @@ -1,37 +1,60 @@ . -*/ +/** + * Connection module. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see . + * + * @author Daniil Gentili + * @copyright 2016-2018 Daniil Gentili + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ namespace danog\MadelineProto; +use Amp\Deferred; +use Amp\Promise; +use danog\MadelineProto\Loop\Connection\CheckLoop; +use danog\MadelineProto\Loop\Connection\HttpWaitLoop; +use danog\MadelineProto\Loop\Connection\ReadLoop; +use danog\MadelineProto\Loop\Connection\UpdateLoop; +use danog\MadelineProto\Loop\Connection\WriteLoop; +use danog\MadelineProto\MTProtoTools\Crypt; +use danog\MadelineProto\Stream\ConnectionContext; +use danog\MadelineProto\Stream\MTProtoTools\MsgIdHandler; +use danog\MadelineProto\Stream\MTProtoTools\SeqNoHandler; + /** - * Manages connection to telegram servers. + * Connection class. + * + * Manages connection to Telegram datacenters + * + * @author Daniil Gentili */ class Connection { + use Crypt; + use MsgIdHandler; + use SeqNoHandler; use \danog\Serializable; - use \danog\MadelineProto\Tools; + use Tools; + const API_ENDPOINT = 0; const VOIP_UDP_REFLECTOR_ENDPOINT = 1; const VOIP_TCP_REFLECTOR_ENDPOINT = 2; const VOIP_UDP_P2P_ENDPOINT = 3; const VOIP_UDP_LAN_ENDPOINT = 4; - public $sock = null; - public $protocol = null; - public $ip = null; - public $port = null; - public $timeout = null; - public $parsed = []; + const PENDING_MAX = 2000000000; + + public $stream; + public $time_delta = 0; public $type = 0; public $peer_tag; @@ -40,372 +63,227 @@ class Connection public $session_id; public $session_out_seq_no = 0; public $session_in_seq_no = 0; - public $ipv6 = false; public $incoming_messages = []; public $outgoing_messages = []; public $new_incoming = []; public $new_outgoing = []; + public $pending_outgoing = []; + public $pending_outgoing_key = 0; public $max_incoming_id; public $max_outgoing_id; - public $proxy = '\\Socket'; - public $extra = []; - public $obfuscated = []; public $authorized = false; public $call_queue = []; - public $object_queue = []; public $ack_queue = []; public $i = []; - public $must_open = true; public $last_recv = 0; + public $last_http_wait = 0; - public function __magic_construct($proxy, $extra, $ip, $port, $protocol, $timeout, $ipv6) + public $datacenter; + public $API; + public $resumeWriterDeferred; + public $ctx; + public $pendingCheckWatcherId; + + public $http_req_count = 0; + public $http_res_count = 0; + + public function getCtx() { - // Can use: - /* - - tcp_full - - tcp_abridged - - tcp_intermediate - - http - - https - - udp - */ - if ($proxy === '\\MTProxySocket') { - $proxy = '\\Socket'; - $protocol = 'obfuscated2'; + return $this->ctx; + } + + /** + * Connect function. + * + * Connects to a telegram DC using the specified protocol, proxy and connection parameters + * + * @param string $proxy Proxy class name + * + * @internal + * + * @return \Amp\Promise + */ + public function connect(ConnectionContext $ctx): Promise + { + return $this->call($this->connectAsync($ctx)); + } + + /** + * Connect function. + * + * Connects to a telegram DC using the specified protocol, proxy and connection parameters + * + * @param string $proxy Proxy class name + * + * @internal + * + * @return \Amp\Promise + */ + public function connectAsync(ConnectionContext $ctx): \Generator + { + $this->API->logger->logger("Trying connection via $ctx", \danog\MadelineProto\Logger::WARNING); + + $this->ctx = $ctx->getCtx(); + $this->datacenter = $ctx->getDc(); + $this->stream = yield $ctx->getStream(); + if (isset($this->old)) { + unset($this->old); } - $this->protocol = $protocol; - $this->timeout = $timeout; - $this->ipv6 = $ipv6; - $this->ip = $ip; - $this->port = $port; - $this->proxy = $proxy; - $this->extra = $extra; - if (($has_proxy = !in_array($proxy, ['\\MTProxySocket', '\\Socket'])) && !isset(class_implements($proxy)['danog\\MadelineProto\\Proxy'])) { - throw new \danog\MadelineProto\Exception(\danog\MadelineProto\Lang::$current_lang['proxy_class_invalid']); + if (!isset($this->writer)) { + $this->writer = new WriteLoop($this->API, $this->datacenter); } - switch ($this->protocol) { - case 'tcp_abridged': - $this->sock = new $proxy($ipv6 ? \AF_INET6 : \AF_INET, \SOCK_STREAM, getprotobyname('tcp')); - if ($has_proxy && $this->extra !== []) { - $this->sock->setExtra($this->extra); - } - $this->sock->setOption(\SOL_SOCKET, \SO_RCVTIMEO, $timeout); - $this->sock->setOption(\SOL_SOCKET, \SO_SNDTIMEO, $timeout); - if (!$this->sock->connect($ip, $port)) { - throw new Exception(\danog\MadelineProto\Lang::$current_lang['socket_con_error']); - } - $this->sock->setBlocking(true); - $this->write(chr(239)); - break; - case 'tcp_intermediate': - $this->sock = new $proxy($ipv6 ? \AF_INET6 : \AF_INET, \SOCK_STREAM, getprotobyname('tcp')); - if ($has_proxy && $this->extra !== []) { - $this->sock->setExtra($this->extra); - } - $this->sock->setOption(\SOL_SOCKET, \SO_RCVTIMEO, $timeout); - $this->sock->setOption(\SOL_SOCKET, \SO_SNDTIMEO, $timeout); - if (!$this->sock->connect($ip, $port)) { - throw new Exception(\danog\MadelineProto\Lang::$current_lang['socket_con_error']); - } - $this->sock->setBlocking(true); - $this->write(str_repeat(chr(238), 4)); - break; - case 'tcp_full': - $this->sock = new $proxy($ipv6 ? \AF_INET6 : \AF_INET, \SOCK_STREAM, getprotobyname('tcp')); - if ($has_proxy && $this->extra !== []) { - $this->sock->setExtra($this->extra); - } - $this->sock->setOption(\SOL_SOCKET, \SO_RCVTIMEO, $timeout); - $this->sock->setOption(\SOL_SOCKET, \SO_SNDTIMEO, $timeout); - if (!$this->sock->connect($ip, $port)) { - throw new Exception(\danog\MadelineProto\Lang::$current_lang['socket_con_error']); - } - $this->sock->setBlocking(true); - $this->out_seq_no = -1; - $this->in_seq_no = -1; - break; - case 'obfuscated2': - $this->sock = new $proxy($ipv6 ? \AF_INET6 : \AF_INET, \SOCK_STREAM, getprotobyname('tcp')); - if ($has_proxy && $this->extra !== []) { - $this->sock->setExtra($this->extra); - } - $this->sock->setOption(\SOL_SOCKET, \SO_RCVTIMEO, $timeout); - $this->sock->setOption(\SOL_SOCKET, \SO_SNDTIMEO, $timeout); - if (!$this->sock->connect($ip, $port)) { - throw new Exception(\danog\MadelineProto\Lang::$current_lang['socket_con_error']); - } - $this->sock->setBlocking(true); - do { - $random = $this->random(64); - } while (in_array(substr($random, 0, 4), ['PVrG', 'GET ', 'POST', 'HEAD', str_repeat(chr(238), 4)]) || $random[0] === chr(0xef) || substr($random, 4, 4) === "\0\0\0\0"); - $random[56] = $random[57] = $random[58] = $random[59] = chr(0xef); + if (!isset($this->reader)) { + $this->reader = new ReadLoop($this->API, $this->datacenter); + } + if (!isset($this->checker)) { + $this->checker = new CheckLoop($this->API, $this->datacenter); + } + if (!isset($this->waiter)) { + $this->waiter = new HttpWaitLoop($this->API, $this->datacenter); + } + if (!isset($this->updater)) { + $this->updater = new UpdateLoop($this->API, $this->datacenter); + } + foreach ($this->new_outgoing as $message_id) { + if ($this->outgoing_messages[$message_id]['unencrypted']) { + $promise = $this->outgoing_messages[$message_id]['promise']; + \Amp\Loop::defer(function () use ($promise) { + $promise->fail(new Exception('Restart')); + }); + unset($this->new_outgoing[$message_id]); + unset($this->outgoing_messages[$message_id]); + } + } + $this->http_req_count = 0; + $this->http_res_count = 0; - $reversed = strrev(substr($random, 8, 48)); - $this->obfuscated = ['encryption' => new \phpseclib\Crypt\AES('ctr'), 'decryption' => new \phpseclib\Crypt\AES('ctr')]; - $this->obfuscated['encryption']->enableContinuousBuffer(); - $this->obfuscated['decryption']->enableContinuousBuffer(); - $this->obfuscated['encryption']->setKey(substr($random, 8, 32)); - $this->obfuscated['encryption']->setIV(substr($random, 40, 16)); - $this->obfuscated['decryption']->setKey(substr($reversed, 0, 32)); - $this->obfuscated['decryption']->setIV(substr($reversed, 32, 16)); - $random = substr_replace($random, substr(@$this->obfuscated['encryption']->encrypt($random), 56, 8), 56, 8); - $wrote = 0; - if (($wrote += $this->sock->write($random)) !== 64) { - while (($wrote += $this->sock->write(substr($what, $wrote))) !== 64) { - } - } - break; - case 'http': - case 'https': - $this->parsed = parse_url($ip); - if ($this->parsed['host'][0] === '[') { - $this->parsed['host'] = substr($this->parsed['host'], 1, -1); - } - if (strpos($this->protocol, 'https') === 0 && $proxy === '\\Socket') { - $proxy = '\\FSocket'; - } - $this->sock = new $proxy($ipv6 ? \AF_INET6 : \AF_INET, \SOCK_STREAM, strpos($this->protocol, 'https') === 0 ? PHP_INT_MAX : getprotobyname('tcp')); - if ($has_proxy) { - if ($this->extra !== []) { - $this->sock->setExtra($this->extra); - }/* - if ($this->protocol === 'http') { - $this->parsed['path'] = $this->parsed['scheme'].'://'.$this->parsed['host']. - $this->parsed['path']; - $port = 80; - } elseif ($this->protocol === 'https') { - $port = 443; - }*/ - } - $this->sock->setOption(\SOL_SOCKET, \SO_RCVTIMEO, $timeout); - $this->sock->setOption(\SOL_SOCKET, \SO_SNDTIMEO, $timeout); - if (!$this->sock->connect($this->parsed['host'], $port)) { - throw new Exception(\danog\MadelineProto\Lang::$current_lang['socket_con_error']); - } - $this->sock->setBlocking(true); - break; - case 'udp': - throw new Exception(\danog\MadelineProto\Lang::$current_lang['protocol_not_implemented']); - default: - throw new Exception(\danog\MadelineProto\Lang::$current_lang['protocol_invalid']); + $this->writer->start(); + $this->reader->start(); + if (!$this->checker->start()) { + $this->checker->resume(); + } + $this->waiter->start(); + + if ($this->datacenter === $this->API->settings['connection_settings']['default_dc']) { + $this->updater->start(); } } - public function __destruct() + public function sendMessage($message, $flush = true): Promise { - switch ($this->protocol) { - case 'tcp_abridged': - case 'tcp_intermediate': - case 'tcp_full': - case 'http': - case 'https': - case 'obfuscated2': - try { - unset($this->sock); - } catch (\danog\MadelineProto\Exception $e) { - } - break; - case 'udp': - throw new Exception(\danog\MadelineProto\Lang::$current_lang['protocol_not_implemented']); - default: - throw new Exception(\danog\MadelineProto\Lang::$current_lang['protocol_invalid']); + return $this->call($this->sendMessageGenerator($message, $flush)); + } + + public function sendMessageGenerator($message, $flush = true): \Generator + { + $deferred = new Deferred(); + + if (!isset($message['serialized_body'])) { + $body = is_object($message['body']) ? yield $message['body'] : $message['body']; + + $refresh_next = isset($message['refresh_next']) && $message['refresh_next']; + //$refresh_next = true; + + if ($refresh_next) { + $this->API->referenceDatabase->refreshNext(true); + } + + if ($message['method']) { + $body = $this->API->serialize_method($message['_'], $body); + } else { + $body = $this->API->serialize_object(['type' => $message['_']], $body, $message['_']); + } + if ($refresh_next) { + $this->API->referenceDatabase->refreshNext(false); + } + $message['serialized_body'] = $body; + } + + $message['send_promise'] = $deferred; + $this->pending_outgoing[$this->pending_outgoing_key++] = $message; + $this->pending_outgoing_key %= self::PENDING_MAX; + if ($flush) { + $this->writer->resume(); + } + + return yield $deferred->promise(); + } + + public function setExtra($extra) + { + $this->API = $extra; + } + + public function disconnect() + { + $this->old = true; + foreach (['reader', 'writer', 'checker', 'waiter', 'updater'] as $loop) { + if (isset($this->{$loop}) && $this->{$loop}) { + $this->{$loop}->signal($loop === 'reader' ? new NothingInTheSocketException() : true); + } + } + if ($this->stream) { + $this->stream->disconnect(); } } - public function close_and_reopen() + public function reconnect(): Promise { - $this->__destruct(); - \danog\MadelineProto\Logger::log('Reopening...', \danog\MadelineProto\Logger::ULTRA_VERBOSE); - $this->must_open = true; + return $this->call($this->reconnectAsync()); } + public function reconnectAsync(): \Generator + { + $this->API->logger->logger('Reconnecting'); + $this->disconnect(); + yield $this->API->datacenter->dc_connect_async($this->ctx->getDc()); + } + + public function hasPendingCalls() + { + $API = $this->API; + $datacenter = $this->datacenter; + + $dc_config_number = isset($API->settings['connection_settings'][$datacenter]) ? $datacenter : 'all'; + $timeout = $API->settings['connection_settings'][$dc_config_number]['timeout']; + foreach ($this->new_outgoing as $message_id) { + if (isset($this->outgoing_messages[$message_id]['sent']) + && $this->outgoing_messages[$message_id]['sent'] + $timeout < time() + && ($this->temp_auth_key === null) === $this->outgoing_messages[$message_id]['unencrypted'] + && $this->outgoing_messages[$message_id]['_'] !== 'msgs_state_req' + ) { + return true; + } + } + + return false; + } + + public function getName(): string + { + return __CLASS__; + } + + /** + * Sleep function. + * + * @internal + * + * @return array + */ public function __sleep() { - return ['proxy', 'extra', 'protocol', 'ip', 'port', 'timeout', 'parsed', 'time_delta', 'peer_tag', 'temp_auth_key', 'auth_key', 'session_id', 'session_out_seq_no', 'session_in_seq_no', 'ipv6', 'incoming_messages', 'outgoing_messages', 'new_incoming', 'new_outgoing', 'max_incoming_id', 'max_outgoing_id', 'obfuscated', 'authorized', 'object_queue', 'ack_queue']; + return ['peer_tag', 'temp_auth_key', 'auth_key', 'session_id', 'session_out_seq_no', 'session_in_seq_no', 'max_incoming_id', 'max_outgoing_id', 'authorized', 'ack_queue']; } public function __wakeup() { - $keys = array_keys((array) get_object_vars($this)); - if (count($keys) !== count(array_unique($keys))) { - throw new Bug74586Exception(); - } $this->time_delta = 0; - } - - public function write($what, $length = null) - { - if ($length !== null) { - $what = substr($what, 0, $length); - } else { - $length = strlen($what); - } - switch ($this->protocol) { - case 'obfuscated2': - $what = @$this->obfuscated['encryption']->encrypt($what); - case 'tcp_abridged': - case 'tcp_intermediate': - case 'tcp_full': - case 'http': - case 'https': - return $this->sock->write($what); - case 'udp': - throw new Exception(\danog\MadelineProto\Lang::$current_lang['protocol_not_implemented']); - default: - throw new Exception(\danog\MadelineProto\Lang::$current_lang['protocol_invalid']); - } - } - - public function read($length) - { - //\danog\MadelineProto\Logger::log("Asked to read $length", \danog\MadelineProto\Logger::ULTRA_VERBOSE); - switch ($this->protocol) { - case 'obfuscated2': - return @$this->obfuscated['decryption']->encrypt($this->sock->read($length)); - case 'tcp_abridged': - case 'tcp_intermediate': - case 'tcp_full': - case 'http': - case 'https': - return $this->sock->read($length); - case 'udp': - throw new Exception(\danog\MadelineProto\Lang::$current_lang['protocol_not_implemented']); - default: - throw new Exception(\danog\MadelineProto\Lang::$current_lang['protocol_invalid']); - } - } - - public function read_message() - { - switch ($this->protocol) { - case 'tcp_full': - $packet_length_data = $this->read(4); - $packet_length = unpack('V', $packet_length_data)[1]; - $packet = $this->read($packet_length - 4); - if (strrev(hash('crc32b', $packet_length_data.substr($packet, 0, -4), true)) !== substr($packet, -4)) { - throw new Exception('CRC32 was not correct!'); - } - $this->in_seq_no++; - $in_seq_no = unpack('V', substr($packet, 0, 4))[1]; - if ($in_seq_no != $this->in_seq_no) { - throw new Exception('Incoming seq_no mismatch'); - } - - return substr($packet, 4, $packet_length - 12); - case 'tcp_intermediate': - return $this->read(unpack('V', $this->read(4))[1]); - case 'obfuscated2': - case 'tcp_abridged': - $packet_length = ord($this->read(1)); - - return $this->read($packet_length < 127 ? $packet_length << 2 : unpack('V', $this->read(3)."\0")[1] << 2); - case 'http': - case 'https': - $response = $this->read_http_payload(); - if ($response['code'] !== 200) { - Logger::log($response['body']); - - return $this->pack_signed_int(-$response['code']); - //throw new Exception($response['description'], $response['code']); - } - $close = $response['protocol'] === 'HTTP/1.0'; - if (isset($response['headers']['connection'])) { - $close = strtolower($response['headers']['connection']) === 'close'; - } - if ($close) { - $this->close_and_reopen(); - } - - return $response['body']; - case 'udp': - throw new Exception(\danog\MadelineProto\Lang::$current_lang['protocol_not_implemented']); - default: - throw new Exception(\danog\MadelineProto\Lang::$current_lang['protocol_invalid']); - } - } - - public function send_message($message) - { - $this->must_open = $this->must_open || $this->sock === null || $this->sock->getResource() === null; - - if ($this->must_open) { - $this->__construct($this->proxy, $this->extra, $this->ip, $this->port, $this->protocol, $this->timeout, $this->ipv6); - $this->must_open = false; - } - switch ($this->protocol) { - case 'tcp_full': - $this->out_seq_no++; - $step1 = pack('VV', strlen($message) + 12, $this->out_seq_no).$message; - $step2 = $step1.strrev(hash('crc32b', $step1, true)); - $this->write($step2); - break; - case 'tcp_intermediate': - $this->write(pack('V', strlen($message)).$message); - break; - case 'obfuscated2': - case 'tcp_abridged': - $len = strlen($message) / 4; - if ($len < 127) { - $message = chr($len).$message; - } else { - $message = chr(127).substr(pack('V', $len), 0, 3).$message; - } - $this->write($message); - break; - case 'http': - case 'https': - $this->write('POST '.$this->parsed['path']." HTTP/1.1\r\nHost: ".$this->parsed['host'].':'.$this->port."\r\n".$this->sock->getProxyHeaders()."Content-Type: application/x-www-form-urlencoded\r\nConnection: keep-alive\r\nKeep-Alive: timeout=100000, max=10000000\r\nContent-Length: ".strlen($message)."\r\n\r\n".$message); - break; - case 'udp': - throw new Exception(\danog\MadelineProto\Lang::$current_lang['protocol_not_implemented']); - default: - throw new Exception(\danog\MadelineProto\Lang::$current_lang['protocol_invalid']); - } - } - - public function read_http_line() - { - $line = $lastchar = $curchar = ''; - while ($lastchar.$curchar !== "\r\n") { - $line .= $lastchar; - $lastchar = $curchar; - $curchar = $this->sock->read(1); - } - - return $line; - } - - public function read_http_payload() - { - list($protocol, $code, $description) = explode(' ', $this->read_http_line(), 3); - list($protocol, $protocol_version) = explode('/', $protocol); - if ($protocol !== 'HTTP') { - throw new \danog\MadelineProto\Exception('Wrong protocol'); - } - $code = (int) $code; - $headers = []; - while (strlen($current_header = $this->read_http_line())) { - $current_header = explode(':', $current_header, 2); - $headers[strtolower($current_header[0])] = trim($current_header[1]); - } - - $read = ''; - if (isset($headers['content-length'])) { - $read = $this->sock->read((int) $headers['content-length']); - }/* elseif (isset($headers['transfer-encoding']) && $headers['transfer-encoding'] === 'chunked') { - do { - $length = hexdec($this->read_http_line()); - $read .= $this->sock->read($length); - $this->read_http_line(); - } while ($length); - }*/ - - return ['protocol' => $protocol, 'protocol_version' => $protocol_version, 'code' => $code, 'description' => $description, 'body' => $read, 'headers' => $headers]; - } - - public function getSocket() - { - return $this->sock; + $this->pending_outgoing = []; + $this->new_outgoing = []; + $this->new_incoming = []; + $this->outgoing_messages = []; + $this->incoming_messages = []; } } diff --git a/src/danog/MadelineProto/Conversion.php b/src/danog/MadelineProto/Conversion.php index 06268a13..830fdc40 100644 --- a/src/danog/MadelineProto/Conversion.php +++ b/src/danog/MadelineProto/Conversion.php @@ -1,15 +1,21 @@ . -*/ +/** + * Conversion module. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see . + * + * @author Daniil Gentili + * @copyright 2016-2018 Daniil Gentili + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ namespace danog\MadelineProto; diff --git a/src/danog/MadelineProto/Coroutine.php b/src/danog/MadelineProto/Coroutine.php new file mode 100644 index 00000000..de46e67b --- /dev/null +++ b/src/danog/MadelineProto/Coroutine.php @@ -0,0 +1,156 @@ +generator = $generator; + + try { + $yielded = $this->generator->current(); + if (!$yielded instanceof Promise) { + if (!$this->generator->valid()) { + $this->resolve($this->generator->getReturn()); + + return; + } + $yielded = $this->transform($yielded); + } + } catch (\Throwable $exception) { + $this->fail($exception); + + return; + } + /* + * @param \Throwable|null $exception Exception to be thrown into the generator. + * @param mixed $value Value to be sent into the generator. + */ + $this->onResolve = function ($exception, $value) { + $this->exception = $exception; + $this->value = $value; + if (!$this->immediate) { + $this->immediate = true; + + return; + } + + try { + do { + if ($this->exception) { + // Throw exception at current execution point. + $yielded = $this->generator->throw($this->exception); + } else { + // Send the new value and execute to next yield statement. + $yielded = $this->generator->send($this->value); + } + if (!$yielded instanceof Promise) { + if (!$this->generator->valid()) { + $this->resolve($this->generator->getReturn()); + $this->onResolve = null; + + return; + } + $yielded = $this->transform($yielded); + } + $this->immediate = false; + $yielded->onResolve($this->onResolve); + } while ($this->immediate); + $this->immediate = true; + } catch (\Throwable $exception) { + $this->fail($exception); + $this->onResolve = null; + } finally { + $this->exception = null; + $this->value = null; + } + }; + $yielded->onResolve($this->onResolve); + } + + /** + * Attempts to transform the non-promise yielded from the generator into a promise, otherwise returns an instance + * `Amp\Failure` failed with an instance of `Amp\InvalidYieldError`. + * + * @param mixed $yielded Non-promise yielded from generator. + * + * @return \Amp\Promise + */ + private function transform($yielded): Promise + { + try { + if (\is_array($yielded)) { + foreach ($yielded as &$val) { + if ($val instanceof \Generator) { + $val = new self($val); + } + } + + return Promise\all($yielded); + } + if ($yielded instanceof \Generator) { + return new self($yielded); + } + // No match, continue to returning Failure below. + } catch (\Throwable $exception) { + // Conversion to promise failed, fall-through to returning Failure below. + } + + return $yielded instanceof \Throwable || $yielded instanceof \Exception ? new Failure($yielded) : new Success($yielded); + } +} diff --git a/src/danog/MadelineProto/DataCenter.php b/src/danog/MadelineProto/DataCenter.php index 7a9c001f..c215eb45 100644 --- a/src/danog/MadelineProto/DataCenter.php +++ b/src/danog/MadelineProto/DataCenter.php @@ -1,18 +1,40 @@ . -*/ +/** + * DataCenter module. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see . + * + * @author Daniil Gentili + * @copyright 2016-2018 Daniil Gentili + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ namespace danog\MadelineProto; +use Amp\Socket\ClientConnectContext; +use danog\MadelineProto\Stream\Common\BufferedRawStream; +use danog\MadelineProto\Stream\ConnectionContext; +use danog\MadelineProto\Stream\MTProtoTransport\AbridgedStream; +use danog\MadelineProto\Stream\MTProtoTransport\FullStream; +use danog\MadelineProto\Stream\MTProtoTransport\HttpsStream; +use danog\MadelineProto\Stream\MTProtoTransport\HttpStream; +use danog\MadelineProto\Stream\MTProtoTransport\IntermediatePaddedStream; +use danog\MadelineProto\Stream\MTProtoTransport\IntermediateStream; +use danog\MadelineProto\Stream\MTProtoTransport\ObfuscatedStream; +use danog\MadelineProto\Stream\Proxy\HttpProxy; +use danog\MadelineProto\Stream\Proxy\SocksProxy; +use danog\MadelineProto\Stream\Transport\DefaultStream; +use danog\MadelineProto\Stream\Transport\WssStream; +use danog\MadelineProto\Stream\Transport\WsStream; + /** * Manages datacenters. */ @@ -22,6 +44,7 @@ class DataCenter use \danog\Serializable; public $sockets = []; public $curdc = 0; + private $API; private $dclist = []; private $settings = []; @@ -30,15 +53,16 @@ class DataCenter return ['sockets', 'curdc', 'dclist', 'settings']; } - public function __magic_construct($dclist, $settings) + public function __magic_construct($API, $dclist, $settings) { + $this->API = $API; $this->dclist = $dclist; $this->settings = $settings; foreach ($this->sockets as $key => $socket) { if ($socket instanceof Connection) { - \danog\MadelineProto\Logger::log(sprintf(\danog\MadelineProto\Lang::$current_lang['dc_con_stop'], $key), \danog\MadelineProto\Logger::VERBOSE); + $this->API->logger->logger(sprintf(\danog\MadelineProto\Lang::$current_lang['dc_con_stop'], $key), \danog\MadelineProto\Logger::VERBOSE); $socket->old = true; - $socket->__destruct(); + $socket->disconnect(); } else { unset($this->sockets[$key]); } @@ -46,109 +70,243 @@ class DataCenter } public function dc_connect($dc_number) + { + return $this->wait($this->dc_connect_async($dc_number)); + } + + public function dc_connect_async($dc_number): \Generator { if (isset($this->sockets[$dc_number]) && !isset($this->sockets[$dc_number]->old)) { return false; } - $dc_config_number = isset($this->settings[$dc_number]) ? $dc_number : 'all'; - $test = $this->settings[$dc_config_number]['test_mode'] ? 'test' : 'main'; - $x = 0; - do { - $ipv6 = $this->settings[$dc_config_number]['ipv6'] ? 'ipv6' : 'ipv4'; - if (!isset($this->dclist[$test][$ipv6][$dc_number]['ip_address'])) { - unset($this->sockets[$dc_number]); + $ctxs = $this->generate_contexts($dc_number); + foreach ($ctxs as $ctx) { + try { + if (isset($this->sockets[$dc_number]->old)) { + $this->sockets[$dc_number]->setExtra($this->API); + yield $this->sockets[$dc_number]->connect($ctx); + } else { + $this->sockets[$dc_number] = new Connection(); + $this->sockets[$dc_number]->setExtra($this->API); + yield $this->sockets[$dc_number]->connect($ctx); + } + $this->API->logger->logger('OK!', \danog\MadelineProto\Logger::WARNING); - \danog\MadelineProto\Logger::log("No info for DC $dc_number", \danog\MadelineProto\Logger::ERROR); - - return false; + return true; + } catch (\Throwable $e) { + $this->API->logger->logger('Connection failed: '.$e->getMessage(), \danog\MadelineProto\Logger::ERROR); + } catch (\Exception $e) { + $this->API->logger->logger('Connection failed: '.$e->getMessage(), \danog\MadelineProto\Logger::ERROR); } - $address = $this->dclist[$test][$ipv6][$dc_number]['ip_address']; - $port = $this->dclist[$test][$ipv6][$dc_number]['port']; - if (isset($this->dclist[$test][$ipv6][$dc_number]['tcpo_only']) && $this->dclist[$test][$ipv6][$dc_number]['tcpo_only']) { - if ($dc_config_number === 'all') { - $dc_config_number = $dc_number; - } - if (!isset($this->settings[$dc_config_number])) { - $this->settings[$dc_config_number] = $this->settings['all']; - } - $this->settings[$dc_config_number]['protocol'] = 'obfuscated2'; - } - if (strpos($this->settings[$dc_config_number]['protocol'], 'https') === 0) { - $subdomain = $this->dclist['ssl_subdomains'][preg_replace('/\D+/', '', $dc_number)]; - $path = $this->settings[$dc_config_number]['test_mode'] ? 'apiw_test1' : 'apiw1'; - $address = 'https://'.$subdomain.'.web.telegram.org/'.$path; - $port = 443; - } - if ($this->settings[$dc_config_number]['protocol'] === 'http') { - if ($ipv6) { - $address = '['.$address.']'; - } - $address = $this->settings[$dc_config_number]['protocol'].'://'.$address.'/api'; - } - \danog\MadelineProto\Logger::log(sprintf(\danog\MadelineProto\Lang::$current_lang['dc_con_test_start'], $dc_number, $test, $ipv6, $this->settings[$dc_config_number]['protocol']), \danog\MadelineProto\Logger::VERBOSE); - foreach (array_unique([$port, 443, 80, 88]) as $port) { - \danog\MadelineProto\Logger::log('Trying connection on port '.$port.' of '.$address.'...', \danog\MadelineProto\Logger::WARNING); - - try { - if (isset($this->sockets[$dc_number]->old)) { - $this->sockets[$dc_number]->__construct($this->settings[$dc_config_number]['proxy'], $this->settings[$dc_config_number]['proxy_extra'], $address, $port, $this->settings[$dc_config_number]['protocol'], $this->settings[$dc_config_number]['timeout'], $this->settings[$dc_config_number]['ipv6']); - unset($this->sockets[$dc_number]->old); - } else { - $this->sockets[$dc_number] = new Connection($this->settings[$dc_config_number]['proxy'], $this->settings[$dc_config_number]['proxy_extra'], $address, $port, $this->settings[$dc_config_number]['protocol'], $this->settings[$dc_config_number]['timeout'], $this->settings[$dc_config_number]['ipv6']); - } - \danog\MadelineProto\Logger::log('OK!', \danog\MadelineProto\Logger::WARNING); - - return true; - } catch (\danog\MadelineProto\Exception $e) { - \danog\MadelineProto\Logger::log('Connection failed: '.$e->getMessage(), \danog\MadelineProto\Logger::ERROR); - } catch (\danog\MadelineProto\NothingInTheSocketException $e) { - \danog\MadelineProto\Logger::log('Connection failed: read timeout', \danog\MadelineProto\Logger::ERROR); - } - if (isset($this->settings[$dc_config_number]['do_not_retry']) && $this->settings[$dc_config_number]['do_not_retry']) { - break; - } - } - switch ($x) { - case 0: - $this->settings[$dc_config_number]['ipv6'] = !$this->settings[$dc_config_number]['ipv6']; - \danog\MadelineProto\Logger::log('Connection failed, retrying connection with '.($this->settings[$dc_config_number]['ipv6'] ? 'ipv6' : 'ipv4').'...', \danog\MadelineProto\Logger::WARNING); - continue; - case 1: - if (isset($this->dclist[$test][$ipv6][$dc_number.'_bk']['ip_address'])) { - $dc_number .= '_bk'; - } - \danog\MadelineProto\Logger::log('Connection failed, retrying connection on backup DCs with '.($this->settings[$dc_config_number]['ipv6'] ? 'ipv6' : 'ipv4').'...', \danog\MadelineProto\Logger::WARNING); - continue; - case 2: - $this->settings[$dc_config_number]['ipv6'] = !$this->settings[$dc_config_number]['ipv6']; - \danog\MadelineProto\Logger::log('Connection failed, retrying connection on backup DCs with '.($this->settings[$dc_config_number]['ipv6'] ? 'ipv6' : 'ipv4').'...', \danog\MadelineProto\Logger::WARNING); - continue; - case 3: - $this->settings[$dc_config_number]['proxy'] = '\\Socket'; - \danog\MadelineProto\Logger::log('Connection failed, retrying connection without the proxy with '.($this->settings[$dc_config_number]['ipv6'] ? 'ipv6' : 'ipv4').'...', \danog\MadelineProto\Logger::WARNING); - continue; - case 4: - $this->settings[$dc_config_number]['ipv6'] = !$this->settings[$dc_config_number]['ipv6']; - \danog\MadelineProto\Logger::log('Connection failed, retrying connection without the proxy with '.($this->settings[$dc_config_number]['ipv6'] ? 'ipv6' : 'ipv4').'...', \danog\MadelineProto\Logger::WARNING); - continue; - case 5: - $this->settings[$dc_config_number]['proxy'] = '\\HttpProxy'; - $this->settings[$dc_config_number]['proxy_extra'] = ['address' => 'localhost', 'port' => 80]; - $this->settings[$dc_config_number]['ipv6'] = !$this->settings[$dc_config_number]['ipv6']; - \danog\MadelineProto\Logger::log('Connection failed, retrying connection with localhost HTTP proxy with '.($this->settings[$dc_config_number]['ipv6'] ? 'ipv6' : 'ipv4').'...', \danog\MadelineProto\Logger::WARNING); - continue; - case 6: - $this->settings[$dc_config_number]['ipv6'] = !$this->settings[$dc_config_number]['ipv6']; - \danog\MadelineProto\Logger::log('Connection failed, retrying connection with localhost HTTP proxy with '.($this->settings[$dc_config_number]['ipv6'] ? 'ipv6' : 'ipv4').'...', \danog\MadelineProto\Logger::WARNING); - continue; - default: - throw new \danog\MadelineProto\Exception("Could not connect to DC $dc_number"); - } - } while (++$x); + } throw new \danog\MadelineProto\Exception("Could not connect to DC $dc_number"); } + public function generate_contexts($dc_number) + { + $ctxs = []; + $combos = []; + + $dc_config_number = isset($this->settings[$dc_number]) ? $dc_number : 'all'; + $test = $this->settings[$dc_config_number]['test_mode'] ? 'test' : 'main'; + $ipv6 = $this->settings[$dc_config_number]['ipv6'] ? 'ipv6' : 'ipv4'; + + switch ($this->settings[$dc_config_number]['protocol']) { + case 'tcp_abridged': + $default = [[DefaultStream::getName(), []], [BufferedRawStream::getName(), []], [AbridgedStream::getName(), []]]; + break; + case 'tcp_intermediate': + $default = [[DefaultStream::getName(), []], [BufferedRawStream::getName(), []], [IntermediateStream::getName(), []]]; + break; + case 'tcp_intermediate_padded': + $default = [[DefaultStream::getName(), []], [BufferedRawStream::getName(), []], [IntermediatePaddedStream::getName(), []]]; + break; + case 'tcp_full': + $default = [[DefaultStream::getName(), []], [BufferedRawStream::getName(), []], [FullStream::getName(), []]]; + break; + case 'http': + $default = [[DefaultStream::getName(), []], [BufferedRawStream::getName(), []], [HttpStream::getName(), []]]; + break; + case 'https': + $default = [[DefaultStream::getName(), []], [BufferedRawStream::getName(), []], [HttpsStream::getName(), []]]; + break; + default: + throw new Exception(\danog\MadelineProto\Lang::$current_lang['protocol_invalid']); + } + if ($this->settings[$dc_config_number]['obfuscated'] && !in_array($default[1][0], [HttpsStream::getName(), HttpStream::getName()])) { + $default = [[DefaultStream::getName(), []], [BufferedRawStream::getName(), []], [ObfuscatedStream::getName(), []], end($default)]; + } + if ($this->settings[$dc_config_number]['transport'] && !in_array($default[1][0], [HttpsStream::getName(), HttpStream::getName()])) { + switch ($this->settings[$dc_config_number]['transport']) { + case 'tcp': + if ($this->settings[$dc_config_number]['obfuscated']) { + $default = [[DefaultStream::getName(), []], [BufferedRawStream::getName(), []], [ObfuscatedStream::getName(), []], end($default)]; + } + break; + case 'wss': + if ($this->settings[$dc_config_number]['obfuscated']) { + $default = [[DefaultStream::getName(), []], [WssStream::getName(), []], [BufferedRawStream::getName(), []], [ObfuscatedStream::getName(), []], end($default)]; + } else { + $default = [[DefaultStream::getName(), []], [WssStream::getName(), []], [BufferedRawStream::getName(), []], end($default)]; + } + break; + case 'ws': + if ($this->settings[$dc_config_number]['obfuscated']) { + $default = [[DefaultStream::getName(), []], [WsStream::getName(), []], [BufferedRawStream::getName(), []], [ObfuscatedStream::getName(), []], end($default)]; + } else { + $default = [[DefaultStream::getName(), []], [WsStream::getName(), []], [BufferedRawStream::getName(), []], end($default)]; + } + break; + } + } + $combos[] = $default; + + if (!isset($this->settings[$dc_config_number]['do_not_retry'])) { + if ((isset($this->dclist[$test][$ipv6][$dc_number]['tcpo_only']) && $this->dclist[$test][$ipv6][$dc_number]['tcpo_only']) || isset($this->dclist[$test][$ipv6][$dc_number]['secret'])) { + $extra = isset($this->dclist[$test][$ipv6][$dc_number]['secret']) ? ['secret' => $this->dclist[$test][$ipv6][$dc_number]['secret']] : []; + $combos[] = [[DefaultStream::getName(), []], [BufferedRawStream::getName(), []], [ObfuscatedStream::getName(), $extra], [IntermediatePaddedStream::getName(), []]]; + } + + if (is_array($this->settings[$dc_config_number]['proxy'])) { + $proxies = $this->settings[$dc_config_number]['proxy']; + $proxy_extras = $this->settings[$dc_config_number]['proxy_extra']; + } else { + $proxies = [$this->settings[$dc_config_number]['proxy']]; + $proxy_extras = [$this->settings[$dc_config_number]['proxy_extra']]; + } + foreach ($proxies as $key => $proxy) { + // Convert old settings + if ($proxy === '\\Socket') { + $proxy = DefaultStream::getName(); + } + if ($proxy === '\\SocksProxy') { + $proxy = SocksProxy::getName(); + } + if ($proxy === '\\HttpProxy') { + $proxy = HttpProxy::getName(); + } + if ($proxy === '\\MTProxySocket') { + $proxy = ObfuscatedStream::getName(); + } + if ($proxy === DefaultStream::getName()) { + continue; + } + $extra = $proxy_extras[$key]; + if (!isset(class_implements($proxy)['danog\\MadelineProto\\Stream\\StreamInterface'])) { + throw new \danog\MadelineProto\Exception(\danog\MadelineProto\Lang::$current_lang['proxy_class_invalid']); + } + if ($proxy === ObfuscatedStream::getName() && in_array(strlen($extra['secret']), [17, 34])) { + $combos []= [[DefaultStream::getName(), []], [BufferedRawStream::getName(), []], [$proxy, $extra], [IntermediatePaddedStream::getName(), []]]; + } + foreach ($combos as $k => $orig) { + $combo = []; + if ($proxy === ObfuscatedStream::getName()) { + $combo = $orig; + if ($combo[count($combo) - 2][0] === ObfuscatedStream::getName()) { + $combo[count($combo) - 2][1] = $extra; + } else { + $mtproto = end($combo); + $combo[count($combo) - 1] = [$proxy, $extra]; + $combo[] = $mtproto; + } + } else { + if ($orig[1][0] === BufferedRawStream::getName()) { + list($first, $second) = [array_slice($orig, 0, 2), array_slice($orig, 2)]; + $first[] = [$proxy, $extra]; + $combo = array_merge($first, $second); + } elseif ($orig[1][0] === WssStream::getName()) { + list($first, $second) = [array_slice($orig, 0, 1), array_slice($orig, 1)]; + $first[] = [BufferedRawStream::getName(), []]; + $first[] = [$proxy, $extra]; + $combo = array_merge($first, $second); + } + } + + array_unshift($combos, $combo); + //unset($combos[$k]); + } + } + + $combos[] = [[DefaultStream::getName(), []], [BufferedRawStream::getName(), []], [HttpsStream::getName(), []]]; + $combos = array_unique($combos, SORT_REGULAR); + } + /* @var $context \Amp\ClientConnectContext */ + $context = (new ClientConnectContext())->withMaxAttempts(1)->withConnectTimeout(1000 * $this->settings[$dc_config_number]['timeout']); + + foreach ($combos as $combo) { + $ipv6 = [$this->settings[$dc_config_number]['ipv6'] ? 'ipv6' : 'ipv4', $this->settings[$dc_config_number]['ipv6'] ? 'ipv4' : 'ipv6']; + + foreach ($ipv6 as $ipv6) { + if (!isset($this->dclist[$test][$ipv6][$dc_number]['ip_address'])) { + unset($this->sockets[$dc_number]); + + $this->API->logger->logger("No info for DC $dc_number", \danog\MadelineProto\Logger::ERROR); + + continue; + } + $address = $this->dclist[$test][$ipv6][$dc_number]['ip_address']; + $port = $this->dclist[$test][$ipv6][$dc_number]['port']; + + foreach (array_unique([$port, 443, 80, 88, 5222]) as $port) { + $stream = end($combo)[0]; + + if ($stream === HttpsStream::getName()) { + $subdomain = $this->dclist['ssl_subdomains'][preg_replace('/\D+/', '', $dc_number)]; + if (strpos($dc_number, '_media') !== false) { + $subdomain .= '-1'; + } + $path = $this->settings[$dc_config_number]['test_mode'] ? 'apiw_test1' : 'apiw1'; + + $uri = 'tcp://'.$subdomain.'.web.telegram.org:'.$port.'/'.$path; + } elseif ($stream === HttpStream::getName()) { + $uri = 'tcp://'.$address.':'.$port.'/api'; + } else { + $uri = 'tcp://'.$address.':'.$port; + } + + if ($combo[1][0] === WssStream::getName()) { + $subdomain = $this->dclist['ssl_subdomains'][preg_replace('/\D+/', '', $dc_number)]; + if (strpos($dc_number, '_media') !== false) { + $subdomain .= '-1'; + } + $path = $this->settings[$dc_config_number]['test_mode'] ? 'apiws_test' : 'apiws'; + + $uri = 'tcp://'.$subdomain.'.web.telegram.org:'.$port.'/'.$path; + } elseif ($combo[1][0] === WsStream::getName()) { + $subdomain = $this->dclist['ssl_subdomains'][preg_replace('/\D+/', '', $dc_number)]; + if (strpos($dc_number, '_media') !== false) { + $subdomain .= '-1'; + } + $path = $this->settings[$dc_config_number]['test_mode'] ? 'apiws_test' : 'apiws'; + + //$uri = 'tcp://' . $subdomain . '.web.telegram.org:' . $port . '/' . $path; + $uri = 'tcp://'.$address.':'.$port.'/'.$path; + } + + /** @var $ctx \danog\MadelineProto\Stream\ConnectionContext */ + $ctx = (new ConnectionContext()) + ->setDc($dc_number) + ->setTest($this->settings[$dc_config_number]['test_mode']) + ->setSocketContext($context) + ->setUri($uri) + ->setIpv6($ipv6 === 'ipv6'); + + foreach ($combo as $stream) { + $ctx->addStream(...$stream); + } + $ctxs[] = $ctx; + } + } + } + + if (isset($this->dclist[$test][$ipv6][$dc_number.'_bk']['ip_address'])) { + $ctxs = array_merge($ctxs, $this->generate_contexts($dc_number.'_bk')); + } + + return $ctxs; + } + public function get_dcs($all = true) { $test = $this->settings['all']['test_mode'] ? 'test' : 'main'; @@ -156,17 +314,4 @@ class DataCenter return $all ? array_keys((array) $this->dclist[$test][$ipv6]) : array_keys((array) $this->sockets); } - - public function select($poll = false) - { - $read = []; - $write = []; - $except = []; - foreach ($this->sockets as $dc_id => $socket) { - $read[$dc_id] = $socket->getSocket(); - } - \Socket::select($read, $write, $except, $poll ? 0 : $this->settings['all']['timeout']); - - return array_keys($read); - } } diff --git a/src/danog/MadelineProto/DocsBuilder.php b/src/danog/MadelineProto/DocsBuilder.php index c2fe2394..7b1c6ea4 100644 --- a/src/danog/MadelineProto/DocsBuilder.php +++ b/src/danog/MadelineProto/DocsBuilder.php @@ -1,15 +1,21 @@ . -*/ +/** + * DocsBuilder module. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see . + * + * @author Daniil Gentili + * @copyright 2016-2018 Daniil Gentili + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ namespace danog\MadelineProto; @@ -601,16 +607,21 @@ Any json-encodable data. } public $template = '. - */ +/** + * Lang module + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see . + * + * @author Daniil Gentili + * @copyright 2016-2018 Daniil Gentili + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ namespace danog\MadelineProto; diff --git a/src/danog/MadelineProto/DocsBuilder/Constructors.php b/src/danog/MadelineProto/DocsBuilder/Constructors.php index 268cd585..c3b33865 100644 --- a/src/danog/MadelineProto/DocsBuilder/Constructors.php +++ b/src/danog/MadelineProto/DocsBuilder/Constructors.php @@ -1,15 +1,21 @@ . -*/ +/** + * Constructors module. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see . + * + * @author Daniil Gentili + * @copyright 2016-2018 Daniil Gentili + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ namespace danog\MadelineProto\DocsBuilder; diff --git a/src/danog/MadelineProto/DocsBuilder/Methods.php b/src/danog/MadelineProto/DocsBuilder/Methods.php index bcdd2982..1af03ec1 100644 --- a/src/danog/MadelineProto/DocsBuilder/Methods.php +++ b/src/danog/MadelineProto/DocsBuilder/Methods.php @@ -1,15 +1,21 @@ . -*/ +/** + * Methods module. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see . + * + * @author Daniil Gentili + * @copyright 2016-2018 Daniil Gentili + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ namespace danog\MadelineProto\DocsBuilder; diff --git a/src/danog/MadelineProto/EventHandler.php b/src/danog/MadelineProto/EventHandler.php index be78d235..30fe8f87 100644 --- a/src/danog/MadelineProto/EventHandler.php +++ b/src/danog/MadelineProto/EventHandler.php @@ -1,15 +1,21 @@ . -*/ +/** + * EventHandler module. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see . + * + * @author Daniil Gentili + * @copyright 2016-2018 Daniil Gentili + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ namespace danog\MadelineProto; @@ -17,9 +23,12 @@ class EventHandler extends APIFactory { public function __construct($MadelineProto) { - $this->API = $MadelineProto; + $this->API = $MadelineProto->API; + $this->async = $MadelineProto->async; + $this->methods = $MadelineProto->methods; foreach ($this->API->get_method_namespaces() as $namespace) { $this->{$namespace} = new APIFactory($namespace, $this->API); + $this->{$namespace}->async = $MadelineProto->async; } } diff --git a/src/danog/MadelineProto/Exception.php b/src/danog/MadelineProto/Exception.php index bd53a22b..f2ee1347 100644 --- a/src/danog/MadelineProto/Exception.php +++ b/src/danog/MadelineProto/Exception.php @@ -1,15 +1,21 @@ . -*/ +/** + * Exception module. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see . + * + * @author Daniil Gentili + * @copyright 2016-2018 Daniil Gentili + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ namespace danog\MadelineProto; @@ -20,7 +26,11 @@ class Exception extends \Exception public function __toString() { - return $this->file === 'MadelineProto' ? $this->message : '\\danog\\MadelineProto\\Exception'.($this->message !== '' ? ': ' : '').$this->message.' in '.$this->file.':'.$this->line.PHP_EOL.'Revision: '.@file_get_contents(__DIR__.'/../../../.git/refs/heads/master').PHP_EOL.'TL Trace (YOU ABSOLUTELY MUST READ THE TEXT BELOW):'.PHP_EOL.$this->getTLTrace(); + $result = $this->file === 'MadelineProto' ? $this->message : '\\danog\\MadelineProto\\Exception'.($this->message !== '' ? ': ' : '').$this->message.' in '.$this->file.':'.$this->line.PHP_EOL.\danog\MadelineProto\Magic::$revision.PHP_EOL.'TL Trace (YOU ABSOLUTELY MUST READ THE TEXT BELOW):'.PHP_EOL.$this->getTLTrace(); + if (php_sapi_name() !== 'cli') { + $result = str_replace(PHP_EOL, '
'.PHP_EOL, $result); + } + return $result; } public function __construct($message = null, $code = 0, self $previous = null, $file = null, $line = null) @@ -74,9 +84,8 @@ class Exception extends \Exception public static function ExceptionErrorHandler($errno = 0, $errstr = null, $errfile = null, $errline = null) { // If error is suppressed with @, don't throw an exception - if (error_reporting() === 0) { - return true; - // return true to continue through the others error handlers + if (error_reporting() === 0 || $errfile && strpos($errfile, 'vendor/amphp') !== false) { + return false; } throw new self($errstr, $errno, null, $errfile, $errline); diff --git a/src/danog/MadelineProto/FileCallback.php b/src/danog/MadelineProto/FileCallback.php index f5611bf7..caba81ad 100644 --- a/src/danog/MadelineProto/FileCallback.php +++ b/src/danog/MadelineProto/FileCallback.php @@ -1,15 +1,21 @@ . -*/ +/** + * FileCallback module. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see . + * + * @author Daniil Gentili + * @copyright 2016-2018 Daniil Gentili + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ namespace danog\MadelineProto; diff --git a/src/danog/MadelineProto/FileCallbackInterface.php b/src/danog/MadelineProto/FileCallbackInterface.php index c41dfe9e..9e0cea95 100644 --- a/src/danog/MadelineProto/FileCallbackInterface.php +++ b/src/danog/MadelineProto/FileCallbackInterface.php @@ -1,15 +1,21 @@ . -*/ +/** + * FileCallbackInterface module. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see . + * + * @author Daniil Gentili + * @copyright 2016-2018 Daniil Gentili + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ namespace danog\MadelineProto; diff --git a/src/danog/MadelineProto/InternalDoc.php b/src/danog/MadelineProto/InternalDoc.php index e12e3c7c..0c98f0e7 100644 --- a/src/danog/MadelineProto/InternalDoc.php +++ b/src/danog/MadelineProto/InternalDoc.php @@ -100,7 +100,7 @@ interface auth /** * @param array params [ - * bytes password_hash, + * InputCheckPasswordSRP password, * ] * * @return auth_Authorization @@ -348,7 +348,7 @@ interface account /** * @param array params [ - * bytes current_password_hash, + * InputCheckPasswordSRP password, * ] * * @return account_PasswordSettings @@ -357,7 +357,7 @@ interface account /** * @param array params [ - * bytes current_password_hash, + * InputCheckPasswordSRP password, * account_PasswordInputSettings new_settings, * ] * @@ -388,7 +388,7 @@ interface account /** * @param array params [ - * bytes password_hash, + * InputCheckPasswordSRP password, * int period, * ] * @@ -536,6 +536,49 @@ interface account * @return bool */ public function finishTakeoutSession(array $params); + + /** + * @param array params [ + * string code, + * ] + * + * @return bool + */ + public function confirmPasswordEmail(array $params); + + /** + * @return bool + */ + public function resendPasswordEmail(); + + /** + * @return bool + */ + public function cancelPasswordEmail(); + + /** + * @return bool + */ + public function getContactSignUpNotification(); + + /** + * @param array params [ + * Bool silent, + * ] + * + * @return bool + */ + public function setContactSignUpNotification(array $params); + + /** + * @param array params [ + * boolean compare_sound, + * InputNotifyPeer peer, + * ] + * + * @return Updates + */ + public function getNotifyExceptions(array $params); } interface users @@ -571,6 +614,15 @@ interface users interface contacts { + /** + * @param array params [ + * int hash, + * ] + * + * @return Vector_of_int + */ + public function getContactIDs(array $params); + /** * @return Vector_of_ContactStatus */ @@ -612,6 +664,15 @@ interface contacts */ public function deleteContacts(array $params); + /** + * @param array params [ + * string phones, + * ] + * + * @return bool + */ + public function deleteByPhones(array $params); + /** * @param array params [ * InputUser id, @@ -640,20 +701,6 @@ interface contacts */ public function getBlocked(array $params); - /** - * @return Vector_of_int - */ - public function exportCard(); - - /** - * @param array params [ - * int export_card, - * ] - * - * @return User - */ - public function importCard(array $params); - /** * @param array params [ * string q, @@ -1337,6 +1384,7 @@ interface messages * boolean silent, * boolean background, * boolean clear_draft, + * boolean hide_via, * InputPeer peer, * int reply_to_msg_id, * long query_id, @@ -1360,14 +1408,12 @@ interface messages /** * @param array params [ * boolean no_webpage, - * boolean stop_geo_live, * InputPeer peer, * int id, * string message, * InputMedia media, * ReplyMarkup reply_markup, * MessageEntity entities, - * InputGeoPoint geo_point, * ] * * @return Updates @@ -1377,13 +1423,11 @@ interface messages /** * @param array params [ * boolean no_webpage, - * boolean stop_geo_live, * InputBotInlineMessageID id, * string message, * InputMedia media, * ReplyMarkup reply_markup, * MessageEntity entities, - * InputGeoPoint geo_point, * ] * * @return bool @@ -1771,6 +1815,61 @@ interface messages * @return Vector_of_DialogPeer */ public function getDialogUnreadMarks(); + + /** + * @return bool + */ + public function clearAllDrafts(); + + /** + * @param array params [ + * boolean silent, + * InputPeer peer, + * int id, + * ] + * + * @return Updates + */ + public function updatePinnedMessage(array $params); + + /** + * @param array params [ + * InputPeer peer, + * int msg_id, + * bytes options, + * ] + * + * @return Updates + */ + public function sendVote(array $params); + + /** + * @param array params [ + * InputPeer peer, + * int msg_id, + * ] + * + * @return Updates + */ + public function getPollResults(array $params); + + /** + * @param array params [ + * InputPeer peer, + * ] + * + * @return ChatOnlines + */ + public function getOnlines(array $params); + + /** + * @param array params [ + * InputPeer peer, + * ] + * + * @return StatsURL + */ + public function getStatsURL(array $params); } interface updates @@ -1949,19 +2048,14 @@ interface help */ public function getNearestDc(); - /** - * @return help_AppUpdate - */ - public function getAppUpdate(); - /** * @param array params [ - * InputAppEvent events, + * string source, * ] * - * @return bool + * @return help_AppUpdate */ - public function saveAppLog(array $params); + public function getAppUpdate(array $params); /** * @return help_InviteText @@ -2033,6 +2127,54 @@ interface help * @return help_DeepLinkInfo */ public function getDeepLinkInfo(array $params); + + /** + * @return JSONValue + */ + public function getAppConfig(); + + /** + * @param array params [ + * InputAppEvent events, + * ] + * + * @return bool + */ + public function saveAppLog(array $params); + + /** + * @param array params [ + * int hash, + * ] + * + * @return help_PassportConfig + */ + public function getPassportConfig(array $params); + + /** + * @return help_SupportName + */ + public function getSupportName(); + + /** + * @param array params [ + * InputUser user_id, + * ] + * + * @return help_UserInfo + */ + public function getUserInfo(array $params); + + /** + * @param array params [ + * InputUser user_id, + * string message, + * MessageEntity entities, + * ] + * + * @return help_UserInfo + */ + public function editUserInfo(array $params); } interface channels @@ -2279,17 +2421,6 @@ interface channels */ public function toggleSignatures(array $params); - /** - * @param array params [ - * boolean silent, - * InputChannel channel, - * int id, - * ] - * - * @return Updates - */ - public function updatePinnedMessage(array $params); - /** * @return messages_Chats */ @@ -2586,6 +2717,7 @@ interface langpack { /** * @param array params [ + * string lang_pack, * string lang_code, * ] * @@ -2595,6 +2727,7 @@ interface langpack /** * @param array params [ + * string lang_pack, * string lang_code, * string keys, * ] @@ -2605,6 +2738,7 @@ interface langpack /** * @param array params [ + * string lang_code, * int from_version, * ] * @@ -2613,7 +2747,21 @@ interface langpack public function getDifference(array $params); /** + * @param array params [ + * string lang_pack, + * ] + * * @return Vector_of_LangPackLanguage */ - public function getLanguages(); + public function getLanguages(array $params); + + /** + * @param array params [ + * string lang_pack, + * string lang_code, + * ] + * + * @return LangPackLanguage + */ + public function getLanguage(array $params); } diff --git a/src/danog/MadelineProto/Lang.php b/src/danog/MadelineProto/Lang.php index 7c9dfc55..65caab55 100644 --- a/src/danog/MadelineProto/Lang.php +++ b/src/danog/MadelineProto/Lang.php @@ -1,14 +1,19 @@ . -*/ +/** + * Lang module + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see . + * + * @author Daniil Gentili + * @copyright 2016-2018 Daniil Gentili + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ namespace danog\MadelineProto; @@ -281,7 +286,7 @@ class Lang 'type_extract_error_id' => 'Could not extract type: %s with id %s', 'vector_invalid' => 'Invalid vector constructor: ', 'constructor_not_found' => 'Constructor not found for type: ', - 'rand_bytes_too_small' => 'random_bytes is too small!', + 'rand_bytes_too_small' => 'Random_bytes is too small!', 'botapi_conversion_error' => 'Can\'t convert %s to a bot API object', 'non_text_conversion' => 'Can\'t convert non text messages yet!', 'last_byte_invalid' => 'Invalid last byte', @@ -292,10 +297,10 @@ class Lang 'shutting_down_handler_pool' => 'Shutting down handler pool for dc %s, %d jobs left', 'secret_chat_skipping' => 'I do not have the secret chat %s in the database, skipping message...', 'fingerprint_mismatch' => 'Key fingerprint mismatch', - 'msg_data_length_too_big' => 'message_data_length is too big', + 'msg_data_length_too_big' => 'Message_data_length is too big', 'length_not_divisible_16' => 'Length of decrypted data is not divisible by 16', - 'msg_key_mismatch' => 'msg_key mismatch', - 'rand_bytes_too_short' => 'random_bytes is too short!', + 'msg_key_mismatch' => 'Msg_key mismatch', + 'rand_bytes_too_short' => 'Random_bytes is too short!', 'resending_unsupported' => 'Resending of messages is not yet supported', 'unrecognized_dec_msg' => 'Unrecognized decrypted message received: ', 'method_req_pq' => 'Requests PQ for factorization', @@ -317,7 +322,7 @@ class Lang 'method_rpc_drop_answer_param_req_msg_id_type_long' => 'The message ID of the request', 'method_get_future_salts' => 'Get future salts', 'method_get_future_salts_param_num_type_int' => 'How many salts should be fetched', - 'method_ping' => 'pings the server', + 'method_ping' => 'Pings the server', 'method_ping_param_ping_id_type_long' => 'Ping ID', 'method_ping_delay_disconnect' => 'Pings the server and causes disconection if the same method is not called within ping_disconnect_delay', 'method_ping_delay_disconnect_param_ping_id_type_long' => 'Ping ID', @@ -326,7 +331,7 @@ class Lang 'method_destroy_session_param_session_id_type_long' => 'The session to destroy', 'method_http_wait' => 'Makes the server send messages waiting in the buffer', 'method_http_wait_param_max_delay_type_int' => 'Denotes the maximum number of milliseconds that has elapsed between the first message for this session and the transmission of an HTTP response', - 'method_http_wait_param_wait_after_type_int' => 'after the receipt of the latest message for a particular session, the server waits another wait_after milliseconds in case there are more messages. If there are no additional messages, the result is transmitted (a container with all the messages).', + 'method_http_wait_param_wait_after_type_int' => 'After the receipt of the latest message for a particular session, the server waits another wait_after milliseconds in case there are more messages. If there are no additional messages, the result is transmitted (a container with all the messages).', 'method_http_wait_param_max_wait_type_int' => 'If more messages appear, the wait_after timer is reset.', 'method_invokeAfterMsg' => 'Invokes a query after successfull completion of one of the previous queries.', 'method_invokeAfterMsg_param_msg_id_type_long' => 'Message identifier on which a current query depends', @@ -418,7 +423,7 @@ class Lang 'method_account.updateProfile_param_last_name_type_string' => 'The last name', 'method_account.updateProfile_param_about_type_string' => 'The bio/about field', 'method_account.updateStatus' => 'Update online status', - 'method_account.updateStatus_param_offline_type_Bool' => 'offline to set the status to offline', + 'method_account.updateStatus_param_offline_type_Bool' => 'True to set the status to offline', 'method_account.getWallPapers' => 'Returns a list of available wallpapers.', 'method_account.reportPeer' => 'Report for spam', 'method_account.reportPeer_param_peer_type_InputPeer' => 'The peer to report', @@ -453,7 +458,7 @@ class Lang 'method_account.getPassword' => 'Get the current password', 'method_account.getPasswordSettings' => 'Get the current 2FA settings', 'method_account.getPasswordSettings_param_current_password_hash_type_bytes' => 'Use only if you have set a 2FA password: `$current_salt = $MadelineProto->account->getPassword()[\'current_salt\']; $current_password_hash = hash(\'sha256\', $current_salt.$password.$current_salt, true);`', - 'method_account.updatePasswordSettings' => 'Update the 2FA password settings', + 'method_account.updatePasswordSettings' => 'You cannot use this method directly; use $MadelineProto->update_2fa($params), instead (see https://docs.madelineproto.xyz for more info)', 'method_account.updatePasswordSettings_param_current_password_hash_type_bytes' => 'Use only if you have set a 2FA password: `$current_salt = $MadelineProto->account->getPassword()[\'current_salt\']; $current_password_hash = hash(\'sha256\', $current_salt.$password.$current_salt, true);`', 'method_account.updatePasswordSettings_param_new_settings_type_account.PasswordInputSettings' => 'New 2FA settings', 'method_account.sendConfirmPhoneCode' => 'Send confirmation phone code', @@ -461,7 +466,7 @@ class Lang 'method_account.sendConfirmPhoneCode_param_hash_type_string' => 'The hash', 'method_account.sendConfirmPhoneCode_param_current_number_type_Bool' => 'The current phone number', 'method_account.confirmPhone' => 'Confirm this phone number is associated to this account, obtain phone_code_hash from sendConfirmPhoneCode', - 'method_account.confirmPhone_param_phone_code_hash_type_string' => 'obtain phone_code_hash from sendConfirmPhoneCode', + 'method_account.confirmPhone_param_phone_code_hash_type_string' => 'Obtain phone_code_hash from sendConfirmPhoneCode', 'method_account.confirmPhone_param_phone_code_type_string' => 'The code sent by sendConfirmPhoneCode', 'method_account.getTmpPassword' => 'Get temporary password for buying products through bots', 'method_account.getTmpPassword_param_password_hash_type_bytes' => 'The password hash', @@ -476,7 +481,7 @@ class Lang 'method_users.getFullUser_param_id_type_InputUser' => 'You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://docs.madelineproto.xyz for more info)', 'method_contacts.getStatuses' => 'Get online status of all users', 'method_contacts.getContacts' => 'Get all contacts', - 'method_contacts.getContacts_param_hash_type_int' => 'user ids of contacts previously fetched with this method', + 'method_contacts.getContacts_param_hash_type_int' => 'User ids of contacts previously fetched with this method', 'method_contacts.importContacts' => 'Add phone number as contact', 'method_contacts.importContacts_param_contacts_type_Vector t' => 'The numbers to import', 'method_contacts.deleteContact' => 'Delete a contact', @@ -507,7 +512,7 @@ class Lang 'method_contacts.getTopPeers_param_channels_type_true' => 'Fetch channels and supergroups?', 'method_contacts.getTopPeers_param_offset_type_int' => 'Initially 0, then `$offset += $contacts_TopPeers[\'categories\'][\'count\'];`', 'method_contacts.getTopPeers_param_limit_type_int' => 'How many results to fetch', - 'method_contacts.getTopPeers_param_hash_type_int' => 'peer ids previously fetched with this method', + 'method_contacts.getTopPeers_param_hash_type_int' => 'Peer ids previously fetched with this method', 'method_contacts.resetTopPeerRating' => 'Reset top peer rating for a certain category/peer', 'method_contacts.resetTopPeerRating_param_category_type_TopPeerCategory' => 'The category ', 'method_contacts.resetTopPeerRating_param_peer_type_InputPeer' => 'The peer', @@ -516,9 +521,9 @@ class Lang 'method_messages.getMessages_param_id_type_Vector t' => 'The IDs of messages to fetch (only for users and normal groups)', 'method_messages.getDialogs' => 'Gets list of chats: you should use $MadelineProto->get_dialogs() instead: https://docs.madelineproto.xyz/docs/DIALOGS.html', 'method_messages.getDialogs_param_exclude_pinned_type_true' => 'Do not fetch pinned chats', - 'method_messages.getDialogs_param_offset_date_type_int' => 'end($res[\'messages\'])[\'date\'];', - 'method_messages.getDialogs_param_offset_id_type_int' => 'end($res[\'messages\'])[\'id\'];', - 'method_messages.getDialogs_param_offset_peer_type_InputPeer' => 'end($res[\'dialogs\'])[\'peer\'];', + 'method_messages.getDialogs_param_offset_date_type_int' => 'End($res[\'messages\'])[\'date\'];', + 'method_messages.getDialogs_param_offset_id_type_int' => 'End($res[\'messages\'])[\'id\'];', + 'method_messages.getDialogs_param_offset_peer_type_InputPeer' => 'End($res[\'dialogs\'])[\'peer\'];', 'method_messages.getDialogs_param_limit_type_int' => 'Number of dialogs to fetch', 'method_messages.getHistory' => 'Get previous messages of a group', 'method_messages.getHistory_param_peer_type_InputPeer' => 'The chat', @@ -528,7 +533,7 @@ class Lang 'method_messages.getHistory_param_limit_type_int' => 'Number of messages to fetch', 'method_messages.getHistory_param_max_id_type_int' => 'Maximum message ID to fetch', 'method_messages.getHistory_param_min_id_type_int' => 'Minumum message ID to fetch', - 'method_messages.getHistory_param_hash_type_int' => 'list of IDs of already parsed messages', + 'method_messages.getHistory_param_hash_type_int' => 'List of IDs of already parsed messages', 'method_messages.search' => 'Search peers or messages', 'method_messages.search_param_peer_type_InputPeer' => 'Where to search', 'method_messages.search_param_q_type_string' => 'What to search', @@ -646,7 +651,7 @@ class Lang 'method_messages.readMessageContents_param_id_type_Vector t' => 'The messages to mark as read (only users and normal chats, not supergroups)', 'method_messages.getStickers' => 'Get stickers', 'method_messages.getStickers_param_emoticon_type_string' => 'Search by emoji', - 'method_messages.getStickers_param_hash_type_string' => 'previously fetched sticker IDs', + 'method_messages.getStickers_param_hash_type_string' => 'Previously fetched sticker IDs', 'method_messages.getAllStickers' => 'Get all stickerpacks', 'method_messages.getAllStickers_param_hash_type_int' => '0 or $result[\'hash\']', 'method_messages.getWebPagePreview' => 'Get webpage preview', @@ -875,7 +880,7 @@ class Lang 'method_updates.getChannelDifference_param_filter_type_ChannelMessagesFilter' => 'You cannot use this method directly, see https://docs.madelineproto.xyz for more info on handling updates', 'method_updates.getChannelDifference_param_pts_type_int' => 'You cannot use this method directly, see https://docs.madelineproto.xyz for more info on handling updates', 'method_updates.getChannelDifference_param_limit_type_int' => 'You cannot use this method directly, see https://docs.madelineproto.xyz for more info on handling updates', - 'method_photos.updateProfilePhoto' => 'Update the profile photo (use photos->uploadProfilePhoto to upload the photo)', + 'method_photos.updateProfilePhoto' => 'Change the profile photo', 'method_photos.updateProfilePhoto_param_id_type_InputPhoto' => 'The photo to use', 'method_photos.uploadProfilePhoto' => 'Upload profile photo', 'method_photos.uploadProfilePhoto_param_file_type_InputFile' => 'The photo', @@ -950,7 +955,7 @@ class Lang 'method_channels.getParticipants_param_filter_type_ChannelParticipantsFilter' => 'Member filter', 'method_channels.getParticipants_param_offset_type_int' => 'Offset', 'method_channels.getParticipants_param_limit_type_int' => 'Limit', - 'method_channels.getParticipants_param_hash_type_int' => 'sorted list of IDs of participants you already fetched', + 'method_channels.getParticipants_param_hash_type_int' => 'Sorted list of IDs of participants you already fetched', 'method_channels.getParticipant' => 'Get info about a certain channel/supergroup participant', 'method_channels.getParticipant_param_channel_type_InputChannel' => 'The channel/supergroup', 'method_channels.getParticipant_param_user_id_type_InputUser' => 'The user to fetch info about', @@ -1154,7 +1159,7 @@ class Lang 'method_geochats.getLocated_param_radius_type_int' => 'Radius', 'method_geochats.getLocated_param_limit_type_int' => 'Number of results to return', 'method_geochats.getRecents' => 'Get recent geochats', - 'method_geochats.getRecents_param_offset_type_int' => 'offset', + 'method_geochats.getRecents_param_offset_type_int' => 'Offset', 'method_geochats.getRecents_param_limit_type_int' => 'Number of results to return', 'method_geochats.checkin' => 'Join a geochat', 'method_geochats.checkin_param_peer_type_InputGeoChat' => 'The geochat', @@ -1257,8 +1262,8 @@ class Lang 'method_destroy_auth_key' => 'Destroy current authorization key', 'method_phone.requestCall_param_g_a_type_bytes' => 'You cannot use this method directly, see https://docs.madelineproto.xyz#calls for more info on handling calls', 'method_phone.acceptCall_param_key_fingerprint_type_long' => 'You cannot use this method directly, see https://docs.madelineproto.xyz#calls for more info on handling calls', - 'method_req_DH_params_param_p_type_string' => 'factorized p from pq', - 'method_req_DH_params_param_q_type_string' => 'factorized q from pq', + 'method_req_DH_params_param_p_type_string' => 'Factorized p from pq', + 'method_req_DH_params_param_q_type_string' => 'Factorized q from pq', 'method_req_DH_params_param_encrypted_data_type_string' => 'Encrypted message', 'method_set_client_DH_params_param_encrypted_data_type_string' => 'Encrypted message', 'method_contest.saveDeveloperInfo' => 'Save developer info for telegram contest', @@ -1284,2830 +1289,2830 @@ class Lang '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' => '', - 'object_p_q_inner_data_temp_param_q_type_bytes' => '', - 'object_p_q_inner_data_temp_param_nonce_type_int128' => '', - 'object_p_q_inner_data_temp_param_server_nonce_type_int128' => '', - 'object_p_q_inner_data_temp_param_new_nonce_type_int256' => '', - 'object_p_q_inner_data_temp_param_expires_in_type_int' => '', - 'object_server_DH_params_fail' => '', - 'object_server_DH_params_fail_param_nonce_type_int128' => '', - 'object_server_DH_params_fail_param_server_nonce_type_int128' => '', - 'object_server_DH_params_fail_param_new_nonce_hash_type_int128' => '', - 'object_server_DH_params_ok' => '', - 'object_server_DH_params_ok_param_nonce_type_int128' => '', - 'object_server_DH_params_ok_param_server_nonce_type_int128' => '', - 'object_server_DH_params_ok_param_encrypted_answer_type_bytes' => '', - 'object_server_DH_inner_data' => '', - 'object_server_DH_inner_data_param_nonce_type_int128' => '', - 'object_server_DH_inner_data_param_server_nonce_type_int128' => '', - 'object_server_DH_inner_data_param_g_type_int' => '', - 'object_server_DH_inner_data_param_dh_prime_type_bytes' => '', - 'object_server_DH_inner_data_param_g_a_type_bytes' => '', - 'object_server_DH_inner_data_param_server_time_type_int' => '', - 'object_client_DH_inner_data' => '', - 'object_client_DH_inner_data_param_nonce_type_int128' => '', - 'object_client_DH_inner_data_param_server_nonce_type_int128' => '', - 'object_client_DH_inner_data_param_retry_id_type_long' => '', - 'object_client_DH_inner_data_param_g_b_type_bytes' => '', - 'object_dh_gen_ok' => '', - 'object_dh_gen_ok_param_nonce_type_int128' => '', - 'object_dh_gen_ok_param_server_nonce_type_int128' => '', - 'object_dh_gen_ok_param_new_nonce_hash1_type_int128' => '', - 'object_dh_gen_retry' => '', - 'object_dh_gen_retry_param_nonce_type_int128' => '', - 'object_dh_gen_retry_param_server_nonce_type_int128' => '', - 'object_dh_gen_retry_param_new_nonce_hash2_type_int128' => '', - 'object_dh_gen_fail' => '', - 'object_dh_gen_fail_param_nonce_type_int128' => '', - 'object_dh_gen_fail_param_server_nonce_type_int128' => '', - 'object_dh_gen_fail_param_new_nonce_hash3_type_int128' => '', - 'object_rpc_result' => '', - 'object_rpc_result_param_req_msg_id_type_long' => '', - 'object_rpc_result_param_result_type_Object' => '', - 'object_rpc_error' => '', - 'object_rpc_error_param_error_code_type_int' => '', - 'object_rpc_error_param_error_message_type_string' => '', - 'object_rpc_answer_unknown' => '', - 'object_rpc_answer_dropped_running' => '', - 'object_rpc_answer_dropped' => '', - 'object_rpc_answer_dropped_param_msg_id_type_long' => '', - 'object_rpc_answer_dropped_param_seq_no_type_int' => '', - 'object_rpc_answer_dropped_param_bytes_type_int' => '', - 'object_future_salt' => '', - 'object_future_salt_param_valid_since_type_int' => '', - 'object_future_salt_param_valid_until_type_int' => '', - 'object_future_salt_param_salt_type_long' => '', - 'object_future_salts' => '', - 'object_future_salts_param_req_msg_id_type_long' => '', - 'object_future_salts_param_now_type_int' => '', - 'object_future_salts_param_salts_type_vector' => '', - 'object_pong' => '', - 'object_pong_param_msg_id_type_long' => '', - 'object_pong_param_ping_id_type_long' => '', - 'object_destroy_session_ok' => '', - 'object_destroy_session_ok_param_session_id_type_long' => '', - 'object_destroy_session_none' => '', - 'object_destroy_session_none_param_session_id_type_long' => '', - 'object_new_session_created' => '', - 'object_new_session_created_param_first_msg_id_type_long' => '', - 'object_new_session_created_param_unique_id_type_long' => '', - 'object_new_session_created_param_server_salt_type_long' => '', - 'object_msg_container' => '', - 'object_msg_container_param_messages_type_vector' => '', + 'object_p_q_inner_data_temp' => 'Inner data temp', + 'object_p_q_inner_data_temp_param_pq_type_bytes' => 'Pq', + 'object_p_q_inner_data_temp_param_p_type_bytes' => 'P', + 'object_p_q_inner_data_temp_param_q_type_bytes' => 'Q', + 'object_p_q_inner_data_temp_param_nonce_type_int128' => 'Random number for cryptographic security', + 'object_p_q_inner_data_temp_param_server_nonce_type_int128' => 'Random number for cryptographic security, given by server', + 'object_p_q_inner_data_temp_param_new_nonce_type_int256' => 'New nonce', + 'object_p_q_inner_data_temp_param_expires_in_type_int' => 'Expires in', + 'object_server_DH_params_fail' => 'Server params fail', + 'object_server_DH_params_fail_param_nonce_type_int128' => 'Random number for cryptographic security', + 'object_server_DH_params_fail_param_server_nonce_type_int128' => 'Random number for cryptographic security, given by server', + 'object_server_DH_params_fail_param_new_nonce_hash_type_int128' => 'New nonce hash', + 'object_server_DH_params_ok' => 'Server params ok', + 'object_server_DH_params_ok_param_nonce_type_int128' => 'Random number for cryptographic security', + 'object_server_DH_params_ok_param_server_nonce_type_int128' => 'Random number for cryptographic security, given by server', + 'object_server_DH_params_ok_param_encrypted_answer_type_bytes' => 'Encrypted answer', + 'object_server_DH_inner_data' => 'Server inner data', + 'object_server_DH_inner_data_param_nonce_type_int128' => 'Random number for cryptographic security', + 'object_server_DH_inner_data_param_server_nonce_type_int128' => 'Random number for cryptographic security, given by server', + 'object_server_DH_inner_data_param_g_type_int' => 'G', + 'object_server_DH_inner_data_param_dh_prime_type_bytes' => 'Dh prime', + 'object_server_DH_inner_data_param_g_a_type_bytes' => 'G a', + 'object_server_DH_inner_data_param_server_time_type_int' => 'Server time', + 'object_client_DH_inner_data' => 'Client inner data', + 'object_client_DH_inner_data_param_nonce_type_int128' => 'Random number for cryptographic security', + 'object_client_DH_inner_data_param_server_nonce_type_int128' => 'Random number for cryptographic security, given by server', + 'object_client_DH_inner_data_param_retry_id_type_long' => 'Retry ID', + 'object_client_DH_inner_data_param_g_b_type_bytes' => 'G b', + 'object_dh_gen_ok' => 'Dh gen ok', + 'object_dh_gen_ok_param_nonce_type_int128' => 'Random number for cryptographic security', + 'object_dh_gen_ok_param_server_nonce_type_int128' => 'Random number for cryptographic security, given by server', + 'object_dh_gen_ok_param_new_nonce_hash1_type_int128' => 'New nonce hash1', + 'object_dh_gen_retry' => 'Dh gen retry', + 'object_dh_gen_retry_param_nonce_type_int128' => 'Random number for cryptographic security', + 'object_dh_gen_retry_param_server_nonce_type_int128' => 'Random number for cryptographic security, given by server', + 'object_dh_gen_retry_param_new_nonce_hash2_type_int128' => 'New nonce hash2', + 'object_dh_gen_fail' => 'Dh gen fail', + 'object_dh_gen_fail_param_nonce_type_int128' => 'Random number for cryptographic security', + 'object_dh_gen_fail_param_server_nonce_type_int128' => 'Random number for cryptographic security, given by server', + 'object_dh_gen_fail_param_new_nonce_hash3_type_int128' => 'New nonce hash3', + 'object_rpc_result' => 'Rpc result', + 'object_rpc_result_param_req_msg_id_type_long' => 'Req msg ID', + 'object_rpc_result_param_result_type_Object' => 'Result', + 'object_rpc_error' => 'Rpc error', + 'object_rpc_error_param_error_code_type_int' => 'Error code', + 'object_rpc_error_param_error_message_type_string' => 'Error message', + 'object_rpc_answer_unknown' => 'Rpc answer unknown', + 'object_rpc_answer_dropped_running' => 'Rpc answer dropped running', + 'object_rpc_answer_dropped' => 'Rpc answer dropped', + 'object_rpc_answer_dropped_param_msg_id_type_long' => 'Msg ID', + 'object_rpc_answer_dropped_param_seq_no_type_int' => 'Seq no', + 'object_rpc_answer_dropped_param_bytes_type_int' => 'Bytes', + 'object_future_salt' => 'Future salt', + 'object_future_salt_param_valid_since_type_int' => 'Valid since', + 'object_future_salt_param_valid_until_type_int' => 'Valid until', + 'object_future_salt_param_salt_type_long' => 'Salt', + 'object_future_salts' => 'Future salts', + 'object_future_salts_param_req_msg_id_type_long' => 'Req msg ID', + 'object_future_salts_param_now_type_int' => 'Now', + 'object_future_salts_param_salts_type_vector' => 'Salts', + 'object_pong' => 'Pong', + 'object_pong_param_msg_id_type_long' => 'Msg ID', + 'object_pong_param_ping_id_type_long' => 'Ping ID', + 'object_destroy_session_ok' => 'Destroy session ok', + 'object_destroy_session_ok_param_session_id_type_long' => 'Session ID', + 'object_destroy_session_none' => 'Destroy session none', + 'object_destroy_session_none_param_session_id_type_long' => 'Session ID', + 'object_new_session_created' => 'New session created', + 'object_new_session_created_param_first_msg_id_type_long' => 'First msg ID', + 'object_new_session_created_param_unique_id_type_long' => 'Unique ID', + 'object_new_session_created_param_server_salt_type_long' => 'Server salt', + 'object_msg_container' => 'Msg container', + 'object_msg_container_param_messages_type_vector' => 'Messages', 'object_MTmessage' => 'MTProto message', 'object_MTmessage_param_msg_id_type_long' => 'Message ID', 'object_MTmessage_param_seqno_type_int' => 'Seqno', 'object_MTmessage_param_bytes_type_int' => 'Message body', 'object_MTmessage_param_body_type_Object' => 'Message body', - 'object_msg_copy' => '', - 'object_msg_copy_param_orig_message_type_MTMessage' => '', - 'object_gzip_packed' => '', - 'object_gzip_packed_param_packed_data_type_bytes' => '', - 'object_msgs_ack' => '', - 'object_msgs_ack_param_msg_ids_type_Vector t' => '', - 'object_bad_msg_notification' => '', - 'object_bad_msg_notification_param_bad_msg_id_type_long' => '', - 'object_bad_msg_notification_param_bad_msg_seqno_type_int' => '', - 'object_bad_msg_notification_param_error_code_type_int' => '', - 'object_bad_server_salt' => '', - 'object_bad_server_salt_param_bad_msg_id_type_long' => '', - 'object_bad_server_salt_param_bad_msg_seqno_type_int' => '', - 'object_bad_server_salt_param_error_code_type_int' => '', - 'object_bad_server_salt_param_new_server_salt_type_long' => '', - 'object_msg_resend_req' => '', - 'object_msg_resend_req_param_msg_ids_type_Vector t' => '', - 'object_msgs_state_req' => '', - 'object_msgs_state_req_param_msg_ids_type_Vector t' => '', - 'object_msgs_state_info' => '', - 'object_msgs_state_info_param_req_msg_id_type_long' => '', - 'object_msgs_state_info_param_info_type_bytes' => '', - 'object_msgs_all_info' => '', - 'object_msgs_all_info_param_msg_ids_type_Vector t' => '', - 'object_msgs_all_info_param_info_type_bytes' => '', - 'object_msg_detailed_info' => '', - 'object_msg_detailed_info_param_msg_id_type_long' => '', - 'object_msg_detailed_info_param_answer_msg_id_type_long' => '', - 'object_msg_detailed_info_param_bytes_type_int' => '', - 'object_msg_detailed_info_param_status_type_int' => '', - 'object_msg_new_detailed_info' => '', - 'object_msg_new_detailed_info_param_answer_msg_id_type_long' => '', - 'object_msg_new_detailed_info_param_bytes_type_int' => '', - 'object_msg_new_detailed_info_param_status_type_int' => '', - 'object_bind_auth_key_inner' => '', - 'object_bind_auth_key_inner_param_nonce_type_long' => '', - 'object_bind_auth_key_inner_param_temp_auth_key_id_type_long' => '', - 'object_bind_auth_key_inner_param_perm_auth_key_id_type_long' => '', - 'object_bind_auth_key_inner_param_temp_session_id_type_long' => '', - 'object_bind_auth_key_inner_param_expires_at_type_int' => '', - 'object_boolFalse' => '', - 'object_boolTrue' => '', - 'object_true' => '', - 'object_error' => '', - 'object_error_param_code_type_int' => '', - 'object_error_param_text_type_string' => '', - 'object_null' => '', - 'object_inputPeerEmpty' => '', - 'object_inputPeerSelf' => '', - 'object_inputPeerChat' => '', - 'object_inputPeerChat_param_chat_id_type_int' => '', - 'object_inputPeerUser' => '', - 'object_inputPeerUser_param_user_id_type_int' => '', - 'object_inputPeerUser_param_access_hash_type_long' => '', - 'object_inputPeerChannel' => '', - 'object_inputPeerChannel_param_channel_id_type_int' => '', - 'object_inputPeerChannel_param_access_hash_type_long' => '', - 'object_inputUserEmpty' => '', - 'object_inputUserSelf' => '', - 'object_inputUser' => '', - 'object_inputUser_param_user_id_type_int' => '', - 'object_inputUser_param_access_hash_type_long' => '', - 'object_inputPhoneContact' => '', - 'object_inputPhoneContact_param_client_id_type_long' => '', - 'object_inputPhoneContact_param_phone_type_string' => '', - 'object_inputPhoneContact_param_first_name_type_string' => '', - 'object_inputPhoneContact_param_last_name_type_string' => '', - 'object_inputFile' => '', - 'object_inputFile_param_id_type_long' => '', - 'object_inputFile_param_parts_type_int' => '', - 'object_inputFile_param_name_type_string' => '', - 'object_inputFile_param_md5_checksum_type_string' => '', - 'object_inputFileBig' => '', - 'object_inputFileBig_param_id_type_long' => '', - 'object_inputFileBig_param_parts_type_int' => '', - 'object_inputFileBig_param_name_type_string' => '', - 'object_inputMediaEmpty' => '', - 'object_inputMediaUploadedPhoto' => '', - 'object_inputMediaUploadedPhoto_param_file_type_InputFile' => '', - 'object_inputMediaUploadedPhoto_param_stickers_type_Vector t' => '', - 'object_inputMediaUploadedPhoto_param_ttl_seconds_type_int' => '', - 'object_inputMediaPhoto' => '', - 'object_inputMediaPhoto_param_id_type_InputPhoto' => '', - 'object_inputMediaPhoto_param_ttl_seconds_type_int' => '', - 'object_inputMediaGeoPoint' => '', - 'object_inputMediaGeoPoint_param_geo_point_type_InputGeoPoint' => '', - 'object_inputMediaContact' => '', - 'object_inputMediaContact_param_phone_number_type_string' => '', - 'object_inputMediaContact_param_first_name_type_string' => '', - 'object_inputMediaContact_param_last_name_type_string' => '', - 'object_inputMediaUploadedDocument' => '', - 'object_inputMediaUploadedDocument_param_nosound_video_type_true' => '', - 'object_inputMediaUploadedDocument_param_file_type_InputFile' => '', - 'object_inputMediaUploadedDocument_param_thumb_type_InputFile' => '', - 'object_inputMediaUploadedDocument_param_mime_type_type_string' => '', - 'object_inputMediaUploadedDocument_param_attributes_type_Vector t' => '', - 'object_inputMediaUploadedDocument_param_stickers_type_Vector t' => '', - 'object_inputMediaUploadedDocument_param_ttl_seconds_type_int' => '', - 'object_inputMediaDocument' => '', - 'object_inputMediaDocument_param_id_type_InputDocument' => '', - 'object_inputMediaDocument_param_ttl_seconds_type_int' => '', - 'object_inputMediaVenue' => '', - 'object_inputMediaVenue_param_geo_point_type_InputGeoPoint' => '', - 'object_inputMediaVenue_param_title_type_string' => '', - 'object_inputMediaVenue_param_address_type_string' => '', - 'object_inputMediaVenue_param_provider_type_string' => '', - 'object_inputMediaVenue_param_venue_id_type_string' => '', - 'object_inputMediaVenue_param_venue_type_type_string' => '', - 'object_inputMediaGifExternal' => '', - 'object_inputMediaGifExternal_param_url_type_string' => '', - 'object_inputMediaGifExternal_param_q_type_string' => '', - 'object_inputMediaPhotoExternal' => '', - 'object_inputMediaPhotoExternal_param_url_type_string' => '', - 'object_inputMediaPhotoExternal_param_ttl_seconds_type_int' => '', - 'object_inputMediaDocumentExternal' => '', - 'object_inputMediaDocumentExternal_param_url_type_string' => '', - 'object_inputMediaDocumentExternal_param_ttl_seconds_type_int' => '', - 'object_inputMediaGame' => '', - 'object_inputMediaGame_param_id_type_InputGame' => '', - 'object_inputMediaInvoice' => '', - 'object_inputMediaInvoice_param_title_type_string' => '', - 'object_inputMediaInvoice_param_description_type_string' => '', - 'object_inputMediaInvoice_param_photo_type_InputWebDocument' => '', - 'object_inputMediaInvoice_param_invoice_type_Invoice' => '', - 'object_inputMediaInvoice_param_payload_type_bytes' => '', - 'object_inputMediaInvoice_param_provider_type_string' => '', - 'object_inputMediaInvoice_param_provider_data_type_DataJSON' => '', - 'object_inputMediaInvoice_param_start_param_type_string' => '', - 'object_inputMediaGeoLive' => '', - 'object_inputMediaGeoLive_param_geo_point_type_InputGeoPoint' => '', - 'object_inputMediaGeoLive_param_period_type_int' => '', - 'object_inputChatPhotoEmpty' => '', - 'object_inputChatUploadedPhoto' => '', - 'object_inputChatUploadedPhoto_param_file_type_InputFile' => '', - 'object_inputChatPhoto' => '', - 'object_inputChatPhoto_param_id_type_InputPhoto' => '', - 'object_inputGeoPointEmpty' => '', - 'object_inputGeoPoint' => '', - 'object_inputGeoPoint_param_lat_type_double' => '', - 'object_inputGeoPoint_param_long_type_double' => '', - 'object_inputPhotoEmpty' => '', - 'object_inputPhoto' => '', - 'object_inputPhoto_param_id_type_long' => '', - 'object_inputPhoto_param_access_hash_type_long' => '', - 'object_inputFileLocation' => '', - 'object_inputFileLocation_param_volume_id_type_long' => '', - 'object_inputFileLocation_param_local_id_type_int' => '', - 'object_inputFileLocation_param_secret_type_long' => '', - 'object_inputEncryptedFileLocation' => '', - 'object_inputEncryptedFileLocation_param_id_type_long' => '', - 'object_inputEncryptedFileLocation_param_access_hash_type_long' => '', - 'object_inputDocumentFileLocation' => '', - 'object_inputDocumentFileLocation_param_id_type_long' => '', - 'object_inputDocumentFileLocation_param_access_hash_type_long' => '', - 'object_inputDocumentFileLocation_param_version_type_int' => '', - 'object_inputAppEvent' => '', - 'object_inputAppEvent_param_time_type_double' => '', - 'object_inputAppEvent_param_type_type_string' => '', - 'object_inputAppEvent_param_peer_type_long' => '', - 'object_inputAppEvent_param_data_type_string' => '', - 'object_peerUser' => '', - 'object_peerUser_param_user_id_type_int' => '', - 'object_peerChat' => '', - 'object_peerChat_param_chat_id_type_int' => '', - 'object_peerChannel' => '', - 'object_peerChannel_param_channel_id_type_int' => '', - 'object_storage.fileUnknown' => '', - 'object_storage.filePartial' => '', - 'object_storage.fileJpeg' => '', - 'object_storage.fileGif' => '', - 'object_storage.filePng' => '', - 'object_storage.filePdf' => '', - 'object_storage.fileMp3' => '', - 'object_storage.fileMov' => '', - 'object_storage.fileMp4' => '', - 'object_storage.fileWebp' => '', - 'object_fileLocationUnavailable' => '', - 'object_fileLocationUnavailable_param_volume_id_type_long' => '', - 'object_fileLocationUnavailable_param_local_id_type_int' => '', - 'object_fileLocationUnavailable_param_secret_type_long' => '', - 'object_fileLocation' => '', - 'object_fileLocation_param_dc_id_type_int' => '', - 'object_fileLocation_param_volume_id_type_long' => '', - 'object_fileLocation_param_local_id_type_int' => '', - 'object_fileLocation_param_secret_type_long' => '', - 'object_userEmpty' => '', - 'object_userEmpty_param_id_type_int' => '', - 'object_user' => '', - 'object_user_param_self_type_true' => '', - 'object_user_param_contact_type_true' => '', - 'object_user_param_mutual_contact_type_true' => '', - 'object_user_param_deleted_type_true' => '', - 'object_user_param_bot_type_true' => '', - 'object_user_param_bot_chat_history_type_true' => '', - 'object_user_param_bot_nochats_type_true' => '', - 'object_user_param_verified_type_true' => '', - 'object_user_param_restricted_type_true' => '', - 'object_user_param_min_type_true' => '', - 'object_user_param_bot_inline_geo_type_true' => '', - 'object_user_param_id_type_int' => '', - 'object_user_param_access_hash_type_long' => '', - 'object_user_param_first_name_type_string' => '', - 'object_user_param_last_name_type_string' => '', - 'object_user_param_username_type_string' => '', - 'object_user_param_phone_type_string' => '', - 'object_user_param_photo_type_UserProfilePhoto' => '', - 'object_user_param_status_type_UserStatus' => '', - 'object_user_param_bot_info_version_type_int' => '', - 'object_user_param_restriction_reason_type_string' => '', - 'object_user_param_bot_inline_placeholder_type_string' => '', - 'object_user_param_lang_code_type_string' => '', - 'object_userProfilePhotoEmpty' => '', - 'object_userProfilePhoto' => '', - 'object_userProfilePhoto_param_photo_id_type_long' => '', - 'object_userProfilePhoto_param_photo_small_type_FileLocation' => '', - 'object_userProfilePhoto_param_photo_big_type_FileLocation' => '', - 'object_chatEmpty' => '', - 'object_chatEmpty_param_id_type_int' => '', - 'object_chat' => '', - 'object_chat_param_creator_type_true' => '', - 'object_chat_param_kicked_type_true' => '', - 'object_chat_param_left_type_true' => '', - 'object_chat_param_admins_enabled_type_true' => '', - 'object_chat_param_admin_type_true' => '', - 'object_chat_param_deactivated_type_true' => '', - 'object_chat_param_id_type_int' => '', - 'object_chat_param_title_type_string' => '', - 'object_chat_param_photo_type_ChatPhoto' => '', - 'object_chat_param_participants_count_type_int' => '', - 'object_chat_param_date_type_int' => '', - 'object_chat_param_version_type_int' => '', - 'object_chat_param_migrated_to_type_InputChannel' => '', - 'object_chatForbidden' => '', - 'object_chatForbidden_param_id_type_int' => '', - 'object_chatForbidden_param_title_type_string' => '', - 'object_channel' => '', - 'object_channel_param_creator_type_true' => '', - 'object_channel_param_left_type_true' => '', - 'object_channel_param_editor_type_true' => '', - 'object_channel_param_broadcast_type_true' => '', - 'object_channel_param_verified_type_true' => '', - 'object_channel_param_megagroup_type_true' => '', - 'object_channel_param_restricted_type_true' => '', - 'object_channel_param_democracy_type_true' => '', - 'object_channel_param_signatures_type_true' => '', - 'object_channel_param_min_type_true' => '', - 'object_channel_param_id_type_int' => '', - 'object_channel_param_access_hash_type_long' => '', - 'object_channel_param_title_type_string' => '', - 'object_channel_param_username_type_string' => '', - 'object_channel_param_photo_type_ChatPhoto' => '', - 'object_channel_param_date_type_int' => '', - 'object_channel_param_version_type_int' => '', - 'object_channel_param_restriction_reason_type_string' => '', - 'object_channel_param_admin_rights_type_ChannelAdminRights' => '', - 'object_channel_param_banned_rights_type_ChannelBannedRights' => '', - 'object_channel_param_participants_count_type_int' => '', - 'object_channelForbidden' => '', - 'object_channelForbidden_param_broadcast_type_true' => '', - 'object_channelForbidden_param_megagroup_type_true' => '', - 'object_channelForbidden_param_id_type_int' => '', - 'object_channelForbidden_param_access_hash_type_long' => '', - 'object_channelForbidden_param_title_type_string' => '', - 'object_channelForbidden_param_until_date_type_int' => '', - 'object_chatFull' => '', - 'object_chatFull_param_id_type_int' => '', - 'object_chatFull_param_participants_type_ChatParticipants' => '', - 'object_chatFull_param_chat_photo_type_Photo' => '', - 'object_chatFull_param_notify_settings_type_PeerNotifySettings' => '', - 'object_chatFull_param_exported_invite_type_ExportedChatInvite' => '', - 'object_chatFull_param_bot_info_type_Vector t' => '', - 'object_channelFull' => '', - 'object_channelFull_param_can_view_participants_type_true' => '', - 'object_channelFull_param_can_set_username_type_true' => '', - 'object_channelFull_param_can_set_stickers_type_true' => '', - 'object_channelFull_param_hidden_prehistory_type_true' => '', - 'object_channelFull_param_id_type_int' => '', - 'object_channelFull_param_about_type_string' => '', - 'object_channelFull_param_participants_count_type_int' => '', - 'object_channelFull_param_admins_count_type_int' => '', - 'object_channelFull_param_kicked_count_type_int' => '', - 'object_channelFull_param_banned_count_type_int' => '', - 'object_channelFull_param_read_inbox_max_id_type_int' => '', - 'object_channelFull_param_read_outbox_max_id_type_int' => '', - 'object_channelFull_param_unread_count_type_int' => '', - 'object_channelFull_param_chat_photo_type_Photo' => '', - 'object_channelFull_param_notify_settings_type_PeerNotifySettings' => '', - 'object_channelFull_param_exported_invite_type_ExportedChatInvite' => '', - 'object_channelFull_param_bot_info_type_Vector t' => '', - 'object_channelFull_param_migrated_from_chat_id_type_int' => '', - 'object_channelFull_param_migrated_from_max_id_type_int' => '', - 'object_channelFull_param_pinned_msg_id_type_int' => '', - 'object_channelFull_param_stickerset_type_StickerSet' => '', - 'object_channelFull_param_available_min_id_type_int' => '', - 'object_chatParticipant' => '', - 'object_chatParticipant_param_user_id_type_int' => '', - 'object_chatParticipant_param_inviter_id_type_int' => '', - 'object_chatParticipant_param_date_type_int' => '', - 'object_chatParticipantCreator' => '', - 'object_chatParticipantCreator_param_user_id_type_int' => '', - 'object_chatParticipantAdmin' => '', - 'object_chatParticipantAdmin_param_user_id_type_int' => '', - 'object_chatParticipantAdmin_param_inviter_id_type_int' => '', - 'object_chatParticipantAdmin_param_date_type_int' => '', - 'object_chatParticipantsForbidden' => '', - 'object_chatParticipantsForbidden_param_chat_id_type_int' => '', - 'object_chatParticipantsForbidden_param_self_participant_type_ChatParticipant' => '', - 'object_chatParticipants' => '', - 'object_chatParticipants_param_chat_id_type_int' => '', - 'object_chatParticipants_param_participants_type_Vector t' => '', - 'object_chatParticipants_param_version_type_int' => '', - 'object_chatPhotoEmpty' => '', - 'object_chatPhoto' => '', - 'object_chatPhoto_param_photo_small_type_FileLocation' => '', - 'object_chatPhoto_param_photo_big_type_FileLocation' => '', - 'object_messageEmpty' => '', - 'object_messageEmpty_param_id_type_int' => '', - 'object_message' => '', - 'object_message_param_out_type_true' => '', - 'object_message_param_mentioned_type_true' => '', - 'object_message_param_media_unread_type_true' => '', - 'object_message_param_silent_type_true' => '', - 'object_message_param_post_type_true' => '', - 'object_message_param_id_type_int' => '', - 'object_message_param_from_id_type_int' => '', - 'object_message_param_to_id_type_Peer' => '', - 'object_message_param_fwd_from_type_MessageFwdHeader' => '', - 'object_message_param_via_bot_id_type_int' => '', - 'object_message_param_reply_to_msg_id_type_int' => '', - 'object_message_param_date_type_int' => '', - 'object_message_param_message_type_string' => '', - 'object_message_param_media_type_MessageMedia' => '', - 'object_message_param_reply_markup_type_ReplyMarkup' => '', - 'object_message_param_entities_type_Vector t' => '', - 'object_message_param_views_type_int' => '', - 'object_message_param_edit_date_type_int' => '', - 'object_message_param_post_author_type_string' => '', - 'object_message_param_grouped_id_type_long' => '', - 'object_messageService' => '', - 'object_messageService_param_out_type_true' => '', - 'object_messageService_param_mentioned_type_true' => '', - 'object_messageService_param_media_unread_type_true' => '', - 'object_messageService_param_silent_type_true' => '', - 'object_messageService_param_post_type_true' => '', - 'object_messageService_param_id_type_int' => '', - 'object_messageService_param_from_id_type_int' => '', - 'object_messageService_param_to_id_type_Peer' => '', - 'object_messageService_param_reply_to_msg_id_type_int' => '', - 'object_messageService_param_date_type_int' => '', - 'object_messageService_param_action_type_MessageAction' => '', - 'object_messageMediaEmpty' => '', - 'object_messageMediaPhoto' => '', - 'object_messageMediaPhoto_param_photo_type_Photo' => '', - 'object_messageMediaPhoto_param_ttl_seconds_type_int' => '', - 'object_messageMediaGeo' => '', - 'object_messageMediaGeo_param_geo_type_GeoPoint' => '', - 'object_messageMediaContact' => '', - 'object_messageMediaContact_param_phone_number_type_string' => '', - 'object_messageMediaContact_param_first_name_type_string' => '', - 'object_messageMediaContact_param_last_name_type_string' => '', - 'object_messageMediaContact_param_user_id_type_int' => '', - 'object_messageMediaUnsupported' => '', - 'object_messageMediaDocument' => '', - 'object_messageMediaDocument_param_document_type_Document' => '', - 'object_messageMediaDocument_param_ttl_seconds_type_int' => '', - 'object_messageMediaWebPage' => '', - 'object_messageMediaWebPage_param_webpage_type_WebPage' => '', - 'object_messageMediaVenue' => '', - 'object_messageMediaVenue_param_geo_type_GeoPoint' => '', - 'object_messageMediaVenue_param_title_type_string' => '', - 'object_messageMediaVenue_param_address_type_string' => '', - 'object_messageMediaVenue_param_provider_type_string' => '', - 'object_messageMediaVenue_param_venue_id_type_string' => '', - 'object_messageMediaVenue_param_venue_type_type_string' => '', - 'object_messageMediaGame' => '', - 'object_messageMediaGame_param_game_type_Game' => '', - 'object_messageMediaInvoice' => '', - 'object_messageMediaInvoice_param_shipping_address_requested_type_true' => '', - 'object_messageMediaInvoice_param_test_type_true' => '', - 'object_messageMediaInvoice_param_title_type_string' => '', - 'object_messageMediaInvoice_param_description_type_string' => '', - 'object_messageMediaInvoice_param_photo_type_WebDocument' => '', - 'object_messageMediaInvoice_param_receipt_msg_id_type_int' => '', - 'object_messageMediaInvoice_param_currency_type_string' => '', - 'object_messageMediaInvoice_param_total_amount_type_long' => '', - 'object_messageMediaInvoice_param_start_param_type_string' => '', - 'object_messageMediaGeoLive' => '', - 'object_messageMediaGeoLive_param_geo_type_GeoPoint' => '', - 'object_messageMediaGeoLive_param_period_type_int' => '', - 'object_messageActionEmpty' => '', - 'object_messageActionChatCreate' => '', - 'object_messageActionChatCreate_param_title_type_string' => '', - 'object_messageActionChatCreate_param_users_type_Vector t' => '', - 'object_messageActionChatEditTitle' => '', - 'object_messageActionChatEditTitle_param_title_type_string' => '', - 'object_messageActionChatEditPhoto' => '', - 'object_messageActionChatEditPhoto_param_photo_type_Photo' => '', - 'object_messageActionChatDeletePhoto' => '', - 'object_messageActionChatAddUser' => '', - 'object_messageActionChatAddUser_param_users_type_Vector t' => '', - 'object_messageActionChatDeleteUser' => '', - 'object_messageActionChatDeleteUser_param_user_id_type_int' => '', - 'object_messageActionChatJoinedByLink' => '', - 'object_messageActionChatJoinedByLink_param_inviter_id_type_int' => '', - 'object_messageActionChannelCreate' => '', - 'object_messageActionChannelCreate_param_title_type_string' => '', - 'object_messageActionChatMigrateTo' => '', - 'object_messageActionChatMigrateTo_param_channel_id_type_int' => '', - 'object_messageActionChannelMigrateFrom' => '', - 'object_messageActionChannelMigrateFrom_param_title_type_string' => '', - 'object_messageActionChannelMigrateFrom_param_chat_id_type_int' => '', - 'object_messageActionPinMessage' => '', - 'object_messageActionHistoryClear' => '', - 'object_messageActionGameScore' => '', - 'object_messageActionGameScore_param_game_id_type_long' => '', - 'object_messageActionGameScore_param_score_type_int' => '', - 'object_messageActionPaymentSentMe' => '', - 'object_messageActionPaymentSentMe_param_currency_type_string' => '', - 'object_messageActionPaymentSentMe_param_total_amount_type_long' => '', - 'object_messageActionPaymentSentMe_param_payload_type_bytes' => '', - 'object_messageActionPaymentSentMe_param_info_type_PaymentRequestedInfo' => '', - 'object_messageActionPaymentSentMe_param_shipping_option_id_type_string' => '', - 'object_messageActionPaymentSentMe_param_charge_type_PaymentCharge' => '', - 'object_messageActionPaymentSent' => '', - 'object_messageActionPaymentSent_param_currency_type_string' => '', - 'object_messageActionPaymentSent_param_total_amount_type_long' => '', - 'object_messageActionPhoneCall' => '', - 'object_messageActionPhoneCall_param_call_id_type_long' => '', - 'object_messageActionPhoneCall_param_reason_type_PhoneCallDiscardReason' => '', - 'object_messageActionPhoneCall_param_duration_type_int' => '', - 'object_messageActionScreenshotTaken' => '', - 'object_messageActionCustomAction' => '', - 'object_messageActionCustomAction_param_message_type_string' => '', - 'object_dialog' => '', - 'object_dialog_param_pinned_type_true' => '', - 'object_dialog_param_peer_type_Peer' => '', - 'object_dialog_param_top_message_type_int' => '', - 'object_dialog_param_read_inbox_max_id_type_int' => '', - 'object_dialog_param_read_outbox_max_id_type_int' => '', - 'object_dialog_param_unread_count_type_int' => '', - 'object_dialog_param_unread_mentions_count_type_int' => '', - 'object_dialog_param_notify_settings_type_PeerNotifySettings' => '', - 'object_dialog_param_pts_type_int' => '', - 'object_dialog_param_draft_type_DraftMessage' => '', - 'object_photoEmpty' => '', - 'object_photoEmpty_param_id_type_long' => '', - 'object_photo' => '', - 'object_photo_param_has_stickers_type_true' => '', - 'object_photo_param_id_type_long' => '', - 'object_photo_param_access_hash_type_long' => '', - 'object_photo_param_date_type_int' => '', - 'object_photo_param_sizes_type_Vector t' => '', - 'object_photoSizeEmpty' => '', - 'object_photoSizeEmpty_param_type_type_string' => '', - 'object_photoSize' => '', - 'object_photoSize_param_type_type_string' => '', - 'object_photoSize_param_location_type_FileLocation' => '', - 'object_photoSize_param_w_type_int' => '', - 'object_photoSize_param_h_type_int' => '', - 'object_photoSize_param_size_type_int' => '', - 'object_photoCachedSize' => '', - 'object_photoCachedSize_param_type_type_string' => '', - 'object_photoCachedSize_param_location_type_FileLocation' => '', - 'object_photoCachedSize_param_w_type_int' => '', - 'object_photoCachedSize_param_h_type_int' => '', - 'object_photoCachedSize_param_bytes_type_bytes' => '', - 'object_geoPointEmpty' => '', - 'object_geoPoint' => '', - 'object_geoPoint_param_long_type_double' => '', - 'object_geoPoint_param_lat_type_double' => '', - 'object_auth.checkedPhone' => '', - 'object_auth.checkedPhone_param_phone_registered_type_Bool' => '', - 'object_auth.sentCode' => '', - 'object_auth.sentCode_param_phone_registered_type_true' => '', - 'object_auth.sentCode_param_type_type_auth.SentCodeType' => '', - 'object_auth.sentCode_param_phone_code_hash_type_string' => '', - 'object_auth.sentCode_param_next_type_type_auth.CodeType' => '', - 'object_auth.sentCode_param_timeout_type_int' => '', - 'object_auth.authorization' => '', - 'object_auth.authorization_param_tmp_sessions_type_int' => '', - 'object_auth.authorization_param_user_type_User' => '', - 'object_auth.exportedAuthorization' => '', - 'object_auth.exportedAuthorization_param_id_type_int' => '', - 'object_auth.exportedAuthorization_param_bytes_type_bytes' => '', - 'object_inputNotifyPeer' => '', - 'object_inputNotifyPeer_param_peer_type_InputPeer' => '', - 'object_inputNotifyUsers' => '', - 'object_inputNotifyChats' => '', - 'object_inputNotifyAll' => '', - 'object_inputPeerNotifyEventsEmpty' => '', - 'object_inputPeerNotifyEventsAll' => '', - 'object_inputPeerNotifySettings' => '', - 'object_inputPeerNotifySettings_param_show_previews_type_true' => '', - 'object_inputPeerNotifySettings_param_silent_type_true' => '', - 'object_inputPeerNotifySettings_param_mute_until_type_int' => '', - 'object_inputPeerNotifySettings_param_sound_type_string' => '', - 'object_peerNotifyEventsEmpty' => '', - 'object_peerNotifyEventsAll' => '', - 'object_peerNotifySettingsEmpty' => '', - 'object_peerNotifySettings' => '', - 'object_peerNotifySettings_param_show_previews_type_true' => '', - 'object_peerNotifySettings_param_silent_type_true' => '', - 'object_peerNotifySettings_param_mute_until_type_int' => '', - 'object_peerNotifySettings_param_sound_type_string' => '', - 'object_peerSettings' => '', - 'object_peerSettings_param_report_spam_type_true' => '', - 'object_wallPaper' => '', - 'object_wallPaper_param_id_type_int' => '', - 'object_wallPaper_param_title_type_string' => '', - 'object_wallPaper_param_sizes_type_Vector t' => '', - 'object_wallPaper_param_color_type_int' => '', - 'object_wallPaperSolid' => '', - 'object_wallPaperSolid_param_id_type_int' => '', - 'object_wallPaperSolid_param_title_type_string' => '', - 'object_wallPaperSolid_param_bg_color_type_int' => '', - 'object_wallPaperSolid_param_color_type_int' => '', - 'object_inputReportReasonSpam' => '', - 'object_inputReportReasonViolence' => '', - 'object_inputReportReasonPornography' => '', - 'object_inputReportReasonOther' => '', - 'object_inputReportReasonOther_param_text_type_string' => '', - 'object_userFull' => '', - 'object_userFull_param_blocked_type_true' => '', - 'object_userFull_param_phone_calls_available_type_true' => '', - 'object_userFull_param_phone_calls_private_type_true' => '', - 'object_userFull_param_user_type_User' => '', - 'object_userFull_param_about_type_string' => '', - 'object_userFull_param_link_type_contacts.Link' => '', - 'object_userFull_param_profile_photo_type_Photo' => '', - 'object_userFull_param_notify_settings_type_PeerNotifySettings' => '', - 'object_userFull_param_bot_info_type_BotInfo' => '', - 'object_userFull_param_common_chats_count_type_int' => '', - 'object_contact' => '', - 'object_contact_param_user_id_type_int' => '', - 'object_contact_param_mutual_type_Bool' => '', - 'object_importedContact' => '', - 'object_importedContact_param_user_id_type_int' => '', - 'object_importedContact_param_client_id_type_long' => '', - 'object_contactBlocked' => '', - 'object_contactBlocked_param_user_id_type_int' => '', - 'object_contactBlocked_param_date_type_int' => '', - 'object_contactStatus' => '', - 'object_contactStatus_param_user_id_type_int' => '', - 'object_contactStatus_param_status_type_UserStatus' => '', - 'object_contacts.link' => '', - 'object_contacts.link_param_my_link_type_ContactLink' => '', - 'object_contacts.link_param_foreign_link_type_ContactLink' => '', - 'object_contacts.link_param_user_type_User' => '', - 'object_contacts.contactsNotModified' => '', - 'object_contacts.contacts' => '', - 'object_contacts.contacts_param_contacts_type_Vector t' => '', - 'object_contacts.contacts_param_saved_count_type_int' => '', - 'object_contacts.contacts_param_users_type_Vector t' => '', - 'object_contacts.importedContacts' => '', - 'object_contacts.importedContacts_param_imported_type_Vector t' => '', - 'object_contacts.importedContacts_param_popular_invites_type_Vector t' => '', - 'object_contacts.importedContacts_param_retry_contacts_type_Vector t' => '', - 'object_contacts.importedContacts_param_users_type_Vector t' => '', - 'object_contacts.blocked' => '', - 'object_contacts.blocked_param_blocked_type_Vector t' => '', - 'object_contacts.blocked_param_users_type_Vector t' => '', - 'object_contacts.blockedSlice' => '', - 'object_contacts.blockedSlice_param_count_type_int' => '', - 'object_contacts.blockedSlice_param_blocked_type_Vector t' => '', - 'object_contacts.blockedSlice_param_users_type_Vector t' => '', - 'object_messages.dialogs' => '', - 'object_messages.dialogs_param_dialogs_type_Vector t' => '', - 'object_messages.dialogs_param_messages_type_Vector t' => '', - 'object_messages.dialogs_param_chats_type_Vector t' => '', - 'object_messages.dialogs_param_users_type_Vector t' => '', - 'object_messages.dialogsSlice' => '', - 'object_messages.dialogsSlice_param_count_type_int' => '', - 'object_messages.dialogsSlice_param_dialogs_type_Vector t' => '', - 'object_messages.dialogsSlice_param_messages_type_Vector t' => '', - 'object_messages.dialogsSlice_param_chats_type_Vector t' => '', - 'object_messages.dialogsSlice_param_users_type_Vector t' => '', - 'object_messages.messages' => '', - 'object_messages.messages_param_messages_type_Vector t' => '', - 'object_messages.messages_param_chats_type_Vector t' => '', - 'object_messages.messages_param_users_type_Vector t' => '', - 'object_messages.messagesSlice' => '', - 'object_messages.messagesSlice_param_count_type_int' => '', - 'object_messages.messagesSlice_param_messages_type_Vector t' => '', - 'object_messages.messagesSlice_param_chats_type_Vector t' => '', - 'object_messages.messagesSlice_param_users_type_Vector t' => '', - 'object_messages.channelMessages' => '', - 'object_messages.channelMessages_param_pts_type_int' => '', - 'object_messages.channelMessages_param_count_type_int' => '', - 'object_messages.channelMessages_param_messages_type_Vector t' => '', - 'object_messages.channelMessages_param_chats_type_Vector t' => '', - 'object_messages.channelMessages_param_users_type_Vector t' => '', - 'object_messages.messagesNotModified' => '', - 'object_messages.messagesNotModified_param_count_type_int' => '', - 'object_messages.chats' => '', - 'object_messages.chats_param_chats_type_Vector t' => '', - 'object_messages.chatsSlice' => '', - 'object_messages.chatsSlice_param_count_type_int' => '', - 'object_messages.chatsSlice_param_chats_type_Vector t' => '', - 'object_messages.chatFull' => '', - 'object_messages.chatFull_param_full_chat_type_ChatFull' => '', - 'object_messages.chatFull_param_chats_type_Vector t' => '', - 'object_messages.chatFull_param_users_type_Vector t' => '', - 'object_messages.affectedHistory' => '', - 'object_messages.affectedHistory_param_pts_type_int' => '', - 'object_messages.affectedHistory_param_pts_count_type_int' => '', - 'object_messages.affectedHistory_param_offset_type_int' => '', - 'object_inputMessagesFilterEmpty' => '', - 'object_inputMessagesFilterPhotos' => '', - 'object_inputMessagesFilterVideo' => '', - 'object_inputMessagesFilterPhotoVideo' => '', - 'object_inputMessagesFilterDocument' => '', - 'object_inputMessagesFilterUrl' => '', - 'object_inputMessagesFilterGif' => '', - 'object_inputMessagesFilterVoice' => '', - 'object_inputMessagesFilterMusic' => '', - 'object_inputMessagesFilterChatPhotos' => '', - 'object_inputMessagesFilterPhoneCalls' => '', - 'object_inputMessagesFilterPhoneCalls_param_missed_type_true' => '', - 'object_inputMessagesFilterRoundVoice' => '', - 'object_inputMessagesFilterRoundVideo' => '', - 'object_inputMessagesFilterMyMentions' => '', - 'object_inputMessagesFilterGeo' => '', - 'object_inputMessagesFilterContacts' => '', - 'object_updateNewMessage' => '', - 'object_updateNewMessage_param_message_type_Message' => '', - 'object_updateNewMessage_param_pts_type_int' => '', - 'object_updateNewMessage_param_pts_count_type_int' => '', - 'object_updateMessageID' => '', - 'object_updateMessageID_param_id_type_int' => '', - 'object_updateDeleteMessages' => '', - 'object_updateDeleteMessages_param_messages_type_Vector t' => '', - 'object_updateDeleteMessages_param_pts_type_int' => '', - 'object_updateDeleteMessages_param_pts_count_type_int' => '', - 'object_updateUserTyping' => '', - 'object_updateUserTyping_param_user_id_type_int' => '', - 'object_updateUserTyping_param_action_type_SendMessageAction' => '', - 'object_updateChatUserTyping' => '', - 'object_updateChatUserTyping_param_chat_id_type_int' => '', - 'object_updateChatUserTyping_param_user_id_type_int' => '', - 'object_updateChatUserTyping_param_action_type_SendMessageAction' => '', - 'object_updateChatParticipants' => '', - 'object_updateChatParticipants_param_participants_type_ChatParticipants' => '', - 'object_updateUserName' => '', - 'object_updateUserName_param_user_id_type_int' => '', - 'object_updateUserName_param_first_name_type_string' => '', - 'object_updateUserName_param_last_name_type_string' => '', - 'object_updateUserName_param_username_type_string' => '', - 'object_updateUserPhoto' => '', - 'object_updateUserPhoto_param_user_id_type_int' => '', - 'object_updateUserPhoto_param_date_type_int' => '', - 'object_updateUserPhoto_param_photo_type_UserProfilePhoto' => '', - 'object_updateUserPhoto_param_previous_type_Bool' => '', - 'object_updateContactRegistered' => '', - 'object_updateContactRegistered_param_user_id_type_int' => '', - 'object_updateContactRegistered_param_date_type_int' => '', - 'object_updateContactLink' => '', - 'object_updateContactLink_param_user_id_type_int' => '', - 'object_updateContactLink_param_my_link_type_ContactLink' => '', - 'object_updateContactLink_param_foreign_link_type_ContactLink' => '', - 'object_updateNewEncryptedMessage' => '', - 'object_updateNewEncryptedMessage_param_message_type_EncryptedMessage' => '', - 'object_updateNewEncryptedMessage_param_qts_type_int' => '', - 'object_updateEncryptedChatTyping' => '', - 'object_updateEncryptedChatTyping_param_chat_id_type_int' => '', - 'object_updateEncryption' => '', - 'object_updateEncryption_param_chat_type_EncryptedChat' => '', - 'object_updateEncryption_param_date_type_int' => '', - 'object_updateEncryptedMessagesRead' => '', - 'object_updateEncryptedMessagesRead_param_chat_id_type_int' => '', - 'object_updateEncryptedMessagesRead_param_max_date_type_int' => '', - 'object_updateEncryptedMessagesRead_param_date_type_int' => '', - 'object_updateChatParticipantAdd' => '', - 'object_updateChatParticipantAdd_param_chat_id_type_int' => '', - 'object_updateChatParticipantAdd_param_user_id_type_int' => '', - 'object_updateChatParticipantAdd_param_inviter_id_type_int' => '', - 'object_updateChatParticipantAdd_param_date_type_int' => '', - 'object_updateChatParticipantAdd_param_version_type_int' => '', - 'object_updateChatParticipantDelete' => '', - 'object_updateChatParticipantDelete_param_chat_id_type_int' => '', - 'object_updateChatParticipantDelete_param_user_id_type_int' => '', - 'object_updateChatParticipantDelete_param_version_type_int' => '', - 'object_updateDcOptions' => '', - 'object_updateDcOptions_param_dc_options_type_Vector t' => '', - 'object_updateUserBlocked' => '', - 'object_updateUserBlocked_param_user_id_type_int' => '', - 'object_updateUserBlocked_param_blocked_type_Bool' => '', - 'object_updateNotifySettings' => '', - 'object_updateNotifySettings_param_peer_type_NotifyPeer' => '', - 'object_updateNotifySettings_param_notify_settings_type_PeerNotifySettings' => '', - 'object_updateServiceNotification' => '', - 'object_updateServiceNotification_param_popup_type_true' => '', - 'object_updateServiceNotification_param_inbox_date_type_int' => '', - 'object_updateServiceNotification_param_type_type_string' => '', - 'object_updateServiceNotification_param_message_type_string' => '', - 'object_updateServiceNotification_param_media_type_MessageMedia' => '', - 'object_updateServiceNotification_param_entities_type_Vector t' => '', - 'object_updatePrivacy' => '', - 'object_updatePrivacy_param_key_type_PrivacyKey' => '', - 'object_updatePrivacy_param_rules_type_Vector t' => '', - 'object_updateUserPhone' => '', - 'object_updateUserPhone_param_user_id_type_int' => '', - 'object_updateUserPhone_param_phone_type_string' => '', - 'object_updateReadHistoryInbox' => '', - 'object_updateReadHistoryInbox_param_peer_type_Peer' => '', - 'object_updateReadHistoryInbox_param_max_id_type_int' => '', - 'object_updateReadHistoryInbox_param_pts_type_int' => '', - 'object_updateReadHistoryInbox_param_pts_count_type_int' => '', - 'object_updateReadHistoryOutbox' => '', - 'object_updateReadHistoryOutbox_param_peer_type_Peer' => '', - 'object_updateReadHistoryOutbox_param_max_id_type_int' => '', - 'object_updateReadHistoryOutbox_param_pts_type_int' => '', - 'object_updateReadHistoryOutbox_param_pts_count_type_int' => '', - 'object_updateWebPage' => '', - 'object_updateWebPage_param_webpage_type_WebPage' => '', - 'object_updateWebPage_param_pts_type_int' => '', - 'object_updateWebPage_param_pts_count_type_int' => '', - 'object_updateReadMessagesContents' => '', - 'object_updateReadMessagesContents_param_messages_type_Vector t' => '', - 'object_updateReadMessagesContents_param_pts_type_int' => '', - 'object_updateReadMessagesContents_param_pts_count_type_int' => '', - 'object_updateChannelTooLong' => '', - 'object_updateChannelTooLong_param_channel_id_type_int' => '', - 'object_updateChannelTooLong_param_pts_type_int' => '', - 'object_updateChannel' => '', - 'object_updateChannel_param_channel_id_type_int' => '', - 'object_updateNewChannelMessage' => '', - 'object_updateNewChannelMessage_param_message_type_Message' => '', - 'object_updateNewChannelMessage_param_pts_type_int' => '', - 'object_updateNewChannelMessage_param_pts_count_type_int' => '', - 'object_updateReadChannelInbox' => '', - 'object_updateReadChannelInbox_param_channel_id_type_int' => '', - 'object_updateReadChannelInbox_param_max_id_type_int' => '', - 'object_updateDeleteChannelMessages' => '', - 'object_updateDeleteChannelMessages_param_channel_id_type_int' => '', - 'object_updateDeleteChannelMessages_param_messages_type_Vector t' => '', - 'object_updateDeleteChannelMessages_param_pts_type_int' => '', - 'object_updateDeleteChannelMessages_param_pts_count_type_int' => '', - 'object_updateChannelMessageViews' => '', - 'object_updateChannelMessageViews_param_channel_id_type_int' => '', - 'object_updateChannelMessageViews_param_id_type_int' => '', - 'object_updateChannelMessageViews_param_views_type_int' => '', - 'object_updateChatAdmins' => '', - 'object_updateChatAdmins_param_chat_id_type_int' => '', - 'object_updateChatAdmins_param_enabled_type_Bool' => '', - 'object_updateChatAdmins_param_version_type_int' => '', - 'object_updateChatParticipantAdmin' => '', - 'object_updateChatParticipantAdmin_param_chat_id_type_int' => '', - 'object_updateChatParticipantAdmin_param_user_id_type_int' => '', - 'object_updateChatParticipantAdmin_param_is_admin_type_Bool' => '', - 'object_updateChatParticipantAdmin_param_version_type_int' => '', - 'object_updateNewStickerSet' => '', - 'object_updateNewStickerSet_param_stickerset_type_messages.StickerSet' => '', - 'object_updateStickerSetsOrder' => '', - 'object_updateStickerSetsOrder_param_masks_type_true' => '', - 'object_updateStickerSetsOrder_param_order_type_Vector t' => '', - 'object_updateStickerSets' => '', - 'object_updateSavedGifs' => '', - 'object_updateBotInlineQuery' => '', - 'object_updateBotInlineQuery_param_query_id_type_long' => '', - 'object_updateBotInlineQuery_param_user_id_type_int' => '', - 'object_updateBotInlineQuery_param_query_type_string' => '', - 'object_updateBotInlineQuery_param_geo_type_GeoPoint' => '', - 'object_updateBotInlineQuery_param_offset_type_string' => '', - 'object_updateBotInlineSend' => '', - 'object_updateBotInlineSend_param_user_id_type_int' => '', - 'object_updateBotInlineSend_param_query_type_string' => '', - 'object_updateBotInlineSend_param_geo_type_GeoPoint' => '', - 'object_updateBotInlineSend_param_id_type_string' => '', - 'object_updateBotInlineSend_param_msg_id_type_InputBotInlineMessageID' => '', - 'object_updateEditChannelMessage' => '', - 'object_updateEditChannelMessage_param_message_type_Message' => '', - 'object_updateEditChannelMessage_param_pts_type_int' => '', - 'object_updateEditChannelMessage_param_pts_count_type_int' => '', - 'object_updateChannelPinnedMessage' => '', - 'object_updateChannelPinnedMessage_param_channel_id_type_int' => '', - 'object_updateChannelPinnedMessage_param_id_type_int' => '', - 'object_updateBotCallbackQuery' => '', - 'object_updateBotCallbackQuery_param_query_id_type_long' => '', - 'object_updateBotCallbackQuery_param_user_id_type_int' => '', - 'object_updateBotCallbackQuery_param_peer_type_Peer' => '', - 'object_updateBotCallbackQuery_param_msg_id_type_int' => '', - 'object_updateBotCallbackQuery_param_chat_instance_type_long' => '', - 'object_updateBotCallbackQuery_param_data_type_bytes' => '', - 'object_updateBotCallbackQuery_param_game_short_name_type_string' => '', - 'object_updateEditMessage' => '', - 'object_updateEditMessage_param_message_type_Message' => '', - 'object_updateEditMessage_param_pts_type_int' => '', - 'object_updateEditMessage_param_pts_count_type_int' => '', - 'object_updateInlineBotCallbackQuery' => '', - 'object_updateInlineBotCallbackQuery_param_query_id_type_long' => '', - 'object_updateInlineBotCallbackQuery_param_user_id_type_int' => '', - 'object_updateInlineBotCallbackQuery_param_msg_id_type_InputBotInlineMessageID' => '', - 'object_updateInlineBotCallbackQuery_param_chat_instance_type_long' => '', - 'object_updateInlineBotCallbackQuery_param_data_type_bytes' => '', - 'object_updateInlineBotCallbackQuery_param_game_short_name_type_string' => '', - 'object_updateReadChannelOutbox' => '', - 'object_updateReadChannelOutbox_param_channel_id_type_int' => '', - 'object_updateReadChannelOutbox_param_max_id_type_int' => '', - 'object_updateDraftMessage' => '', - 'object_updateDraftMessage_param_peer_type_Peer' => '', - 'object_updateDraftMessage_param_draft_type_DraftMessage' => '', - 'object_updateReadFeaturedStickers' => '', - 'object_updateRecentStickers' => '', - 'object_updateConfig' => '', - 'object_updatePtsChanged' => '', - 'object_updateChannelWebPage' => '', - 'object_updateChannelWebPage_param_channel_id_type_int' => '', - 'object_updateChannelWebPage_param_webpage_type_WebPage' => '', - 'object_updateChannelWebPage_param_pts_type_int' => '', - 'object_updateChannelWebPage_param_pts_count_type_int' => '', - 'object_updateDialogPinned' => '', - 'object_updateDialogPinned_param_pinned_type_true' => '', - 'object_updateDialogPinned_param_peer_type_Peer' => '', - 'object_updatePinnedDialogs' => '', - 'object_updatePinnedDialogs_param_order_type_Vector t' => '', - 'object_updateBotWebhookJSON' => '', - 'object_updateBotWebhookJSON_param_data_type_DataJSON' => '', - 'object_updateBotWebhookJSONQuery' => '', - 'object_updateBotWebhookJSONQuery_param_query_id_type_long' => '', - 'object_updateBotWebhookJSONQuery_param_data_type_DataJSON' => '', - 'object_updateBotWebhookJSONQuery_param_timeout_type_int' => '', - 'object_updateBotShippingQuery' => '', - 'object_updateBotShippingQuery_param_query_id_type_long' => '', - 'object_updateBotShippingQuery_param_user_id_type_int' => '', - 'object_updateBotShippingQuery_param_payload_type_bytes' => '', - 'object_updateBotShippingQuery_param_shipping_address_type_PostAddress' => '', - 'object_updateBotPrecheckoutQuery' => '', - 'object_updateBotPrecheckoutQuery_param_query_id_type_long' => '', - 'object_updateBotPrecheckoutQuery_param_user_id_type_int' => '', - 'object_updateBotPrecheckoutQuery_param_payload_type_bytes' => '', - 'object_updateBotPrecheckoutQuery_param_info_type_PaymentRequestedInfo' => '', - 'object_updateBotPrecheckoutQuery_param_shipping_option_id_type_string' => '', - 'object_updateBotPrecheckoutQuery_param_currency_type_string' => '', - 'object_updateBotPrecheckoutQuery_param_total_amount_type_long' => '', - 'object_updatePhoneCall' => '', - 'object_updatePhoneCall_param_phone_call_type_PhoneCall' => '', - 'object_updateLangPackTooLong' => '', - 'object_updateLangPack' => '', - 'object_updateLangPack_param_difference_type_LangPackDifference' => '', - 'object_updateFavedStickers' => '', - 'object_updateChannelReadMessagesContents' => '', - 'object_updateChannelReadMessagesContents_param_channel_id_type_int' => '', - 'object_updateChannelReadMessagesContents_param_messages_type_Vector t' => '', - 'object_updateContactsReset' => '', - 'object_updateChannelAvailableMessages' => '', - 'object_updateChannelAvailableMessages_param_channel_id_type_int' => '', - 'object_updateChannelAvailableMessages_param_available_min_id_type_int' => '', - 'object_updates.state' => '', - 'object_updates.state_param_pts_type_int' => '', - 'object_updates.state_param_qts_type_int' => '', - 'object_updates.state_param_date_type_int' => '', - 'object_updates.state_param_seq_type_int' => '', - 'object_updates.state_param_unread_count_type_int' => '', - 'object_updates.differenceEmpty' => '', - 'object_updates.differenceEmpty_param_date_type_int' => '', - 'object_updates.differenceEmpty_param_seq_type_int' => '', - 'object_updates.difference' => '', - 'object_updates.difference_param_new_messages_type_Vector t' => '', - 'object_updates.difference_param_new_encrypted_messages_type_Vector t' => '', - 'object_updates.difference_param_other_updates_type_Vector t' => '', - 'object_updates.difference_param_chats_type_Vector t' => '', - 'object_updates.difference_param_users_type_Vector t' => '', - 'object_updates.difference_param_state_type_updates.State' => '', - 'object_updates.differenceSlice' => '', - 'object_updates.differenceSlice_param_new_messages_type_Vector t' => '', - 'object_updates.differenceSlice_param_new_encrypted_messages_type_Vector t' => '', - 'object_updates.differenceSlice_param_other_updates_type_Vector t' => '', - 'object_updates.differenceSlice_param_chats_type_Vector t' => '', - 'object_updates.differenceSlice_param_users_type_Vector t' => '', - 'object_updates.differenceSlice_param_intermediate_state_type_updates.State' => '', - 'object_updates.differenceTooLong' => '', - 'object_updates.differenceTooLong_param_pts_type_int' => '', - 'object_updatesTooLong' => '', - 'object_updateShortMessage' => '', - 'object_updateShortMessage_param_out_type_true' => '', - 'object_updateShortMessage_param_mentioned_type_true' => '', - 'object_updateShortMessage_param_media_unread_type_true' => '', - 'object_updateShortMessage_param_silent_type_true' => '', - 'object_updateShortMessage_param_id_type_int' => '', - 'object_updateShortMessage_param_user_id_type_int' => '', - 'object_updateShortMessage_param_message_type_string' => '', - 'object_updateShortMessage_param_pts_type_int' => '', - 'object_updateShortMessage_param_pts_count_type_int' => '', - 'object_updateShortMessage_param_date_type_int' => '', - 'object_updateShortMessage_param_fwd_from_type_MessageFwdHeader' => '', - 'object_updateShortMessage_param_via_bot_id_type_int' => '', - 'object_updateShortMessage_param_reply_to_msg_id_type_int' => '', - 'object_updateShortMessage_param_entities_type_Vector t' => '', - 'object_updateShortChatMessage' => '', - 'object_updateShortChatMessage_param_out_type_true' => '', - 'object_updateShortChatMessage_param_mentioned_type_true' => '', - 'object_updateShortChatMessage_param_media_unread_type_true' => '', - 'object_updateShortChatMessage_param_silent_type_true' => '', - 'object_updateShortChatMessage_param_id_type_int' => '', - 'object_updateShortChatMessage_param_from_id_type_int' => '', - 'object_updateShortChatMessage_param_chat_id_type_int' => '', - 'object_updateShortChatMessage_param_message_type_string' => '', - 'object_updateShortChatMessage_param_pts_type_int' => '', - 'object_updateShortChatMessage_param_pts_count_type_int' => '', - 'object_updateShortChatMessage_param_date_type_int' => '', - 'object_updateShortChatMessage_param_fwd_from_type_MessageFwdHeader' => '', - 'object_updateShortChatMessage_param_via_bot_id_type_int' => '', - 'object_updateShortChatMessage_param_reply_to_msg_id_type_int' => '', - 'object_updateShortChatMessage_param_entities_type_Vector t' => '', - 'object_updateShort' => '', - 'object_updateShort_param_update_type_Update' => '', - 'object_updateShort_param_date_type_int' => '', - 'object_updatesCombined' => '', - 'object_updatesCombined_param_updates_type_Vector t' => '', - 'object_updatesCombined_param_users_type_Vector t' => '', - 'object_updatesCombined_param_chats_type_Vector t' => '', - 'object_updatesCombined_param_date_type_int' => '', - 'object_updatesCombined_param_seq_start_type_int' => '', - 'object_updatesCombined_param_seq_type_int' => '', - 'object_updates' => '', - 'object_updates_param_updates_type_Vector t' => '', - 'object_updates_param_users_type_Vector t' => '', - 'object_updates_param_chats_type_Vector t' => '', - 'object_updates_param_date_type_int' => '', - 'object_updates_param_seq_type_int' => '', - 'object_updateShortSentMessage' => '', - 'object_updateShortSentMessage_param_out_type_true' => '', - 'object_updateShortSentMessage_param_id_type_int' => '', - 'object_updateShortSentMessage_param_pts_type_int' => '', - 'object_updateShortSentMessage_param_pts_count_type_int' => '', - 'object_updateShortSentMessage_param_date_type_int' => '', - 'object_updateShortSentMessage_param_media_type_MessageMedia' => '', - 'object_updateShortSentMessage_param_entities_type_Vector t' => '', - 'object_photos.photos' => '', - 'object_photos.photos_param_photos_type_Vector t' => '', - 'object_photos.photos_param_users_type_Vector t' => '', - 'object_photos.photosSlice' => '', - 'object_photos.photosSlice_param_count_type_int' => '', - 'object_photos.photosSlice_param_photos_type_Vector t' => '', - 'object_photos.photosSlice_param_users_type_Vector t' => '', - 'object_photos.photo' => '', - 'object_photos.photo_param_photo_type_Photo' => '', - 'object_photos.photo_param_users_type_Vector t' => '', - 'object_upload.file' => '', - 'object_upload.file_param_type_type_storage.FileType' => '', - 'object_upload.file_param_mtime_type_int' => '', - 'object_upload.file_param_bytes_type_bytes' => '', - 'object_upload.fileCdnRedirect' => '', - 'object_upload.fileCdnRedirect_param_dc_id_type_int' => '', - 'object_upload.fileCdnRedirect_param_file_token_type_bytes' => '', - 'object_upload.fileCdnRedirect_param_encryption_key_type_bytes' => '', - 'object_upload.fileCdnRedirect_param_encryption_iv_type_bytes' => '', - 'object_upload.fileCdnRedirect_param_cdn_file_hashes_type_Vector t' => '', - 'object_dcOption' => '', - 'object_dcOption_param_ipv6_type_true' => '', - 'object_dcOption_param_media_only_type_true' => '', - 'object_dcOption_param_tcpo_only_type_true' => '', - 'object_dcOption_param_cdn_type_true' => '', - 'object_dcOption_param_static_type_true' => '', - 'object_dcOption_param_id_type_int' => '', - 'object_dcOption_param_ip_address_type_string' => '', - 'object_dcOption_param_port_type_int' => '', - 'object_config' => '', - 'object_config_param_phonecalls_enabled_type_true' => '', - 'object_config_param_default_p2p_contacts_type_true' => '', - 'object_config_param_date_type_int' => '', - 'object_config_param_expires_type_int' => '', - 'object_config_param_test_mode_type_Bool' => '', - 'object_config_param_this_dc_type_int' => '', - 'object_config_param_dc_options_type_Vector t' => '', - 'object_config_param_chat_size_max_type_int' => '', - 'object_config_param_megagroup_size_max_type_int' => '', - 'object_config_param_forwarded_count_max_type_int' => '', - 'object_config_param_online_update_period_ms_type_int' => '', - 'object_config_param_offline_blur_timeout_ms_type_int' => '', - 'object_config_param_offline_idle_timeout_ms_type_int' => '', - 'object_config_param_online_cloud_timeout_ms_type_int' => '', - 'object_config_param_notify_cloud_delay_ms_type_int' => '', - 'object_config_param_notify_default_delay_ms_type_int' => '', - 'object_config_param_chat_big_size_type_int' => '', - 'object_config_param_push_chat_period_ms_type_int' => '', - 'object_config_param_push_chat_limit_type_int' => '', - 'object_config_param_saved_gifs_limit_type_int' => '', - 'object_config_param_edit_time_limit_type_int' => '', - 'object_config_param_rating_e_decay_type_int' => '', - 'object_config_param_stickers_recent_limit_type_int' => '', - 'object_config_param_stickers_faved_limit_type_int' => '', - 'object_config_param_channels_read_media_period_type_int' => '', - 'object_config_param_tmp_sessions_type_int' => '', - 'object_config_param_pinned_dialogs_count_max_type_int' => '', - 'object_config_param_call_receive_timeout_ms_type_int' => '', - 'object_config_param_call_ring_timeout_ms_type_int' => '', - 'object_config_param_call_connect_timeout_ms_type_int' => '', - 'object_config_param_call_packet_timeout_ms_type_int' => '', - 'object_config_param_me_url_prefix_type_string' => '', - 'object_config_param_suggested_lang_code_type_string' => '', - 'object_config_param_lang_pack_version_type_int' => '', - 'object_config_param_disabled_features_type_Vector t' => '', - 'object_nearestDc' => '', - 'object_nearestDc_param_country_type_string' => '', - 'object_nearestDc_param_this_dc_type_int' => '', - 'object_nearestDc_param_nearest_dc_type_int' => '', - 'object_help.appUpdate' => '', - 'object_help.appUpdate_param_id_type_int' => '', - 'object_help.appUpdate_param_critical_type_Bool' => '', - 'object_help.appUpdate_param_url_type_string' => '', - 'object_help.appUpdate_param_text_type_string' => '', - 'object_help.noAppUpdate' => '', - 'object_help.inviteText' => '', - 'object_help.inviteText_param_message_type_string' => '', - 'object_encryptedChatEmpty' => '', - 'object_encryptedChatEmpty_param_id_type_int' => '', - 'object_encryptedChatWaiting' => '', - 'object_encryptedChatWaiting_param_id_type_int' => '', - 'object_encryptedChatWaiting_param_access_hash_type_long' => '', - 'object_encryptedChatWaiting_param_date_type_int' => '', - 'object_encryptedChatWaiting_param_admin_id_type_int' => '', - 'object_encryptedChatWaiting_param_participant_id_type_int' => '', - 'object_encryptedChatRequested' => '', - 'object_encryptedChatRequested_param_id_type_int' => '', - 'object_encryptedChatRequested_param_access_hash_type_long' => '', - 'object_encryptedChatRequested_param_date_type_int' => '', - 'object_encryptedChatRequested_param_admin_id_type_int' => '', - 'object_encryptedChatRequested_param_participant_id_type_int' => '', - 'object_encryptedChatRequested_param_g_a_type_bytes' => '', - 'object_encryptedChat' => '', - 'object_encryptedChat_param_id_type_int' => '', - 'object_encryptedChat_param_access_hash_type_long' => '', - 'object_encryptedChat_param_date_type_int' => '', - 'object_encryptedChat_param_admin_id_type_int' => '', - 'object_encryptedChat_param_participant_id_type_int' => '', - 'object_encryptedChat_param_g_a_or_b_type_bytes' => '', - 'object_encryptedChat_param_key_fingerprint_type_long' => '', - 'object_encryptedChatDiscarded' => '', - 'object_encryptedChatDiscarded_param_id_type_int' => '', - 'object_inputEncryptedChat' => '', - 'object_inputEncryptedChat_param_chat_id_type_int' => '', - 'object_inputEncryptedChat_param_access_hash_type_long' => '', - 'object_encryptedFileEmpty' => '', - 'object_encryptedFile' => '', - 'object_encryptedFile_param_id_type_long' => '', - 'object_encryptedFile_param_access_hash_type_long' => '', - 'object_encryptedFile_param_size_type_int' => '', - 'object_encryptedFile_param_dc_id_type_int' => '', - 'object_encryptedFile_param_key_fingerprint_type_int' => '', - 'object_inputEncryptedFileEmpty' => '', - 'object_inputEncryptedFileUploaded' => '', - 'object_inputEncryptedFileUploaded_param_id_type_long' => '', - 'object_inputEncryptedFileUploaded_param_parts_type_int' => '', - 'object_inputEncryptedFileUploaded_param_md5_checksum_type_string' => '', - 'object_inputEncryptedFileUploaded_param_key_fingerprint_type_int' => '', - 'object_inputEncryptedFile' => '', - 'object_inputEncryptedFile_param_id_type_long' => '', - 'object_inputEncryptedFile_param_access_hash_type_long' => '', - 'object_inputEncryptedFileBigUploaded' => '', - 'object_inputEncryptedFileBigUploaded_param_id_type_long' => '', - 'object_inputEncryptedFileBigUploaded_param_parts_type_int' => '', - 'object_inputEncryptedFileBigUploaded_param_key_fingerprint_type_int' => '', - 'object_encryptedMessage' => '', - 'object_encryptedMessage_param_chat_id_type_int' => '', - 'object_encryptedMessage_param_date_type_int' => '', - 'object_encryptedMessage_param_decrypted_message_type_DecryptedMessage' => '', - 'object_encryptedMessage_param_file_type_EncryptedFile' => '', - 'object_encryptedMessageService' => '', - 'object_encryptedMessageService_param_chat_id_type_int' => '', - 'object_encryptedMessageService_param_date_type_int' => '', - 'object_encryptedMessageService_param_decrypted_message_type_DecryptedMessage' => '', - 'object_messages.dhConfigNotModified' => '', - 'object_messages.dhConfigNotModified_param_random_type_bytes' => '', - 'object_messages.dhConfig' => '', - 'object_messages.dhConfig_param_g_type_int' => '', - 'object_messages.dhConfig_param_p_type_bytes' => '', - 'object_messages.dhConfig_param_version_type_int' => '', - 'object_messages.dhConfig_param_random_type_bytes' => '', - 'object_messages.sentEncryptedMessage' => '', - 'object_messages.sentEncryptedMessage_param_date_type_int' => '', - 'object_messages.sentEncryptedFile' => '', - 'object_messages.sentEncryptedFile_param_date_type_int' => '', - 'object_messages.sentEncryptedFile_param_file_type_EncryptedFile' => '', - 'object_inputDocumentEmpty' => '', - 'object_inputDocument' => '', - 'object_inputDocument_param_id_type_long' => '', - 'object_inputDocument_param_access_hash_type_long' => '', - 'object_documentEmpty' => '', - 'object_documentEmpty_param_id_type_long' => '', - 'object_document' => '', - 'object_document_param_id_type_long' => '', - 'object_document_param_access_hash_type_long' => '', - 'object_document_param_date_type_int' => '', - 'object_document_param_mime_type_type_string' => '', - 'object_document_param_size_type_int' => '', - 'object_document_param_thumb_type_PhotoSize' => '', - 'object_document_param_dc_id_type_int' => '', - 'object_document_param_version_type_int' => '', - 'object_document_param_attributes_type_Vector t' => '', - 'object_help.support' => '', - 'object_help.support_param_phone_number_type_string' => '', - 'object_help.support_param_user_type_User' => '', - 'object_notifyPeer' => '', - 'object_notifyPeer_param_peer_type_Peer' => '', - 'object_notifyUsers' => '', - 'object_notifyChats' => '', - 'object_notifyAll' => '', - 'object_sendMessageTypingAction' => '', - 'object_sendMessageCancelAction' => '', - 'object_sendMessageRecordVideoAction' => '', - 'object_sendMessageUploadVideoAction' => '', - 'object_sendMessageUploadVideoAction_param_progress_type_int' => '', - 'object_sendMessageRecordAudioAction' => '', - 'object_sendMessageUploadAudioAction' => '', - 'object_sendMessageUploadAudioAction_param_progress_type_int' => '', - 'object_sendMessageUploadPhotoAction' => '', - 'object_sendMessageUploadPhotoAction_param_progress_type_int' => '', - 'object_sendMessageUploadDocumentAction' => '', - 'object_sendMessageUploadDocumentAction_param_progress_type_int' => '', - 'object_sendMessageGeoLocationAction' => '', - 'object_sendMessageChooseContactAction' => '', - 'object_sendMessageGamePlayAction' => '', - 'object_sendMessageRecordRoundAction' => '', - 'object_sendMessageUploadRoundAction' => '', - 'object_sendMessageUploadRoundAction_param_progress_type_int' => '', - 'object_contacts.found' => '', - 'object_contacts.found_param_my_results_type_Vector t' => '', - 'object_contacts.found_param_results_type_Vector t' => '', - 'object_contacts.found_param_chats_type_Vector t' => '', - 'object_contacts.found_param_users_type_Vector t' => '', - 'object_inputPrivacyKeyStatusTimestamp' => '', - 'object_inputPrivacyKeyChatInvite' => '', - 'object_inputPrivacyKeyPhoneCall' => '', - 'object_privacyKeyStatusTimestamp' => '', - 'object_privacyKeyPhoneCall' => '', - 'object_inputPrivacyValueAllowContacts' => '', - 'object_inputPrivacyValueAllowAll' => '', - 'object_inputPrivacyValueAllowUsers' => '', - 'object_inputPrivacyValueAllowUsers_param_users_type_Vector t' => '', - 'object_inputPrivacyValueDisallowContacts' => '', - 'object_inputPrivacyValueDisallowAll' => '', - 'object_inputPrivacyValueDisallowUsers' => '', - 'object_inputPrivacyValueDisallowUsers_param_users_type_Vector t' => '', - 'object_privacyValueAllowContacts' => '', - 'object_privacyValueAllowAll' => '', - 'object_privacyValueAllowUsers' => '', - 'object_privacyValueAllowUsers_param_users_type_Vector t' => '', - 'object_privacyValueDisallowContacts' => '', - 'object_privacyValueDisallowAll' => '', - 'object_privacyValueDisallowUsers' => '', - 'object_privacyValueDisallowUsers_param_users_type_Vector t' => '', - 'object_account.privacyRules' => '', - 'object_account.privacyRules_param_rules_type_Vector t' => '', - 'object_account.privacyRules_param_users_type_Vector t' => '', - 'object_accountDaysTTL' => '', - 'object_accountDaysTTL_param_days_type_int' => '', - 'object_documentAttributeImageSize' => '', - 'object_documentAttributeImageSize_param_w_type_int' => '', - 'object_documentAttributeImageSize_param_h_type_int' => '', - 'object_documentAttributeAnimated' => '', - 'object_documentAttributeSticker' => '', - 'object_documentAttributeSticker_param_mask_type_true' => '', - 'object_documentAttributeSticker_param_alt_type_string' => '', - 'object_documentAttributeSticker_param_stickerset_type_InputStickerSet' => '', - 'object_documentAttributeSticker_param_mask_coords_type_MaskCoords' => '', - 'object_documentAttributeVideo' => '', - 'object_documentAttributeVideo_param_round_message_type_true' => '', - 'object_documentAttributeVideo_param_supports_streaming_type_true' => '', - 'object_documentAttributeVideo_param_duration_type_int' => '', - 'object_documentAttributeVideo_param_w_type_int' => '', - 'object_documentAttributeVideo_param_h_type_int' => '', - 'object_documentAttributeAudio' => '', - 'object_documentAttributeAudio_param_voice_type_true' => '', - 'object_documentAttributeAudio_param_duration_type_int' => '', - 'object_documentAttributeAudio_param_title_type_string' => '', - 'object_documentAttributeAudio_param_performer_type_string' => '', - 'object_documentAttributeAudio_param_waveform_type_bytes' => '', - 'object_documentAttributeFilename' => '', - 'object_documentAttributeFilename_param_file_name_type_string' => '', - 'object_documentAttributeHasStickers' => '', - 'object_messages.stickersNotModified' => '', - 'object_messages.stickers' => '', - 'object_messages.stickers_param_hash_type_string' => '', - 'object_messages.stickers_param_stickers_type_Vector t' => '', - 'object_stickerPack' => '', - 'object_stickerPack_param_emoticon_type_string' => '', - 'object_stickerPack_param_documents_type_Vector t' => '', - 'object_messages.allStickersNotModified' => '', - 'object_messages.allStickers' => '', - 'object_messages.allStickers_param_hash_type_int' => '', - 'object_messages.allStickers_param_sets_type_Vector t' => '', - 'object_disabledFeature' => '', - 'object_disabledFeature_param_feature_type_string' => '', - 'object_disabledFeature_param_description_type_string' => '', - 'object_messages.affectedMessages' => '', - 'object_messages.affectedMessages_param_pts_type_int' => '', - 'object_messages.affectedMessages_param_pts_count_type_int' => '', - 'object_contactLinkUnknown' => '', - 'object_contactLinkNone' => '', - 'object_contactLinkHasPhone' => '', - 'object_contactLinkContact' => '', - 'object_webPageEmpty' => '', - 'object_webPageEmpty_param_id_type_long' => '', - 'object_webPagePending' => '', - 'object_webPagePending_param_id_type_long' => '', - 'object_webPagePending_param_date_type_int' => '', - 'object_webPage' => '', - 'object_webPage_param_id_type_long' => '', - 'object_webPage_param_url_type_string' => '', - 'object_webPage_param_display_url_type_string' => '', - 'object_webPage_param_hash_type_int' => '', - 'object_webPage_param_type_type_string' => '', - 'object_webPage_param_site_name_type_string' => '', - 'object_webPage_param_title_type_string' => '', - 'object_webPage_param_description_type_string' => '', - 'object_webPage_param_photo_type_Photo' => '', - 'object_webPage_param_embed_url_type_string' => '', - 'object_webPage_param_embed_type_type_string' => '', - 'object_webPage_param_embed_width_type_int' => '', - 'object_webPage_param_embed_height_type_int' => '', - 'object_webPage_param_duration_type_int' => '', - 'object_webPage_param_author_type_string' => '', - 'object_webPage_param_document_type_Document' => '', - 'object_webPage_param_cached_page_type_Page' => '', - 'object_webPageNotModified' => '', - 'object_authorization' => '', - 'object_authorization_param_hash_type_long' => '', - 'object_authorization_param_device_model_type_string' => '', - 'object_authorization_param_platform_type_string' => '', - 'object_authorization_param_system_version_type_string' => '', - 'object_authorization_param_api_id_type_int' => '', - 'object_authorization_param_app_name_type_string' => '', - 'object_authorization_param_app_version_type_string' => '', - 'object_authorization_param_date_created_type_int' => '', - 'object_authorization_param_date_active_type_int' => '', - 'object_authorization_param_ip_type_string' => '', - 'object_authorization_param_country_type_string' => '', - 'object_authorization_param_region_type_string' => '', - 'object_account.authorizations' => '', - 'object_account.authorizations_param_authorizations_type_Vector t' => '', - 'object_account.noPassword' => '', - 'object_account.noPassword_param_new_salt_type_bytes' => '', - 'object_account.noPassword_param_email_unconfirmed_pattern_type_string' => '', - 'object_account.password' => '', - 'object_account.password_param_current_salt_type_bytes' => '', - 'object_account.password_param_new_salt_type_bytes' => '', - 'object_account.password_param_hint_type_string' => '', - 'object_account.password_param_has_recovery_type_Bool' => '', - 'object_account.password_param_email_unconfirmed_pattern_type_string' => '', - 'object_account.passwordSettings' => '', - 'object_account.passwordSettings_param_email_type_string' => '', + 'object_msg_copy' => 'Msg copy', + 'object_msg_copy_param_orig_message_type_MTMessage' => 'Orig message', + 'object_gzip_packed' => 'Gzip packed', + 'object_gzip_packed_param_packed_data_type_bytes' => 'Packed data', + 'object_msgs_ack' => 'Msgs ack', + 'object_msgs_ack_param_msg_ids_type_Vector t' => 'Msg IDs', + 'object_bad_msg_notification' => 'Bad msg notification', + 'object_bad_msg_notification_param_bad_msg_id_type_long' => 'Bad msg ID', + 'object_bad_msg_notification_param_bad_msg_seqno_type_int' => 'Bad msg seqno', + 'object_bad_msg_notification_param_error_code_type_int' => 'Error code', + 'object_bad_server_salt' => 'Bad server salt', + 'object_bad_server_salt_param_bad_msg_id_type_long' => 'Bad msg ID', + 'object_bad_server_salt_param_bad_msg_seqno_type_int' => 'Bad msg seqno', + 'object_bad_server_salt_param_error_code_type_int' => 'Error code', + 'object_bad_server_salt_param_new_server_salt_type_long' => 'New server salt', + 'object_msg_resend_req' => 'Msg resend req', + 'object_msg_resend_req_param_msg_ids_type_Vector t' => 'Msg IDs', + 'object_msgs_state_req' => 'Msgs state req', + 'object_msgs_state_req_param_msg_ids_type_Vector t' => 'Msg IDs', + 'object_msgs_state_info' => 'Msgs state info', + 'object_msgs_state_info_param_req_msg_id_type_long' => 'Req msg ID', + 'object_msgs_state_info_param_info_type_bytes' => 'Info', + 'object_msgs_all_info' => 'Msgs all info', + 'object_msgs_all_info_param_msg_ids_type_Vector t' => 'Msg IDs', + 'object_msgs_all_info_param_info_type_bytes' => 'Info', + 'object_msg_detailed_info' => 'Msg detailed info', + 'object_msg_detailed_info_param_msg_id_type_long' => 'Msg ID', + 'object_msg_detailed_info_param_answer_msg_id_type_long' => 'Answer msg ID', + 'object_msg_detailed_info_param_bytes_type_int' => 'Bytes', + 'object_msg_detailed_info_param_status_type_int' => 'Status', + 'object_msg_new_detailed_info' => 'Msg new detailed info', + 'object_msg_new_detailed_info_param_answer_msg_id_type_long' => 'Answer msg ID', + 'object_msg_new_detailed_info_param_bytes_type_int' => 'Bytes', + 'object_msg_new_detailed_info_param_status_type_int' => 'Status', + 'object_bind_auth_key_inner' => 'Bind auth key inner', + 'object_bind_auth_key_inner_param_nonce_type_long' => 'Nonce', + 'object_bind_auth_key_inner_param_temp_auth_key_id_type_long' => 'Temp auth key ID', + 'object_bind_auth_key_inner_param_perm_auth_key_id_type_long' => 'Perm auth key ID', + 'object_bind_auth_key_inner_param_temp_session_id_type_long' => 'Temp session ID', + 'object_bind_auth_key_inner_param_expires_at_type_int' => 'Expires at', + 'object_boolFalse' => 'Bool false', + 'object_boolTrue' => 'Bool true', + 'object_true' => 'True', + 'object_error' => 'Error', + 'object_error_param_code_type_int' => 'Code', + 'object_error_param_text_type_string' => 'Text', + 'object_null' => 'Null', + 'object_inputPeerEmpty' => 'Empty input peer', + 'object_inputPeerSelf' => 'Peer self', + 'object_inputPeerChat' => 'Peer chat', + 'object_inputPeerChat_param_chat_id_type_int' => 'Chat ID', + 'object_inputPeerUser' => 'Peer user', + 'object_inputPeerUser_param_user_id_type_int' => 'User ID', + 'object_inputPeerUser_param_access_hash_type_long' => 'Access hash', + 'object_inputPeerChannel' => 'Peer channel', + 'object_inputPeerChannel_param_channel_id_type_int' => 'Channel ID', + 'object_inputPeerChannel_param_access_hash_type_long' => 'Access hash', + 'object_inputUserEmpty' => 'Empty input user', + 'object_inputUserSelf' => 'User self', + 'object_inputUser' => 'User', + 'object_inputUser_param_user_id_type_int' => 'User ID', + 'object_inputUser_param_access_hash_type_long' => 'Access hash', + 'object_inputPhoneContact' => 'Phone contact', + 'object_inputPhoneContact_param_client_id_type_long' => 'Client ID', + 'object_inputPhoneContact_param_phone_type_string' => 'Phone', + 'object_inputPhoneContact_param_first_name_type_string' => 'First name', + 'object_inputPhoneContact_param_last_name_type_string' => 'Last name', + 'object_inputFile' => 'File', + 'object_inputFile_param_id_type_long' => 'ID', + 'object_inputFile_param_parts_type_int' => 'Parts', + 'object_inputFile_param_name_type_string' => 'Name', + 'object_inputFile_param_md5_checksum_type_string' => 'Md5 checksum', + 'object_inputFileBig' => 'File big', + 'object_inputFileBig_param_id_type_long' => 'ID', + 'object_inputFileBig_param_parts_type_int' => 'Parts', + 'object_inputFileBig_param_name_type_string' => 'Name', + 'object_inputMediaEmpty' => 'Empty input media', + 'object_inputMediaUploadedPhoto' => 'Media uploaded photo', + 'object_inputMediaUploadedPhoto_param_file_type_InputFile' => 'File', + 'object_inputMediaUploadedPhoto_param_stickers_type_Vector t' => 'Stickers', + 'object_inputMediaUploadedPhoto_param_ttl_seconds_type_int' => 'Ttl seconds', + 'object_inputMediaPhoto' => 'Media photo', + 'object_inputMediaPhoto_param_id_type_InputPhoto' => 'ID', + 'object_inputMediaPhoto_param_ttl_seconds_type_int' => 'Ttl seconds', + 'object_inputMediaGeoPoint' => 'Media geo point', + 'object_inputMediaGeoPoint_param_geo_point_type_InputGeoPoint' => 'Geo point', + 'object_inputMediaContact' => 'Media contact', + 'object_inputMediaContact_param_phone_number_type_string' => 'Phone number', + 'object_inputMediaContact_param_first_name_type_string' => 'First name', + 'object_inputMediaContact_param_last_name_type_string' => 'Last name', + 'object_inputMediaUploadedDocument' => 'Media uploaded document', + 'object_inputMediaUploadedDocument_param_nosound_video_type_true' => 'Nosound video?', + 'object_inputMediaUploadedDocument_param_file_type_InputFile' => 'File', + 'object_inputMediaUploadedDocument_param_thumb_type_InputFile' => 'Thumbnail', + 'object_inputMediaUploadedDocument_param_mime_type_type_string' => 'Mime type', + 'object_inputMediaUploadedDocument_param_attributes_type_Vector t' => 'Attributes', + 'object_inputMediaUploadedDocument_param_stickers_type_Vector t' => 'Stickers', + 'object_inputMediaUploadedDocument_param_ttl_seconds_type_int' => 'Ttl seconds', + 'object_inputMediaDocument' => 'Media document', + 'object_inputMediaDocument_param_id_type_InputDocument' => 'ID', + 'object_inputMediaDocument_param_ttl_seconds_type_int' => 'Ttl seconds', + 'object_inputMediaVenue' => 'Media venue', + 'object_inputMediaVenue_param_geo_point_type_InputGeoPoint' => 'Geo point', + 'object_inputMediaVenue_param_title_type_string' => 'Title', + 'object_inputMediaVenue_param_address_type_string' => 'Address', + 'object_inputMediaVenue_param_provider_type_string' => 'Provider', + 'object_inputMediaVenue_param_venue_id_type_string' => 'Venue ID', + 'object_inputMediaVenue_param_venue_type_type_string' => 'Venue type', + 'object_inputMediaGifExternal' => 'Media gif external', + 'object_inputMediaGifExternal_param_url_type_string' => 'URL', + 'object_inputMediaGifExternal_param_q_type_string' => 'Q', + 'object_inputMediaPhotoExternal' => 'Media photo external', + 'object_inputMediaPhotoExternal_param_url_type_string' => 'URL', + 'object_inputMediaPhotoExternal_param_ttl_seconds_type_int' => 'Ttl seconds', + 'object_inputMediaDocumentExternal' => 'Media document external', + 'object_inputMediaDocumentExternal_param_url_type_string' => 'URL', + 'object_inputMediaDocumentExternal_param_ttl_seconds_type_int' => 'Ttl seconds', + 'object_inputMediaGame' => 'Media game', + 'object_inputMediaGame_param_id_type_InputGame' => 'ID', + 'object_inputMediaInvoice' => 'Media invoice', + 'object_inputMediaInvoice_param_title_type_string' => 'Title', + 'object_inputMediaInvoice_param_description_type_string' => 'Description', + 'object_inputMediaInvoice_param_photo_type_InputWebDocument' => 'Photo', + 'object_inputMediaInvoice_param_invoice_type_Invoice' => 'Invoice', + 'object_inputMediaInvoice_param_payload_type_bytes' => 'Payload', + 'object_inputMediaInvoice_param_provider_type_string' => 'Provider', + 'object_inputMediaInvoice_param_provider_data_type_DataJSON' => 'Provider data', + 'object_inputMediaInvoice_param_start_param_type_string' => 'Start param', + 'object_inputMediaGeoLive' => 'Media geo live', + 'object_inputMediaGeoLive_param_geo_point_type_InputGeoPoint' => 'Geo point', + 'object_inputMediaGeoLive_param_period_type_int' => 'Period', + 'object_inputChatPhotoEmpty' => 'Empty input chat photo', + 'object_inputChatUploadedPhoto' => 'Chat uploaded photo', + 'object_inputChatUploadedPhoto_param_file_type_InputFile' => 'File', + 'object_inputChatPhoto' => 'Chat photo', + 'object_inputChatPhoto_param_id_type_InputPhoto' => 'ID', + 'object_inputGeoPointEmpty' => 'Empty input geo point', + 'object_inputGeoPoint' => 'Geo point', + 'object_inputGeoPoint_param_lat_type_double' => 'Lat', + 'object_inputGeoPoint_param_long_type_double' => 'Long', + 'object_inputPhotoEmpty' => 'Empty input photo', + 'object_inputPhoto' => 'Photo', + 'object_inputPhoto_param_id_type_long' => 'ID', + 'object_inputPhoto_param_access_hash_type_long' => 'Access hash', + 'object_inputFileLocation' => 'File location', + 'object_inputFileLocation_param_volume_id_type_long' => 'Volume ID', + 'object_inputFileLocation_param_local_id_type_int' => 'Local ID', + 'object_inputFileLocation_param_secret_type_long' => 'Secret', + 'object_inputEncryptedFileLocation' => 'Encrypted file location', + 'object_inputEncryptedFileLocation_param_id_type_long' => 'ID', + 'object_inputEncryptedFileLocation_param_access_hash_type_long' => 'Access hash', + 'object_inputDocumentFileLocation' => 'Document file location', + 'object_inputDocumentFileLocation_param_id_type_long' => 'ID', + 'object_inputDocumentFileLocation_param_access_hash_type_long' => 'Access hash', + 'object_inputDocumentFileLocation_param_version_type_int' => 'Version', + 'object_inputAppEvent' => 'App event', + 'object_inputAppEvent_param_time_type_double' => 'Time', + 'object_inputAppEvent_param_type_type_string' => 'Type', + 'object_inputAppEvent_param_peer_type_long' => 'Peer', + 'object_inputAppEvent_param_data_type_string' => 'Data', + 'object_peerUser' => 'Peer user', + 'object_peerUser_param_user_id_type_int' => 'User ID', + 'object_peerChat' => 'Peer chat', + 'object_peerChat_param_chat_id_type_int' => 'Chat ID', + 'object_peerChannel' => 'Peer channel', + 'object_peerChannel_param_channel_id_type_int' => 'Channel ID', + 'object_storage.fileUnknown' => 'File unknown', + 'object_storage.filePartial' => 'File partial', + 'object_storage.fileJpeg' => 'File jpeg', + 'object_storage.fileGif' => 'File gif', + 'object_storage.filePng' => 'File png', + 'object_storage.filePdf' => 'File pdf', + 'object_storage.fileMp3' => 'File mp3', + 'object_storage.fileMov' => 'File mov', + 'object_storage.fileMp4' => 'File mp4', + 'object_storage.fileWebp' => 'File webp', + 'object_fileLocationUnavailable' => 'File location unavailable', + 'object_fileLocationUnavailable_param_volume_id_type_long' => 'Volume ID', + 'object_fileLocationUnavailable_param_local_id_type_int' => 'Local ID', + 'object_fileLocationUnavailable_param_secret_type_long' => 'Secret', + 'object_fileLocation' => 'File location', + 'object_fileLocation_param_dc_id_type_int' => 'DC ID', + 'object_fileLocation_param_volume_id_type_long' => 'Volume ID', + 'object_fileLocation_param_local_id_type_int' => 'Local ID', + 'object_fileLocation_param_secret_type_long' => 'Secret', + 'object_userEmpty' => 'Empty user', + 'object_userEmpty_param_id_type_int' => 'ID', + 'object_user' => 'User', + 'object_user_param_self_type_true' => 'Self?', + 'object_user_param_contact_type_true' => 'Contact?', + 'object_user_param_mutual_contact_type_true' => 'Mutual contact?', + 'object_user_param_deleted_type_true' => 'Deleted?', + 'object_user_param_bot_type_true' => 'Bot?', + 'object_user_param_bot_chat_history_type_true' => 'Bot chat history?', + 'object_user_param_bot_nochats_type_true' => 'Bot nochats?', + 'object_user_param_verified_type_true' => 'Verified?', + 'object_user_param_restricted_type_true' => 'Restricted?', + 'object_user_param_min_type_true' => 'Min?', + 'object_user_param_bot_inline_geo_type_true' => 'Bot inline geo?', + 'object_user_param_id_type_int' => 'ID', + 'object_user_param_access_hash_type_long' => 'Access hash', + 'object_user_param_first_name_type_string' => 'First name', + 'object_user_param_last_name_type_string' => 'Last name', + 'object_user_param_username_type_string' => 'Username', + 'object_user_param_phone_type_string' => 'Phone', + 'object_user_param_photo_type_UserProfilePhoto' => 'Photo', + 'object_user_param_status_type_UserStatus' => 'Status', + 'object_user_param_bot_info_version_type_int' => 'Bot info version', + 'object_user_param_restriction_reason_type_string' => 'Restriction reason', + 'object_user_param_bot_inline_placeholder_type_string' => 'Bot inline placeholder', + 'object_user_param_lang_code_type_string' => 'Lang code', + 'object_userProfilePhotoEmpty' => 'Empty user profile photo', + 'object_userProfilePhoto' => 'User profile photo', + 'object_userProfilePhoto_param_photo_id_type_long' => 'Photo ID', + 'object_userProfilePhoto_param_photo_small_type_FileLocation' => 'Photo small', + 'object_userProfilePhoto_param_photo_big_type_FileLocation' => 'Photo big', + 'object_chatEmpty' => 'Empty chat', + 'object_chatEmpty_param_id_type_int' => 'ID', + 'object_chat' => 'Chat', + 'object_chat_param_creator_type_true' => 'Creator?', + 'object_chat_param_kicked_type_true' => 'Kicked?', + 'object_chat_param_left_type_true' => 'Left?', + 'object_chat_param_admins_enabled_type_true' => 'Admins enabled?', + 'object_chat_param_admin_type_true' => 'Admin?', + 'object_chat_param_deactivated_type_true' => 'Deactivated?', + 'object_chat_param_id_type_int' => 'ID', + 'object_chat_param_title_type_string' => 'Title', + 'object_chat_param_photo_type_ChatPhoto' => 'Photo', + 'object_chat_param_participants_count_type_int' => 'Participants count', + 'object_chat_param_date_type_int' => 'Date', + 'object_chat_param_version_type_int' => 'Version', + 'object_chat_param_migrated_to_type_InputChannel' => 'Migrated to', + 'object_chatForbidden' => 'Chat forbidden', + 'object_chatForbidden_param_id_type_int' => 'ID', + 'object_chatForbidden_param_title_type_string' => 'Title', + 'object_channel' => 'Channel', + 'object_channel_param_creator_type_true' => 'Creator?', + 'object_channel_param_left_type_true' => 'Left?', + 'object_channel_param_editor_type_true' => 'Editor?', + 'object_channel_param_broadcast_type_true' => 'Broadcast?', + 'object_channel_param_verified_type_true' => 'Verified?', + 'object_channel_param_megagroup_type_true' => 'Megagroup?', + 'object_channel_param_restricted_type_true' => 'Restricted?', + 'object_channel_param_democracy_type_true' => 'Democracy?', + 'object_channel_param_signatures_type_true' => 'Signatures?', + 'object_channel_param_min_type_true' => 'Min?', + 'object_channel_param_id_type_int' => 'ID', + 'object_channel_param_access_hash_type_long' => 'Access hash', + 'object_channel_param_title_type_string' => 'Title', + 'object_channel_param_username_type_string' => 'Username', + 'object_channel_param_photo_type_ChatPhoto' => 'Photo', + 'object_channel_param_date_type_int' => 'Date', + 'object_channel_param_version_type_int' => 'Version', + 'object_channel_param_restriction_reason_type_string' => 'Restriction reason', + 'object_channel_param_admin_rights_type_ChannelAdminRights' => 'Admin rights', + 'object_channel_param_banned_rights_type_ChannelBannedRights' => 'Banned rights', + 'object_channel_param_participants_count_type_int' => 'Participants count', + 'object_channelForbidden' => 'Forbidden channel', + 'object_channelForbidden_param_broadcast_type_true' => 'Broadcast?', + 'object_channelForbidden_param_megagroup_type_true' => 'Megagroup?', + 'object_channelForbidden_param_id_type_int' => 'ID', + 'object_channelForbidden_param_access_hash_type_long' => 'Access hash', + 'object_channelForbidden_param_title_type_string' => 'Title', + 'object_channelForbidden_param_until_date_type_int' => 'Until date', + 'object_chatFull' => 'Chat full', + 'object_chatFull_param_id_type_int' => 'ID', + 'object_chatFull_param_participants_type_ChatParticipants' => 'Participants', + 'object_chatFull_param_chat_photo_type_Photo' => 'Chat photo', + 'object_chatFull_param_notify_settings_type_PeerNotifySettings' => 'Notify settings', + 'object_chatFull_param_exported_invite_type_ExportedChatInvite' => 'Exported invite', + 'object_chatFull_param_bot_info_type_Vector t' => 'Bot info', + 'object_channelFull' => 'Full channel', + 'object_channelFull_param_can_view_participants_type_true' => 'Can view participants?', + 'object_channelFull_param_can_set_username_type_true' => 'Can set username?', + 'object_channelFull_param_can_set_stickers_type_true' => 'Can set group stickerset?', + 'object_channelFull_param_hidden_prehistory_type_true' => 'Hidden prehistory?', + 'object_channelFull_param_id_type_int' => 'ID', + 'object_channelFull_param_about_type_string' => 'About', + 'object_channelFull_param_participants_count_type_int' => 'Participants count', + 'object_channelFull_param_admins_count_type_int' => 'Admins count', + 'object_channelFull_param_kicked_count_type_int' => 'Kicked count', + 'object_channelFull_param_banned_count_type_int' => 'Banned count', + 'object_channelFull_param_read_inbox_max_id_type_int' => 'Read inbox max ID', + 'object_channelFull_param_read_outbox_max_id_type_int' => 'Read outbox max ID', + 'object_channelFull_param_unread_count_type_int' => 'Unread count', + 'object_channelFull_param_chat_photo_type_Photo' => 'Chat photo', + 'object_channelFull_param_notify_settings_type_PeerNotifySettings' => 'Notify settings', + 'object_channelFull_param_exported_invite_type_ExportedChatInvite' => 'Exported invite', + 'object_channelFull_param_bot_info_type_Vector t' => 'Bot info', + 'object_channelFull_param_migrated_from_chat_id_type_int' => 'Migrated from chat ID', + 'object_channelFull_param_migrated_from_max_id_type_int' => 'Migrated from max ID', + 'object_channelFull_param_pinned_msg_id_type_int' => 'Pinned msg ID', + 'object_channelFull_param_stickerset_type_StickerSet' => 'Stickerset', + 'object_channelFull_param_available_min_id_type_int' => 'Available min ID', + 'object_chatParticipant' => 'Chat participant', + 'object_chatParticipant_param_user_id_type_int' => 'User ID', + 'object_chatParticipant_param_inviter_id_type_int' => 'Inviter ID', + 'object_chatParticipant_param_date_type_int' => 'Date', + 'object_chatParticipantCreator' => 'Chat participant creator', + 'object_chatParticipantCreator_param_user_id_type_int' => 'User ID', + 'object_chatParticipantAdmin' => 'Chat participant admin', + 'object_chatParticipantAdmin_param_user_id_type_int' => 'User ID', + 'object_chatParticipantAdmin_param_inviter_id_type_int' => 'Inviter ID', + 'object_chatParticipantAdmin_param_date_type_int' => 'Date', + 'object_chatParticipantsForbidden' => 'Chat participants forbidden', + 'object_chatParticipantsForbidden_param_chat_id_type_int' => 'Chat ID', + 'object_chatParticipantsForbidden_param_self_participant_type_ChatParticipant' => 'Self participant', + 'object_chatParticipants' => 'Chat participants', + 'object_chatParticipants_param_chat_id_type_int' => 'Chat ID', + 'object_chatParticipants_param_participants_type_Vector t' => 'Participants', + 'object_chatParticipants_param_version_type_int' => 'Version', + 'object_chatPhotoEmpty' => 'Empty chat photo', + 'object_chatPhoto' => 'Chat photo', + 'object_chatPhoto_param_photo_small_type_FileLocation' => 'Photo small', + 'object_chatPhoto_param_photo_big_type_FileLocation' => 'Photo big', + 'object_messageEmpty' => 'Empty message', + 'object_messageEmpty_param_id_type_int' => 'ID', + 'object_message' => 'Message', + 'object_message_param_out_type_true' => 'Out?', + 'object_message_param_mentioned_type_true' => 'Mentioned?', + 'object_message_param_media_unread_type_true' => 'Media unread?', + 'object_message_param_silent_type_true' => 'Silent?', + 'object_message_param_post_type_true' => 'Post?', + 'object_message_param_id_type_int' => 'ID', + 'object_message_param_from_id_type_int' => 'From ID', + 'object_message_param_to_id_type_Peer' => 'To ID', + 'object_message_param_fwd_from_type_MessageFwdHeader' => 'Forwarded from', + 'object_message_param_via_bot_id_type_int' => 'Via bot ID', + 'object_message_param_reply_to_msg_id_type_int' => 'Reply to msg ID', + 'object_message_param_date_type_int' => 'Date', + 'object_message_param_message_type_string' => 'Message', + 'object_message_param_media_type_MessageMedia' => 'Media', + 'object_message_param_reply_markup_type_ReplyMarkup' => 'Reply markup', + 'object_message_param_entities_type_Vector t' => 'Entities', + 'object_message_param_views_type_int' => 'Views', + 'object_message_param_edit_date_type_int' => 'Edit date', + 'object_message_param_post_author_type_string' => 'Post author', + 'object_message_param_grouped_id_type_long' => 'Grouped ID', + 'object_messageService' => 'Message service', + 'object_messageService_param_out_type_true' => 'Out?', + 'object_messageService_param_mentioned_type_true' => 'Mentioned?', + 'object_messageService_param_media_unread_type_true' => 'Media unread?', + 'object_messageService_param_silent_type_true' => 'Silent?', + 'object_messageService_param_post_type_true' => 'Post?', + 'object_messageService_param_id_type_int' => 'ID', + 'object_messageService_param_from_id_type_int' => 'From ID', + 'object_messageService_param_to_id_type_Peer' => 'To ID', + 'object_messageService_param_reply_to_msg_id_type_int' => 'Reply to msg ID', + 'object_messageService_param_date_type_int' => 'Date', + 'object_messageService_param_action_type_MessageAction' => 'Action', + 'object_messageMediaEmpty' => 'Empty message media', + 'object_messageMediaPhoto' => 'Message media photo', + 'object_messageMediaPhoto_param_photo_type_Photo' => 'Photo', + 'object_messageMediaPhoto_param_ttl_seconds_type_int' => 'Ttl seconds', + 'object_messageMediaGeo' => 'Message media geo', + 'object_messageMediaGeo_param_geo_type_GeoPoint' => 'Geo', + 'object_messageMediaContact' => 'Message media contact', + 'object_messageMediaContact_param_phone_number_type_string' => 'Phone number', + 'object_messageMediaContact_param_first_name_type_string' => 'First name', + 'object_messageMediaContact_param_last_name_type_string' => 'Last name', + 'object_messageMediaContact_param_user_id_type_int' => 'User ID', + 'object_messageMediaUnsupported' => 'Message media unsupported', + 'object_messageMediaDocument' => 'Message media document', + 'object_messageMediaDocument_param_document_type_Document' => 'Document', + 'object_messageMediaDocument_param_ttl_seconds_type_int' => 'Ttl seconds', + 'object_messageMediaWebPage' => 'Message media web page', + 'object_messageMediaWebPage_param_webpage_type_WebPage' => 'Webpage', + 'object_messageMediaVenue' => 'Message media venue', + 'object_messageMediaVenue_param_geo_type_GeoPoint' => 'Geo', + 'object_messageMediaVenue_param_title_type_string' => 'Title', + 'object_messageMediaVenue_param_address_type_string' => 'Address', + 'object_messageMediaVenue_param_provider_type_string' => 'Provider', + 'object_messageMediaVenue_param_venue_id_type_string' => 'Venue ID', + 'object_messageMediaVenue_param_venue_type_type_string' => 'Venue type', + 'object_messageMediaGame' => 'Message media game', + 'object_messageMediaGame_param_game_type_Game' => 'Game', + 'object_messageMediaInvoice' => 'Message media invoice', + 'object_messageMediaInvoice_param_shipping_address_requested_type_true' => 'Shipping address requested?', + 'object_messageMediaInvoice_param_test_type_true' => 'Test?', + 'object_messageMediaInvoice_param_title_type_string' => 'Title', + 'object_messageMediaInvoice_param_description_type_string' => 'Description', + 'object_messageMediaInvoice_param_photo_type_WebDocument' => 'Photo', + 'object_messageMediaInvoice_param_receipt_msg_id_type_int' => 'Receipt msg ID', + 'object_messageMediaInvoice_param_currency_type_string' => 'Currency', + 'object_messageMediaInvoice_param_total_amount_type_long' => 'Total amount', + 'object_messageMediaInvoice_param_start_param_type_string' => 'Start param', + 'object_messageMediaGeoLive' => 'Message media geo live', + 'object_messageMediaGeoLive_param_geo_type_GeoPoint' => 'Geo', + 'object_messageMediaGeoLive_param_period_type_int' => 'Period', + 'object_messageActionEmpty' => 'Empty message action', + 'object_messageActionChatCreate' => 'Message action chat create', + 'object_messageActionChatCreate_param_title_type_string' => 'Title', + 'object_messageActionChatCreate_param_users_type_Vector t' => 'Users', + 'object_messageActionChatEditTitle' => 'Message action chat edit title', + 'object_messageActionChatEditTitle_param_title_type_string' => 'Title', + 'object_messageActionChatEditPhoto' => 'Message action chat edit photo', + 'object_messageActionChatEditPhoto_param_photo_type_Photo' => 'Photo', + 'object_messageActionChatDeletePhoto' => 'Message action chat delete photo', + 'object_messageActionChatAddUser' => 'Message action chat add user', + 'object_messageActionChatAddUser_param_users_type_Vector t' => 'Users', + 'object_messageActionChatDeleteUser' => 'Message action chat delete user', + 'object_messageActionChatDeleteUser_param_user_id_type_int' => 'User ID', + 'object_messageActionChatJoinedByLink' => 'Message action chat joined by link', + 'object_messageActionChatJoinedByLink_param_inviter_id_type_int' => 'Inviter ID', + 'object_messageActionChannelCreate' => 'Message action channel create', + 'object_messageActionChannelCreate_param_title_type_string' => 'Title', + 'object_messageActionChatMigrateTo' => 'Message action chat migrate to', + 'object_messageActionChatMigrateTo_param_channel_id_type_int' => 'Channel ID', + 'object_messageActionChannelMigrateFrom' => 'Message action channel migrate from', + 'object_messageActionChannelMigrateFrom_param_title_type_string' => 'Title', + 'object_messageActionChannelMigrateFrom_param_chat_id_type_int' => 'Chat ID', + 'object_messageActionPinMessage' => 'Message action pin message', + 'object_messageActionHistoryClear' => 'Message action history clear', + 'object_messageActionGameScore' => 'Message action game score', + 'object_messageActionGameScore_param_game_id_type_long' => 'Game ID', + 'object_messageActionGameScore_param_score_type_int' => 'Score', + 'object_messageActionPaymentSentMe' => 'Message action payment sent me', + 'object_messageActionPaymentSentMe_param_currency_type_string' => 'Currency', + 'object_messageActionPaymentSentMe_param_total_amount_type_long' => 'Total amount', + 'object_messageActionPaymentSentMe_param_payload_type_bytes' => 'Payload', + 'object_messageActionPaymentSentMe_param_info_type_PaymentRequestedInfo' => 'Info', + 'object_messageActionPaymentSentMe_param_shipping_option_id_type_string' => 'Shipping option ID', + 'object_messageActionPaymentSentMe_param_charge_type_PaymentCharge' => 'Charge', + 'object_messageActionPaymentSent' => 'Message action payment sent', + 'object_messageActionPaymentSent_param_currency_type_string' => 'Currency', + 'object_messageActionPaymentSent_param_total_amount_type_long' => 'Total amount', + 'object_messageActionPhoneCall' => 'Message action phone call', + 'object_messageActionPhoneCall_param_call_id_type_long' => 'Call ID', + 'object_messageActionPhoneCall_param_reason_type_PhoneCallDiscardReason' => 'Reason', + 'object_messageActionPhoneCall_param_duration_type_int' => 'Duration', + 'object_messageActionScreenshotTaken' => 'Message action screenshot taken', + 'object_messageActionCustomAction' => 'Message action custom action', + 'object_messageActionCustomAction_param_message_type_string' => 'Message', + 'object_dialog' => 'Dialog', + 'object_dialog_param_pinned_type_true' => 'Pinned?', + 'object_dialog_param_peer_type_Peer' => 'Peer', + 'object_dialog_param_top_message_type_int' => 'Top message', + 'object_dialog_param_read_inbox_max_id_type_int' => 'Read inbox max ID', + 'object_dialog_param_read_outbox_max_id_type_int' => 'Read outbox max ID', + 'object_dialog_param_unread_count_type_int' => 'Unread count', + 'object_dialog_param_unread_mentions_count_type_int' => 'Unread mentions count', + 'object_dialog_param_notify_settings_type_PeerNotifySettings' => 'Notify settings', + 'object_dialog_param_pts_type_int' => 'Pts', + 'object_dialog_param_draft_type_DraftMessage' => 'Draft', + 'object_photoEmpty' => 'Empty photo', + 'object_photoEmpty_param_id_type_long' => 'ID', + 'object_photo' => 'Photo', + 'object_photo_param_has_stickers_type_true' => 'Has stickers?', + 'object_photo_param_id_type_long' => 'ID', + 'object_photo_param_access_hash_type_long' => 'Access hash', + 'object_photo_param_date_type_int' => 'Date', + 'object_photo_param_sizes_type_Vector t' => 'Sizes', + 'object_photoSizeEmpty' => 'Empty photo size', + 'object_photoSizeEmpty_param_type_type_string' => 'Type', + 'object_photoSize' => 'Photo size', + 'object_photoSize_param_type_type_string' => 'Type', + 'object_photoSize_param_location_type_FileLocation' => 'Location', + 'object_photoSize_param_w_type_int' => 'Width', + 'object_photoSize_param_h_type_int' => 'Height', + 'object_photoSize_param_size_type_int' => 'Size', + 'object_photoCachedSize' => 'Photo cached size', + 'object_photoCachedSize_param_type_type_string' => 'Type', + 'object_photoCachedSize_param_location_type_FileLocation' => 'Location', + 'object_photoCachedSize_param_w_type_int' => 'Width', + 'object_photoCachedSize_param_h_type_int' => 'Height', + 'object_photoCachedSize_param_bytes_type_bytes' => 'Bytes', + 'object_geoPointEmpty' => 'Empty geo point', + 'object_geoPoint' => 'Geo point', + 'object_geoPoint_param_long_type_double' => 'Long', + 'object_geoPoint_param_lat_type_double' => 'Lat', + 'object_auth.checkedPhone' => 'Checked phone', + 'object_auth.checkedPhone_param_phone_registered_type_Bool' => 'Phone registered?', + 'object_auth.sentCode' => 'Sent code', + 'object_auth.sentCode_param_phone_registered_type_true' => 'Phone registered?', + 'object_auth.sentCode_param_type_type_auth.SentCodeType' => 'Type', + 'object_auth.sentCode_param_phone_code_hash_type_string' => 'Phone code hash', + 'object_auth.sentCode_param_next_type_type_auth.CodeType' => 'Next type', + 'object_auth.sentCode_param_timeout_type_int' => 'Timeout', + 'object_auth.authorization' => 'Authorization', + 'object_auth.authorization_param_tmp_sessions_type_int' => 'Temporary sessions', + 'object_auth.authorization_param_user_type_User' => 'User', + 'object_auth.exportedAuthorization' => 'Exported authorization', + 'object_auth.exportedAuthorization_param_id_type_int' => 'ID', + 'object_auth.exportedAuthorization_param_bytes_type_bytes' => 'Bytes', + 'object_inputNotifyPeer' => 'Notify peer', + 'object_inputNotifyPeer_param_peer_type_InputPeer' => 'Peer', + 'object_inputNotifyUsers' => 'Notify users', + 'object_inputNotifyChats' => 'Notify chats', + 'object_inputNotifyAll' => 'Notify all', + 'object_inputPeerNotifyEventsEmpty' => 'Empty input peer notify events', + 'object_inputPeerNotifyEventsAll' => 'Peer notify events all', + 'object_inputPeerNotifySettings' => 'Peer notify settings', + 'object_inputPeerNotifySettings_param_show_previews_type_true' => 'Show previews?', + 'object_inputPeerNotifySettings_param_silent_type_true' => 'Silent?', + 'object_inputPeerNotifySettings_param_mute_until_type_int' => 'Mute until', + 'object_inputPeerNotifySettings_param_sound_type_string' => 'Sound', + 'object_peerNotifyEventsEmpty' => 'Empty peer notify events', + 'object_peerNotifyEventsAll' => 'Peer notify events all', + 'object_peerNotifySettingsEmpty' => 'Empty peer notify settings', + 'object_peerNotifySettings' => 'Peer notify settings', + 'object_peerNotifySettings_param_show_previews_type_true' => 'Show previews?', + 'object_peerNotifySettings_param_silent_type_true' => 'Silent?', + 'object_peerNotifySettings_param_mute_until_type_int' => 'Mute until', + 'object_peerNotifySettings_param_sound_type_string' => 'Sound', + 'object_peerSettings' => 'Peer settings', + 'object_peerSettings_param_report_spam_type_true' => 'Report spam?', + 'object_wallPaper' => 'Wall paper', + 'object_wallPaper_param_id_type_int' => 'ID', + 'object_wallPaper_param_title_type_string' => 'Title', + 'object_wallPaper_param_sizes_type_Vector t' => 'Sizes', + 'object_wallPaper_param_color_type_int' => 'Color', + 'object_wallPaperSolid' => 'Wall paper solid', + 'object_wallPaperSolid_param_id_type_int' => 'ID', + 'object_wallPaperSolid_param_title_type_string' => 'Title', + 'object_wallPaperSolid_param_bg_color_type_int' => 'Bg color', + 'object_wallPaperSolid_param_color_type_int' => 'Color', + 'object_inputReportReasonSpam' => 'Report reason spam', + 'object_inputReportReasonViolence' => 'Report reason violence', + 'object_inputReportReasonPornography' => 'Report reason pornography', + 'object_inputReportReasonOther' => 'Report reason other', + 'object_inputReportReasonOther_param_text_type_string' => 'Text', + 'object_userFull' => 'User full', + 'object_userFull_param_blocked_type_true' => 'Blocked?', + 'object_userFull_param_phone_calls_available_type_true' => 'Phone calls available?', + 'object_userFull_param_phone_calls_private_type_true' => 'Phone calls private?', + 'object_userFull_param_user_type_User' => 'User', + 'object_userFull_param_about_type_string' => 'About', + 'object_userFull_param_link_type_contacts.Link' => 'Link', + 'object_userFull_param_profile_photo_type_Photo' => 'Profile photo', + 'object_userFull_param_notify_settings_type_PeerNotifySettings' => 'Notify settings', + 'object_userFull_param_bot_info_type_BotInfo' => 'Bot info', + 'object_userFull_param_common_chats_count_type_int' => 'Common chats count', + 'object_contact' => 'Contact', + 'object_contact_param_user_id_type_int' => 'User ID', + 'object_contact_param_mutual_type_Bool' => 'Mutual?', + 'object_importedContact' => 'Imported contact', + 'object_importedContact_param_user_id_type_int' => 'User ID', + 'object_importedContact_param_client_id_type_long' => 'Client ID', + 'object_contactBlocked' => 'Contact blocked', + 'object_contactBlocked_param_user_id_type_int' => 'User ID', + 'object_contactBlocked_param_date_type_int' => 'Date', + 'object_contactStatus' => 'Contact status', + 'object_contactStatus_param_user_id_type_int' => 'User ID', + 'object_contactStatus_param_status_type_UserStatus' => 'Status', + 'object_contacts.link' => 'Link', + 'object_contacts.link_param_my_link_type_ContactLink' => 'My link', + 'object_contacts.link_param_foreign_link_type_ContactLink' => 'Foreign link', + 'object_contacts.link_param_user_type_User' => 'User', + 'object_contacts.contactsNotModified' => 'Contacts not modified', + 'object_contacts.contacts' => 'Contacts', + 'object_contacts.contacts_param_contacts_type_Vector t' => 'Contacts', + 'object_contacts.contacts_param_saved_count_type_int' => 'Saved count', + 'object_contacts.contacts_param_users_type_Vector t' => 'Users', + 'object_contacts.importedContacts' => 'Imported contacts', + 'object_contacts.importedContacts_param_imported_type_Vector t' => 'Imported', + 'object_contacts.importedContacts_param_popular_invites_type_Vector t' => 'Popular invites', + 'object_contacts.importedContacts_param_retry_contacts_type_Vector t' => 'Retry importing contacts whose client IDs appear here', + 'object_contacts.importedContacts_param_users_type_Vector t' => 'Users', + 'object_contacts.blocked' => 'Blocked', + 'object_contacts.blocked_param_blocked_type_Vector t' => 'Blocked', + 'object_contacts.blocked_param_users_type_Vector t' => 'Users', + 'object_contacts.blockedSlice' => 'Blocked slice', + 'object_contacts.blockedSlice_param_count_type_int' => 'Count', + 'object_contacts.blockedSlice_param_blocked_type_Vector t' => 'Blocked', + 'object_contacts.blockedSlice_param_users_type_Vector t' => 'Users', + 'object_messages.dialogs' => 'Dialogs', + 'object_messages.dialogs_param_dialogs_type_Vector t' => 'Dialogs', + 'object_messages.dialogs_param_messages_type_Vector t' => 'Messages', + 'object_messages.dialogs_param_chats_type_Vector t' => 'Chats', + 'object_messages.dialogs_param_users_type_Vector t' => 'Users', + 'object_messages.dialogsSlice' => 'Dialogs slice', + 'object_messages.dialogsSlice_param_count_type_int' => 'Count', + 'object_messages.dialogsSlice_param_dialogs_type_Vector t' => 'Dialogs', + 'object_messages.dialogsSlice_param_messages_type_Vector t' => 'Messages', + 'object_messages.dialogsSlice_param_chats_type_Vector t' => 'Chats', + 'object_messages.dialogsSlice_param_users_type_Vector t' => 'Users', + 'object_messages.messages' => 'Messages', + 'object_messages.messages_param_messages_type_Vector t' => 'Messages', + 'object_messages.messages_param_chats_type_Vector t' => 'Chats', + 'object_messages.messages_param_users_type_Vector t' => 'Users', + 'object_messages.messagesSlice' => 'Messages slice', + 'object_messages.messagesSlice_param_count_type_int' => 'Count', + 'object_messages.messagesSlice_param_messages_type_Vector t' => 'Messages', + 'object_messages.messagesSlice_param_chats_type_Vector t' => 'Chats', + 'object_messages.messagesSlice_param_users_type_Vector t' => 'Users', + 'object_messages.channelMessages' => 'Channel messages', + 'object_messages.channelMessages_param_pts_type_int' => 'Pts', + 'object_messages.channelMessages_param_count_type_int' => 'Count', + 'object_messages.channelMessages_param_messages_type_Vector t' => 'Messages', + 'object_messages.channelMessages_param_chats_type_Vector t' => 'Chats', + 'object_messages.channelMessages_param_users_type_Vector t' => 'Users', + 'object_messages.messagesNotModified' => 'Messages not modified', + 'object_messages.messagesNotModified_param_count_type_int' => 'Count', + 'object_messages.chats' => 'Chats', + 'object_messages.chats_param_chats_type_Vector t' => 'Chats', + 'object_messages.chatsSlice' => 'Chats slice', + 'object_messages.chatsSlice_param_count_type_int' => 'Count', + 'object_messages.chatsSlice_param_chats_type_Vector t' => 'Chats', + 'object_messages.chatFull' => 'Chat full', + 'object_messages.chatFull_param_full_chat_type_ChatFull' => 'Full chat', + 'object_messages.chatFull_param_chats_type_Vector t' => 'Chats', + 'object_messages.chatFull_param_users_type_Vector t' => 'Users', + 'object_messages.affectedHistory' => 'Affected history', + 'object_messages.affectedHistory_param_pts_type_int' => 'Pts', + 'object_messages.affectedHistory_param_pts_count_type_int' => 'Pts count', + 'object_messages.affectedHistory_param_offset_type_int' => 'Offset', + 'object_inputMessagesFilterEmpty' => 'Empty input messages filter', + 'object_inputMessagesFilterPhotos' => 'Messages filter photos', + 'object_inputMessagesFilterVideo' => 'Messages filter video', + 'object_inputMessagesFilterPhotoVideo' => 'Messages filter photo video', + 'object_inputMessagesFilterDocument' => 'Messages filter document', + 'object_inputMessagesFilterUrl' => 'Messages filter URL', + 'object_inputMessagesFilterGif' => 'Messages filter gif', + 'object_inputMessagesFilterVoice' => 'Messages filter voice', + 'object_inputMessagesFilterMusic' => 'Messages filter music', + 'object_inputMessagesFilterChatPhotos' => 'Messages filter chat photos', + 'object_inputMessagesFilterPhoneCalls' => 'Messages filter phone calls', + 'object_inputMessagesFilterPhoneCalls_param_missed_type_true' => 'Missed?', + 'object_inputMessagesFilterRoundVoice' => 'Messages filter round voice', + 'object_inputMessagesFilterRoundVideo' => 'Messages filter round video', + 'object_inputMessagesFilterMyMentions' => 'Messages filter my mentions', + 'object_inputMessagesFilterGeo' => 'Messages filter geo', + 'object_inputMessagesFilterContacts' => 'Messages filter contacts', + 'object_updateNewMessage' => 'Update new message', + 'object_updateNewMessage_param_message_type_Message' => 'Message', + 'object_updateNewMessage_param_pts_type_int' => 'Pts', + 'object_updateNewMessage_param_pts_count_type_int' => 'Pts count', + 'object_updateMessageID' => 'Update message ID', + 'object_updateMessageID_param_id_type_int' => 'ID', + 'object_updateDeleteMessages' => 'Update delete messages', + 'object_updateDeleteMessages_param_messages_type_Vector t' => 'Messages', + 'object_updateDeleteMessages_param_pts_type_int' => 'Pts', + 'object_updateDeleteMessages_param_pts_count_type_int' => 'Pts count', + 'object_updateUserTyping' => 'Update user typing', + 'object_updateUserTyping_param_user_id_type_int' => 'User ID', + 'object_updateUserTyping_param_action_type_SendMessageAction' => 'Action', + 'object_updateChatUserTyping' => 'Update chat user typing', + 'object_updateChatUserTyping_param_chat_id_type_int' => 'Chat ID', + 'object_updateChatUserTyping_param_user_id_type_int' => 'User ID', + 'object_updateChatUserTyping_param_action_type_SendMessageAction' => 'Action', + 'object_updateChatParticipants' => 'Update chat participants', + 'object_updateChatParticipants_param_participants_type_ChatParticipants' => 'Participants', + 'object_updateUserName' => 'Update user name', + 'object_updateUserName_param_user_id_type_int' => 'User ID', + 'object_updateUserName_param_first_name_type_string' => 'First name', + 'object_updateUserName_param_last_name_type_string' => 'Last name', + 'object_updateUserName_param_username_type_string' => 'Username', + 'object_updateUserPhoto' => 'Update user photo', + 'object_updateUserPhoto_param_user_id_type_int' => 'User ID', + 'object_updateUserPhoto_param_date_type_int' => 'Date', + 'object_updateUserPhoto_param_photo_type_UserProfilePhoto' => 'Photo', + 'object_updateUserPhoto_param_previous_type_Bool' => 'Previous?', + 'object_updateContactRegistered' => 'Update contact registered', + 'object_updateContactRegistered_param_user_id_type_int' => 'User ID', + 'object_updateContactRegistered_param_date_type_int' => 'Date', + 'object_updateContactLink' => 'Update contact link', + 'object_updateContactLink_param_user_id_type_int' => 'User ID', + 'object_updateContactLink_param_my_link_type_ContactLink' => 'My link', + 'object_updateContactLink_param_foreign_link_type_ContactLink' => 'Foreign link', + 'object_updateNewEncryptedMessage' => 'Update new encrypted message', + 'object_updateNewEncryptedMessage_param_message_type_EncryptedMessage' => 'Message', + 'object_updateNewEncryptedMessage_param_qts_type_int' => 'Qts', + 'object_updateEncryptedChatTyping' => 'Update encrypted chat typing', + 'object_updateEncryptedChatTyping_param_chat_id_type_int' => 'Chat ID', + 'object_updateEncryption' => 'Update encryption', + 'object_updateEncryption_param_chat_type_EncryptedChat' => 'Chat', + 'object_updateEncryption_param_date_type_int' => 'Date', + 'object_updateEncryptedMessagesRead' => 'Update encrypted messages read', + 'object_updateEncryptedMessagesRead_param_chat_id_type_int' => 'Chat ID', + 'object_updateEncryptedMessagesRead_param_max_date_type_int' => 'Max date', + 'object_updateEncryptedMessagesRead_param_date_type_int' => 'Date', + 'object_updateChatParticipantAdd' => 'Update chat participant add', + 'object_updateChatParticipantAdd_param_chat_id_type_int' => 'Chat ID', + 'object_updateChatParticipantAdd_param_user_id_type_int' => 'User ID', + 'object_updateChatParticipantAdd_param_inviter_id_type_int' => 'Inviter ID', + 'object_updateChatParticipantAdd_param_date_type_int' => 'Date', + 'object_updateChatParticipantAdd_param_version_type_int' => 'Version', + 'object_updateChatParticipantDelete' => 'Update chat participant delete', + 'object_updateChatParticipantDelete_param_chat_id_type_int' => 'Chat ID', + 'object_updateChatParticipantDelete_param_user_id_type_int' => 'User ID', + 'object_updateChatParticipantDelete_param_version_type_int' => 'Version', + 'object_updateDcOptions' => 'Update DC options', + 'object_updateDcOptions_param_dc_options_type_Vector t' => 'DC options', + 'object_updateUserBlocked' => 'Update user blocked', + 'object_updateUserBlocked_param_user_id_type_int' => 'User ID', + 'object_updateUserBlocked_param_blocked_type_Bool' => 'Blocked?', + 'object_updateNotifySettings' => 'Update notify settings', + 'object_updateNotifySettings_param_peer_type_NotifyPeer' => 'Peer', + 'object_updateNotifySettings_param_notify_settings_type_PeerNotifySettings' => 'Notify settings', + 'object_updateServiceNotification' => 'Update service notification', + 'object_updateServiceNotification_param_popup_type_true' => 'Popup?', + 'object_updateServiceNotification_param_inbox_date_type_int' => 'Inbox date', + 'object_updateServiceNotification_param_type_type_string' => 'Type', + 'object_updateServiceNotification_param_message_type_string' => 'Message', + 'object_updateServiceNotification_param_media_type_MessageMedia' => 'Media', + 'object_updateServiceNotification_param_entities_type_Vector t' => 'Entities', + 'object_updatePrivacy' => 'Update privacy', + 'object_updatePrivacy_param_key_type_PrivacyKey' => 'Key', + 'object_updatePrivacy_param_rules_type_Vector t' => 'Rules', + 'object_updateUserPhone' => 'Update user phone', + 'object_updateUserPhone_param_user_id_type_int' => 'User ID', + 'object_updateUserPhone_param_phone_type_string' => 'Phone', + 'object_updateReadHistoryInbox' => 'Update read history inbox', + 'object_updateReadHistoryInbox_param_peer_type_Peer' => 'Peer', + 'object_updateReadHistoryInbox_param_max_id_type_int' => 'Max ID', + 'object_updateReadHistoryInbox_param_pts_type_int' => 'Pts', + 'object_updateReadHistoryInbox_param_pts_count_type_int' => 'Pts count', + 'object_updateReadHistoryOutbox' => 'Update read history outbox', + 'object_updateReadHistoryOutbox_param_peer_type_Peer' => 'Peer', + 'object_updateReadHistoryOutbox_param_max_id_type_int' => 'Max ID', + 'object_updateReadHistoryOutbox_param_pts_type_int' => 'Pts', + 'object_updateReadHistoryOutbox_param_pts_count_type_int' => 'Pts count', + 'object_updateWebPage' => 'Update web page', + 'object_updateWebPage_param_webpage_type_WebPage' => 'Webpage', + 'object_updateWebPage_param_pts_type_int' => 'Pts', + 'object_updateWebPage_param_pts_count_type_int' => 'Pts count', + 'object_updateReadMessagesContents' => 'Update read messages contents', + 'object_updateReadMessagesContents_param_messages_type_Vector t' => 'Messages', + 'object_updateReadMessagesContents_param_pts_type_int' => 'Pts', + 'object_updateReadMessagesContents_param_pts_count_type_int' => 'Pts count', + 'object_updateChannelTooLong' => 'Update channel too long', + 'object_updateChannelTooLong_param_channel_id_type_int' => 'Channel ID', + 'object_updateChannelTooLong_param_pts_type_int' => 'Pts', + 'object_updateChannel' => 'Update channel', + 'object_updateChannel_param_channel_id_type_int' => 'Channel ID', + 'object_updateNewChannelMessage' => 'Update new channel message', + 'object_updateNewChannelMessage_param_message_type_Message' => 'Message', + 'object_updateNewChannelMessage_param_pts_type_int' => 'Pts', + 'object_updateNewChannelMessage_param_pts_count_type_int' => 'Pts count', + 'object_updateReadChannelInbox' => 'Update read channel inbox', + 'object_updateReadChannelInbox_param_channel_id_type_int' => 'Channel ID', + 'object_updateReadChannelInbox_param_max_id_type_int' => 'Max ID', + 'object_updateDeleteChannelMessages' => 'Update delete channel messages', + 'object_updateDeleteChannelMessages_param_channel_id_type_int' => 'Channel ID', + 'object_updateDeleteChannelMessages_param_messages_type_Vector t' => 'Messages', + 'object_updateDeleteChannelMessages_param_pts_type_int' => 'Pts', + 'object_updateDeleteChannelMessages_param_pts_count_type_int' => 'Pts count', + 'object_updateChannelMessageViews' => 'Update channel message views', + 'object_updateChannelMessageViews_param_channel_id_type_int' => 'Channel ID', + 'object_updateChannelMessageViews_param_id_type_int' => 'ID', + 'object_updateChannelMessageViews_param_views_type_int' => 'Views', + 'object_updateChatAdmins' => 'Update chat admins', + 'object_updateChatAdmins_param_chat_id_type_int' => 'Chat ID', + 'object_updateChatAdmins_param_enabled_type_Bool' => 'Enabled?', + 'object_updateChatAdmins_param_version_type_int' => 'Version', + 'object_updateChatParticipantAdmin' => 'Update chat participant admin', + 'object_updateChatParticipantAdmin_param_chat_id_type_int' => 'Chat ID', + 'object_updateChatParticipantAdmin_param_user_id_type_int' => 'User ID', + 'object_updateChatParticipantAdmin_param_is_admin_type_Bool' => 'Is admin?', + 'object_updateChatParticipantAdmin_param_version_type_int' => 'Version', + 'object_updateNewStickerSet' => 'Update new sticker set', + 'object_updateNewStickerSet_param_stickerset_type_messages.StickerSet' => 'Stickerset', + 'object_updateStickerSetsOrder' => 'Update sticker sets order', + 'object_updateStickerSetsOrder_param_masks_type_true' => 'Masks?', + 'object_updateStickerSetsOrder_param_order_type_Vector t' => 'Order', + 'object_updateStickerSets' => 'Update sticker sets', + 'object_updateSavedGifs' => 'Update saved gifs', + 'object_updateBotInlineQuery' => 'Update bot inline query', + 'object_updateBotInlineQuery_param_query_id_type_long' => 'Query ID', + 'object_updateBotInlineQuery_param_user_id_type_int' => 'User ID', + 'object_updateBotInlineQuery_param_query_type_string' => 'Query', + 'object_updateBotInlineQuery_param_geo_type_GeoPoint' => 'Geo', + 'object_updateBotInlineQuery_param_offset_type_string' => 'Offset', + 'object_updateBotInlineSend' => 'Update bot inline send', + 'object_updateBotInlineSend_param_user_id_type_int' => 'User ID', + 'object_updateBotInlineSend_param_query_type_string' => 'Query', + 'object_updateBotInlineSend_param_geo_type_GeoPoint' => 'Geo', + 'object_updateBotInlineSend_param_id_type_string' => 'ID', + 'object_updateBotInlineSend_param_msg_id_type_InputBotInlineMessageID' => 'Msg ID', + 'object_updateEditChannelMessage' => 'Update edit channel message', + 'object_updateEditChannelMessage_param_message_type_Message' => 'Message', + 'object_updateEditChannelMessage_param_pts_type_int' => 'Pts', + 'object_updateEditChannelMessage_param_pts_count_type_int' => 'Pts count', + 'object_updateChannelPinnedMessage' => 'Update channel pinned message', + 'object_updateChannelPinnedMessage_param_channel_id_type_int' => 'Channel ID', + 'object_updateChannelPinnedMessage_param_id_type_int' => 'ID', + 'object_updateBotCallbackQuery' => 'Update bot callback query', + 'object_updateBotCallbackQuery_param_query_id_type_long' => 'Query ID', + 'object_updateBotCallbackQuery_param_user_id_type_int' => 'User ID', + 'object_updateBotCallbackQuery_param_peer_type_Peer' => 'Peer', + 'object_updateBotCallbackQuery_param_msg_id_type_int' => 'Msg ID', + 'object_updateBotCallbackQuery_param_chat_instance_type_long' => 'Chat instance', + 'object_updateBotCallbackQuery_param_data_type_bytes' => 'Data', + 'object_updateBotCallbackQuery_param_game_short_name_type_string' => 'Game short name', + 'object_updateEditMessage' => 'Update edit message', + 'object_updateEditMessage_param_message_type_Message' => 'Message', + 'object_updateEditMessage_param_pts_type_int' => 'Pts', + 'object_updateEditMessage_param_pts_count_type_int' => 'Pts count', + 'object_updateInlineBotCallbackQuery' => 'Update inline bot callback query', + 'object_updateInlineBotCallbackQuery_param_query_id_type_long' => 'Query ID', + 'object_updateInlineBotCallbackQuery_param_user_id_type_int' => 'User ID', + 'object_updateInlineBotCallbackQuery_param_msg_id_type_InputBotInlineMessageID' => 'Msg ID', + 'object_updateInlineBotCallbackQuery_param_chat_instance_type_long' => 'Chat instance', + 'object_updateInlineBotCallbackQuery_param_data_type_bytes' => 'Data', + 'object_updateInlineBotCallbackQuery_param_game_short_name_type_string' => 'Game short name', + 'object_updateReadChannelOutbox' => 'Update read channel outbox', + 'object_updateReadChannelOutbox_param_channel_id_type_int' => 'Channel ID', + 'object_updateReadChannelOutbox_param_max_id_type_int' => 'Max ID', + 'object_updateDraftMessage' => 'Update draft message', + 'object_updateDraftMessage_param_peer_type_Peer' => 'Peer', + 'object_updateDraftMessage_param_draft_type_DraftMessage' => 'Draft', + 'object_updateReadFeaturedStickers' => 'Update read featured stickers', + 'object_updateRecentStickers' => 'Update recent stickers', + 'object_updateConfig' => 'Update config', + 'object_updatePtsChanged' => 'Update pts changed', + 'object_updateChannelWebPage' => 'Update channel web page', + 'object_updateChannelWebPage_param_channel_id_type_int' => 'Channel ID', + 'object_updateChannelWebPage_param_webpage_type_WebPage' => 'Webpage', + 'object_updateChannelWebPage_param_pts_type_int' => 'Pts', + 'object_updateChannelWebPage_param_pts_count_type_int' => 'Pts count', + 'object_updateDialogPinned' => 'Update dialog pinned', + 'object_updateDialogPinned_param_pinned_type_true' => 'Pinned?', + 'object_updateDialogPinned_param_peer_type_Peer' => 'Peer', + 'object_updatePinnedDialogs' => 'Update pinned dialogs', + 'object_updatePinnedDialogs_param_order_type_Vector t' => 'Order', + 'object_updateBotWebhookJSON' => 'Update bot webhook json', + 'object_updateBotWebhookJSON_param_data_type_DataJSON' => 'Data', + 'object_updateBotWebhookJSONQuery' => 'Update bot webhook json query', + 'object_updateBotWebhookJSONQuery_param_query_id_type_long' => 'Query ID', + 'object_updateBotWebhookJSONQuery_param_data_type_DataJSON' => 'Data', + 'object_updateBotWebhookJSONQuery_param_timeout_type_int' => 'Timeout', + 'object_updateBotShippingQuery' => 'Update bot shipping query', + 'object_updateBotShippingQuery_param_query_id_type_long' => 'Query ID', + 'object_updateBotShippingQuery_param_user_id_type_int' => 'User ID', + 'object_updateBotShippingQuery_param_payload_type_bytes' => 'Payload', + 'object_updateBotShippingQuery_param_shipping_address_type_PostAddress' => 'Shipping address', + 'object_updateBotPrecheckoutQuery' => 'Update bot precheckout query', + 'object_updateBotPrecheckoutQuery_param_query_id_type_long' => 'Query ID', + 'object_updateBotPrecheckoutQuery_param_user_id_type_int' => 'User ID', + 'object_updateBotPrecheckoutQuery_param_payload_type_bytes' => 'Payload', + 'object_updateBotPrecheckoutQuery_param_info_type_PaymentRequestedInfo' => 'Info', + 'object_updateBotPrecheckoutQuery_param_shipping_option_id_type_string' => 'Shipping option ID', + 'object_updateBotPrecheckoutQuery_param_currency_type_string' => 'Currency', + 'object_updateBotPrecheckoutQuery_param_total_amount_type_long' => 'Total amount', + 'object_updatePhoneCall' => 'Update phone call', + 'object_updatePhoneCall_param_phone_call_type_PhoneCall' => 'Phone call', + 'object_updateLangPackTooLong' => 'Update lang pack too long', + 'object_updateLangPack' => 'Update lang pack', + 'object_updateLangPack_param_difference_type_LangPackDifference' => 'Difference', + 'object_updateFavedStickers' => 'Update faved stickers', + 'object_updateChannelReadMessagesContents' => 'Update channel read messages contents', + 'object_updateChannelReadMessagesContents_param_channel_id_type_int' => 'Channel ID', + 'object_updateChannelReadMessagesContents_param_messages_type_Vector t' => 'Messages', + 'object_updateContactsReset' => 'Update contacts reset', + 'object_updateChannelAvailableMessages' => 'Update channel available messages', + 'object_updateChannelAvailableMessages_param_channel_id_type_int' => 'Channel ID', + 'object_updateChannelAvailableMessages_param_available_min_id_type_int' => 'Available min ID', + 'object_updates.state' => 'State', + 'object_updates.state_param_pts_type_int' => 'Pts', + 'object_updates.state_param_qts_type_int' => 'Qts', + 'object_updates.state_param_date_type_int' => 'Date', + 'object_updates.state_param_seq_type_int' => 'Seq', + 'object_updates.state_param_unread_count_type_int' => 'Unread count', + 'object_updates.differenceEmpty' => 'Empty difference', + 'object_updates.differenceEmpty_param_date_type_int' => 'Date', + 'object_updates.differenceEmpty_param_seq_type_int' => 'Seq', + 'object_updates.difference' => 'Difference', + 'object_updates.difference_param_new_messages_type_Vector t' => 'New messages', + 'object_updates.difference_param_new_encrypted_messages_type_Vector t' => 'New encrypted messages', + 'object_updates.difference_param_other_updates_type_Vector t' => 'Other updates', + 'object_updates.difference_param_chats_type_Vector t' => 'Chats', + 'object_updates.difference_param_users_type_Vector t' => 'Users', + 'object_updates.difference_param_state_type_updates.State' => 'State', + 'object_updates.differenceSlice' => 'Difference slice', + 'object_updates.differenceSlice_param_new_messages_type_Vector t' => 'New messages', + 'object_updates.differenceSlice_param_new_encrypted_messages_type_Vector t' => 'New encrypted messages', + 'object_updates.differenceSlice_param_other_updates_type_Vector t' => 'Other updates', + 'object_updates.differenceSlice_param_chats_type_Vector t' => 'Chats', + 'object_updates.differenceSlice_param_users_type_Vector t' => 'Users', + 'object_updates.differenceSlice_param_intermediate_state_type_updates.State' => 'Intermediate state', + 'object_updates.differenceTooLong' => 'Difference too long', + 'object_updates.differenceTooLong_param_pts_type_int' => 'Pts', + 'object_updatesTooLong' => 'Updates too long', + 'object_updateShortMessage' => 'Update short message', + 'object_updateShortMessage_param_out_type_true' => 'Out?', + 'object_updateShortMessage_param_mentioned_type_true' => 'Mentioned?', + 'object_updateShortMessage_param_media_unread_type_true' => 'Media unread?', + 'object_updateShortMessage_param_silent_type_true' => 'Silent?', + 'object_updateShortMessage_param_id_type_int' => 'ID', + 'object_updateShortMessage_param_user_id_type_int' => 'User ID', + 'object_updateShortMessage_param_message_type_string' => 'Message', + 'object_updateShortMessage_param_pts_type_int' => 'Pts', + 'object_updateShortMessage_param_pts_count_type_int' => 'Pts count', + 'object_updateShortMessage_param_date_type_int' => 'Date', + 'object_updateShortMessage_param_fwd_from_type_MessageFwdHeader' => 'Fwd from', + 'object_updateShortMessage_param_via_bot_id_type_int' => 'Via bot ID', + 'object_updateShortMessage_param_reply_to_msg_id_type_int' => 'Reply to msg ID', + 'object_updateShortMessage_param_entities_type_Vector t' => 'Entities', + 'object_updateShortChatMessage' => 'Update short chat message', + 'object_updateShortChatMessage_param_out_type_true' => 'Out?', + 'object_updateShortChatMessage_param_mentioned_type_true' => 'Mentioned?', + 'object_updateShortChatMessage_param_media_unread_type_true' => 'Media unread?', + 'object_updateShortChatMessage_param_silent_type_true' => 'Silent?', + 'object_updateShortChatMessage_param_id_type_int' => 'ID', + 'object_updateShortChatMessage_param_from_id_type_int' => 'From ID', + 'object_updateShortChatMessage_param_chat_id_type_int' => 'Chat ID', + 'object_updateShortChatMessage_param_message_type_string' => 'Message', + 'object_updateShortChatMessage_param_pts_type_int' => 'Pts', + 'object_updateShortChatMessage_param_pts_count_type_int' => 'Pts count', + 'object_updateShortChatMessage_param_date_type_int' => 'Date', + 'object_updateShortChatMessage_param_fwd_from_type_MessageFwdHeader' => 'Fwd from', + 'object_updateShortChatMessage_param_via_bot_id_type_int' => 'Via bot ID', + 'object_updateShortChatMessage_param_reply_to_msg_id_type_int' => 'Reply to msg ID', + 'object_updateShortChatMessage_param_entities_type_Vector t' => 'Entities', + 'object_updateShort' => 'Update short', + 'object_updateShort_param_update_type_Update' => 'Update', + 'object_updateShort_param_date_type_int' => 'Date', + 'object_updatesCombined' => 'Updates combined', + 'object_updatesCombined_param_updates_type_Vector t' => 'Updates', + 'object_updatesCombined_param_users_type_Vector t' => 'Users', + 'object_updatesCombined_param_chats_type_Vector t' => 'Chats', + 'object_updatesCombined_param_date_type_int' => 'Date', + 'object_updatesCombined_param_seq_start_type_int' => 'Seq start', + 'object_updatesCombined_param_seq_type_int' => 'Seq', + 'object_updates' => 'Updates', + 'object_updates_param_updates_type_Vector t' => 'Updates', + 'object_updates_param_users_type_Vector t' => 'Users', + 'object_updates_param_chats_type_Vector t' => 'Chats', + 'object_updates_param_date_type_int' => 'Date', + 'object_updates_param_seq_type_int' => 'Seq', + 'object_updateShortSentMessage' => 'Update short sent message', + 'object_updateShortSentMessage_param_out_type_true' => 'Out?', + 'object_updateShortSentMessage_param_id_type_int' => 'ID', + 'object_updateShortSentMessage_param_pts_type_int' => 'Pts', + 'object_updateShortSentMessage_param_pts_count_type_int' => 'Pts count', + 'object_updateShortSentMessage_param_date_type_int' => 'Date', + 'object_updateShortSentMessage_param_media_type_MessageMedia' => 'Media', + 'object_updateShortSentMessage_param_entities_type_Vector t' => 'Entities', + 'object_photos.photos' => 'Photos', + 'object_photos.photos_param_photos_type_Vector t' => 'Photos', + 'object_photos.photos_param_users_type_Vector t' => 'Users', + 'object_photos.photosSlice' => 'Photos slice', + 'object_photos.photosSlice_param_count_type_int' => 'Count', + 'object_photos.photosSlice_param_photos_type_Vector t' => 'Photos', + 'object_photos.photosSlice_param_users_type_Vector t' => 'Users', + 'object_photos.photo' => 'Photo', + 'object_photos.photo_param_photo_type_Photo' => 'Photo', + 'object_photos.photo_param_users_type_Vector t' => 'Users', + 'object_upload.file' => 'File', + 'object_upload.file_param_type_type_storage.FileType' => 'Type', + 'object_upload.file_param_mtime_type_int' => 'Mtime', + 'object_upload.file_param_bytes_type_bytes' => 'Bytes', + 'object_upload.fileCdnRedirect' => 'File cdn redirect', + 'object_upload.fileCdnRedirect_param_dc_id_type_int' => 'DC ID', + 'object_upload.fileCdnRedirect_param_file_token_type_bytes' => 'File token', + 'object_upload.fileCdnRedirect_param_encryption_key_type_bytes' => 'Encryption key', + 'object_upload.fileCdnRedirect_param_encryption_iv_type_bytes' => 'Encryption iv', + 'object_upload.fileCdnRedirect_param_cdn_file_hashes_type_Vector t' => 'Cdn file hashes', + 'object_dcOption' => 'DC option', + 'object_dcOption_param_ipv6_type_true' => 'Ipv6?', + 'object_dcOption_param_media_only_type_true' => 'Media only?', + 'object_dcOption_param_tcpo_only_type_true' => 'Tcpo only?', + 'object_dcOption_param_cdn_type_true' => 'Cdn?', + 'object_dcOption_param_static_type_true' => 'Static?', + 'object_dcOption_param_id_type_int' => 'ID', + 'object_dcOption_param_ip_address_type_string' => 'Ip address', + 'object_dcOption_param_port_type_int' => 'Port', + 'object_config' => 'Config', + 'object_config_param_phonecalls_enabled_type_true' => 'Phonecalls enabled?', + 'object_config_param_default_p2p_contacts_type_true' => 'Default p2p contacts?', + 'object_config_param_date_type_int' => 'Date', + 'object_config_param_expires_type_int' => 'Expires', + 'object_config_param_test_mode_type_Bool' => 'Test mode?', + 'object_config_param_this_dc_type_int' => 'This DC', + 'object_config_param_dc_options_type_Vector t' => 'DC options', + 'object_config_param_chat_size_max_type_int' => 'Chat size max', + 'object_config_param_megagroup_size_max_type_int' => 'Megagroup size max', + 'object_config_param_forwarded_count_max_type_int' => 'Forwarded count max', + 'object_config_param_online_update_period_ms_type_int' => 'Online update period ms', + 'object_config_param_offline_blur_timeout_ms_type_int' => 'Offline blur timeout ms', + 'object_config_param_offline_idle_timeout_ms_type_int' => 'Offline IDle timeout ms', + 'object_config_param_online_cloud_timeout_ms_type_int' => 'Online cloud timeout ms', + 'object_config_param_notify_cloud_delay_ms_type_int' => 'Notify cloud delay ms', + 'object_config_param_notify_default_delay_ms_type_int' => 'Notify default delay ms', + 'object_config_param_chat_big_size_type_int' => 'Chat big size', + 'object_config_param_push_chat_period_ms_type_int' => 'Push chat period ms', + 'object_config_param_push_chat_limit_type_int' => 'Push chat limit', + 'object_config_param_saved_gifs_limit_type_int' => 'Saved gifs limit', + 'object_config_param_edit_time_limit_type_int' => 'Edit time limit', + 'object_config_param_rating_e_decay_type_int' => 'Rating e decay', + 'object_config_param_stickers_recent_limit_type_int' => 'Stickers recent limit', + 'object_config_param_stickers_faved_limit_type_int' => 'Stickers faved limit', + 'object_config_param_channels_read_media_period_type_int' => 'Channels read media period', + 'object_config_param_tmp_sessions_type_int' => 'Tmp sessions', + 'object_config_param_pinned_dialogs_count_max_type_int' => 'Pinned dialogs count max', + 'object_config_param_call_receive_timeout_ms_type_int' => 'Call receive timeout ms', + 'object_config_param_call_ring_timeout_ms_type_int' => 'Call ring timeout ms', + 'object_config_param_call_connect_timeout_ms_type_int' => 'Call connect timeout ms', + 'object_config_param_call_packet_timeout_ms_type_int' => 'Call packet timeout ms', + 'object_config_param_me_url_prefix_type_string' => 'Me URL prefix', + 'object_config_param_suggested_lang_code_type_string' => 'Suggested lang code', + 'object_config_param_lang_pack_version_type_int' => 'Lang pack version', + 'object_config_param_disabled_features_type_Vector t' => 'Disabled features', + 'object_nearestDc' => 'Nearest DC', + 'object_nearestDc_param_country_type_string' => 'Country', + 'object_nearestDc_param_this_dc_type_int' => 'This DC', + 'object_nearestDc_param_nearest_dc_type_int' => 'Nearest DC', + 'object_help.appUpdate' => 'App update', + 'object_help.appUpdate_param_id_type_int' => 'ID', + 'object_help.appUpdate_param_critical_type_Bool' => 'Critical?', + 'object_help.appUpdate_param_url_type_string' => 'URL', + 'object_help.appUpdate_param_text_type_string' => 'Text', + 'object_help.noAppUpdate' => 'No app update', + 'object_help.inviteText' => 'Invite text', + 'object_help.inviteText_param_message_type_string' => 'Message', + 'object_encryptedChatEmpty' => 'Empty encrypted chat', + 'object_encryptedChatEmpty_param_id_type_int' => 'ID', + 'object_encryptedChatWaiting' => 'Encrypted chat waiting', + 'object_encryptedChatWaiting_param_id_type_int' => 'ID', + 'object_encryptedChatWaiting_param_access_hash_type_long' => 'Access hash', + 'object_encryptedChatWaiting_param_date_type_int' => 'Date', + 'object_encryptedChatWaiting_param_admin_id_type_int' => 'Admin ID', + 'object_encryptedChatWaiting_param_participant_id_type_int' => 'Participant ID', + 'object_encryptedChatRequested' => 'Encrypted chat requested', + 'object_encryptedChatRequested_param_id_type_int' => 'ID', + 'object_encryptedChatRequested_param_access_hash_type_long' => 'Access hash', + 'object_encryptedChatRequested_param_date_type_int' => 'Date', + 'object_encryptedChatRequested_param_admin_id_type_int' => 'Admin ID', + 'object_encryptedChatRequested_param_participant_id_type_int' => 'Participant ID', + 'object_encryptedChatRequested_param_g_a_type_bytes' => 'G a', + 'object_encryptedChat' => 'Encrypted chat', + 'object_encryptedChat_param_id_type_int' => 'ID', + 'object_encryptedChat_param_access_hash_type_long' => 'Access hash', + 'object_encryptedChat_param_date_type_int' => 'Date', + 'object_encryptedChat_param_admin_id_type_int' => 'Admin ID', + 'object_encryptedChat_param_participant_id_type_int' => 'Participant ID', + 'object_encryptedChat_param_g_a_or_b_type_bytes' => 'G a or b', + 'object_encryptedChat_param_key_fingerprint_type_long' => 'Key fingerprint', + 'object_encryptedChatDiscarded' => 'Encrypted chat discarded', + 'object_encryptedChatDiscarded_param_id_type_int' => 'ID', + 'object_inputEncryptedChat' => 'Encrypted chat', + 'object_inputEncryptedChat_param_chat_id_type_int' => 'Chat ID', + 'object_inputEncryptedChat_param_access_hash_type_long' => 'Access hash', + 'object_encryptedFileEmpty' => 'Empty encrypted file', + 'object_encryptedFile' => 'Encrypted file', + 'object_encryptedFile_param_id_type_long' => 'ID', + 'object_encryptedFile_param_access_hash_type_long' => 'Access hash', + 'object_encryptedFile_param_size_type_int' => 'Size', + 'object_encryptedFile_param_dc_id_type_int' => 'DC ID', + 'object_encryptedFile_param_key_fingerprint_type_int' => 'Key fingerprint', + 'object_inputEncryptedFileEmpty' => 'Empty input encrypted file', + 'object_inputEncryptedFileUploaded' => 'Encrypted file uploaded', + 'object_inputEncryptedFileUploaded_param_id_type_long' => 'ID', + 'object_inputEncryptedFileUploaded_param_parts_type_int' => 'Parts', + 'object_inputEncryptedFileUploaded_param_md5_checksum_type_string' => 'Md5 checksum', + 'object_inputEncryptedFileUploaded_param_key_fingerprint_type_int' => 'Key fingerprint', + 'object_inputEncryptedFile' => 'Encrypted file', + 'object_inputEncryptedFile_param_id_type_long' => 'ID', + 'object_inputEncryptedFile_param_access_hash_type_long' => 'Access hash', + 'object_inputEncryptedFileBigUploaded' => 'Encrypted file big uploaded', + 'object_inputEncryptedFileBigUploaded_param_id_type_long' => 'ID', + 'object_inputEncryptedFileBigUploaded_param_parts_type_int' => 'Parts', + 'object_inputEncryptedFileBigUploaded_param_key_fingerprint_type_int' => 'Key fingerprint', + 'object_encryptedMessage' => 'Encrypted message', + 'object_encryptedMessage_param_chat_id_type_int' => 'Chat ID', + 'object_encryptedMessage_param_date_type_int' => 'Date', + 'object_encryptedMessage_param_decrypted_message_type_DecryptedMessage' => 'Decrypted message', + 'object_encryptedMessage_param_file_type_EncryptedFile' => 'File', + 'object_encryptedMessageService' => 'Encrypted message service', + 'object_encryptedMessageService_param_chat_id_type_int' => 'Chat ID', + 'object_encryptedMessageService_param_date_type_int' => 'Date', + 'object_encryptedMessageService_param_decrypted_message_type_DecryptedMessage' => 'Decrypted message', + 'object_messages.dhConfigNotModified' => 'Dh config not modified', + 'object_messages.dhConfigNotModified_param_random_type_bytes' => 'Random', + 'object_messages.dhConfig' => 'Dh config', + 'object_messages.dhConfig_param_g_type_int' => 'G', + 'object_messages.dhConfig_param_p_type_bytes' => 'P', + 'object_messages.dhConfig_param_version_type_int' => 'Version', + 'object_messages.dhConfig_param_random_type_bytes' => 'Random', + 'object_messages.sentEncryptedMessage' => 'Sent encrypted message', + 'object_messages.sentEncryptedMessage_param_date_type_int' => 'Date', + 'object_messages.sentEncryptedFile' => 'Sent encrypted file', + 'object_messages.sentEncryptedFile_param_date_type_int' => 'Date', + 'object_messages.sentEncryptedFile_param_file_type_EncryptedFile' => 'File', + 'object_inputDocumentEmpty' => 'Empty input document', + 'object_inputDocument' => 'Document', + 'object_inputDocument_param_id_type_long' => 'ID', + 'object_inputDocument_param_access_hash_type_long' => 'Access hash', + 'object_documentEmpty' => 'Empty document', + 'object_documentEmpty_param_id_type_long' => 'ID', + 'object_document' => 'Document', + 'object_document_param_id_type_long' => 'ID', + 'object_document_param_access_hash_type_long' => 'Access hash', + 'object_document_param_date_type_int' => 'Date', + 'object_document_param_mime_type_type_string' => 'Mime type', + 'object_document_param_size_type_int' => 'Size', + 'object_document_param_thumb_type_PhotoSize' => 'Thumbnail', + 'object_document_param_dc_id_type_int' => 'DC ID', + 'object_document_param_version_type_int' => 'Version', + 'object_document_param_attributes_type_Vector t' => 'Attributes', + 'object_help.support' => 'Support', + 'object_help.support_param_phone_number_type_string' => 'Phone number', + 'object_help.support_param_user_type_User' => 'User', + 'object_notifyPeer' => 'Notify peer', + 'object_notifyPeer_param_peer_type_Peer' => 'Peer', + 'object_notifyUsers' => 'Notify users', + 'object_notifyChats' => 'Notify chats', + 'object_notifyAll' => 'Notify all', + 'object_sendMessageTypingAction' => 'Send message typing action', + 'object_sendMessageCancelAction' => 'Send message cancel action', + 'object_sendMessageRecordVideoAction' => 'Send message record video action', + 'object_sendMessageUploadVideoAction' => 'Send message upload video action', + 'object_sendMessageUploadVideoAction_param_progress_type_int' => 'Progress', + 'object_sendMessageRecordAudioAction' => 'Send message record audio action', + 'object_sendMessageUploadAudioAction' => 'Send message upload audio action', + 'object_sendMessageUploadAudioAction_param_progress_type_int' => 'Progress', + 'object_sendMessageUploadPhotoAction' => 'Send message upload photo action', + 'object_sendMessageUploadPhotoAction_param_progress_type_int' => 'Progress', + 'object_sendMessageUploadDocumentAction' => 'Send message upload document action', + 'object_sendMessageUploadDocumentAction_param_progress_type_int' => 'Progress', + 'object_sendMessageGeoLocationAction' => 'Send message geo location action', + 'object_sendMessageChooseContactAction' => 'Send message choose contact action', + 'object_sendMessageGamePlayAction' => 'Send message game play action', + 'object_sendMessageRecordRoundAction' => 'Send message record round action', + 'object_sendMessageUploadRoundAction' => 'Send message upload round action', + 'object_sendMessageUploadRoundAction_param_progress_type_int' => 'Progress', + 'object_contacts.found' => 'Found', + 'object_contacts.found_param_my_results_type_Vector t' => 'My results', + 'object_contacts.found_param_results_type_Vector t' => 'Results', + 'object_contacts.found_param_chats_type_Vector t' => 'Chats', + 'object_contacts.found_param_users_type_Vector t' => 'Users', + 'object_inputPrivacyKeyStatusTimestamp' => 'Privacy key status timestamp', + 'object_inputPrivacyKeyChatInvite' => 'Privacy key chat invite', + 'object_inputPrivacyKeyPhoneCall' => 'Privacy key phone call', + 'object_privacyKeyStatusTimestamp' => 'Privacy key status timestamp', + 'object_privacyKeyPhoneCall' => 'Privacy key phone call', + 'object_inputPrivacyValueAllowContacts' => 'Privacy value allow contacts', + 'object_inputPrivacyValueAllowAll' => 'Privacy value allow all', + 'object_inputPrivacyValueAllowUsers' => 'Privacy value allow users', + 'object_inputPrivacyValueAllowUsers_param_users_type_Vector t' => 'Users', + 'object_inputPrivacyValueDisallowContacts' => 'Privacy value disallow contacts', + 'object_inputPrivacyValueDisallowAll' => 'Privacy value disallow all', + 'object_inputPrivacyValueDisallowUsers' => 'Privacy value disallow users', + 'object_inputPrivacyValueDisallowUsers_param_users_type_Vector t' => 'Users', + 'object_privacyValueAllowContacts' => 'Privacy value allow contacts', + 'object_privacyValueAllowAll' => 'Privacy value allow all', + 'object_privacyValueAllowUsers' => 'Privacy value allow users', + 'object_privacyValueAllowUsers_param_users_type_Vector t' => 'Users', + 'object_privacyValueDisallowContacts' => 'Privacy value disallow contacts', + 'object_privacyValueDisallowAll' => 'Privacy value disallow all', + 'object_privacyValueDisallowUsers' => 'Privacy value disallow users', + 'object_privacyValueDisallowUsers_param_users_type_Vector t' => 'Users', + 'object_account.privacyRules' => 'Privacy rules', + 'object_account.privacyRules_param_rules_type_Vector t' => 'Rules', + 'object_account.privacyRules_param_users_type_Vector t' => 'Users', + 'object_accountDaysTTL' => 'Account TTL in days', + 'object_accountDaysTTL_param_days_type_int' => 'Days', + 'object_documentAttributeImageSize' => 'Document attribute image size', + 'object_documentAttributeImageSize_param_w_type_int' => 'Width', + 'object_documentAttributeImageSize_param_h_type_int' => 'Height', + 'object_documentAttributeAnimated' => 'Document attribute animated', + 'object_documentAttributeSticker' => 'Document attribute sticker', + 'object_documentAttributeSticker_param_mask_type_true' => 'Mask?', + 'object_documentAttributeSticker_param_alt_type_string' => 'Alt', + 'object_documentAttributeSticker_param_stickerset_type_InputStickerSet' => 'Stickerset', + 'object_documentAttributeSticker_param_mask_coords_type_MaskCoords' => 'Mask coords', + 'object_documentAttributeVideo' => 'Document attribute video', + 'object_documentAttributeVideo_param_round_message_type_true' => 'Round message?', + 'object_documentAttributeVideo_param_supports_streaming_type_true' => 'Supports streaming?', + 'object_documentAttributeVideo_param_duration_type_int' => 'Duration', + 'object_documentAttributeVideo_param_w_type_int' => 'Width', + 'object_documentAttributeVideo_param_h_type_int' => 'Height', + 'object_documentAttributeAudio' => 'Document attribute audio', + 'object_documentAttributeAudio_param_voice_type_true' => 'Voice?', + 'object_documentAttributeAudio_param_duration_type_int' => 'Duration', + 'object_documentAttributeAudio_param_title_type_string' => 'Title', + 'object_documentAttributeAudio_param_performer_type_string' => 'Performer', + 'object_documentAttributeAudio_param_waveform_type_bytes' => 'Waveform', + 'object_documentAttributeFilename' => 'Document attribute filename', + 'object_documentAttributeFilename_param_file_name_type_string' => 'File name', + 'object_documentAttributeHasStickers' => 'Document attribute has stickers', + 'object_messages.stickersNotModified' => 'Stickers not modified', + 'object_messages.stickers' => 'Stickers', + 'object_messages.stickers_param_hash_type_string' => 'Hash', + 'object_messages.stickers_param_stickers_type_Vector t' => 'Stickers', + 'object_stickerPack' => 'Sticker pack', + 'object_stickerPack_param_emoticon_type_string' => 'Emoticon', + 'object_stickerPack_param_documents_type_Vector t' => 'Documents', + 'object_messages.allStickersNotModified' => 'All stickers not modified', + 'object_messages.allStickers' => 'All stickers', + 'object_messages.allStickers_param_hash_type_int' => 'Hash', + 'object_messages.allStickers_param_sets_type_Vector t' => 'Sets', + 'object_disabledFeature' => 'Disabled feature', + 'object_disabledFeature_param_feature_type_string' => 'Feature', + 'object_disabledFeature_param_description_type_string' => 'Description', + 'object_messages.affectedMessages' => 'Affected messages', + 'object_messages.affectedMessages_param_pts_type_int' => 'Pts', + 'object_messages.affectedMessages_param_pts_count_type_int' => 'Pts count', + 'object_contactLinkUnknown' => 'Contact link unknown', + 'object_contactLinkNone' => 'Contact link none', + 'object_contactLinkHasPhone' => 'Contact link has phone', + 'object_contactLinkContact' => 'Contact link contact', + 'object_webPageEmpty' => 'Empty web page', + 'object_webPageEmpty_param_id_type_long' => 'ID', + 'object_webPagePending' => 'Web page pending', + 'object_webPagePending_param_id_type_long' => 'ID', + 'object_webPagePending_param_date_type_int' => 'Date', + 'object_webPage' => 'Web page', + 'object_webPage_param_id_type_long' => 'ID', + 'object_webPage_param_url_type_string' => 'URL', + 'object_webPage_param_display_url_type_string' => 'Display URL', + 'object_webPage_param_hash_type_int' => 'Hash', + 'object_webPage_param_type_type_string' => 'Type', + 'object_webPage_param_site_name_type_string' => 'Site name', + 'object_webPage_param_title_type_string' => 'Title', + 'object_webPage_param_description_type_string' => 'Description', + 'object_webPage_param_photo_type_Photo' => 'Photo', + 'object_webPage_param_embed_url_type_string' => 'Embed URL', + 'object_webPage_param_embed_type_type_string' => 'Embed type', + 'object_webPage_param_embed_width_type_int' => 'Embed width', + 'object_webPage_param_embed_height_type_int' => 'Embed height', + 'object_webPage_param_duration_type_int' => 'Duration', + 'object_webPage_param_author_type_string' => 'Author', + 'object_webPage_param_document_type_Document' => 'Document', + 'object_webPage_param_cached_page_type_Page' => 'Cached page', + 'object_webPageNotModified' => 'Web page not modified', + 'object_authorization' => 'Authorization', + 'object_authorization_param_hash_type_long' => 'Hash', + 'object_authorization_param_device_model_type_string' => 'Device model', + 'object_authorization_param_platform_type_string' => 'Platform', + 'object_authorization_param_system_version_type_string' => 'System version', + 'object_authorization_param_api_id_type_int' => 'Api ID', + 'object_authorization_param_app_name_type_string' => 'App name', + 'object_authorization_param_app_version_type_string' => 'App version', + 'object_authorization_param_date_created_type_int' => 'Date created', + 'object_authorization_param_date_active_type_int' => 'Date active', + 'object_authorization_param_ip_type_string' => 'Ip', + 'object_authorization_param_country_type_string' => 'Country', + 'object_authorization_param_region_type_string' => 'Region', + 'object_account.authorizations' => 'Authorized clients for this account', + 'object_account.authorizations_param_authorizations_type_Vector t' => 'Authorizations', + 'object_account.noPassword' => 'No password', + 'object_account.noPassword_param_new_salt_type_bytes' => 'New salt', + 'object_account.noPassword_param_email_unconfirmed_pattern_type_string' => 'Email unconfirmed pattern', + 'object_account.password' => 'Password', + 'object_account.password_param_current_salt_type_bytes' => 'Current salt', + 'object_account.password_param_new_salt_type_bytes' => 'New salt', + 'object_account.password_param_hint_type_string' => 'Hint', + 'object_account.password_param_has_recovery_type_Bool' => 'Has recovery?', + 'object_account.password_param_email_unconfirmed_pattern_type_string' => 'Email unconfirmed pattern', + 'object_account.passwordSettings' => 'Password settings', + 'object_account.passwordSettings_param_email_type_string' => 'Email', 'object_account.passwordInputSettings' => '2FA password settings', 'object_account.passwordInputSettings_param_new_salt_type_bytes' => '`$new_salt = $MadelineProto->account->getPassword()[\'new_salt\'].$MadelineProto->random(8);`', 'object_account.passwordInputSettings_param_new_password_hash_type_bytes' => '`hash(\'sha256\', $new_salt.$new_password.$new_salt, true)`', - 'object_account.passwordInputSettings_param_hint_type_string' => '', - 'object_account.passwordInputSettings_param_email_type_string' => '', - 'object_auth.passwordRecovery' => '', - 'object_auth.passwordRecovery_param_email_pattern_type_string' => '', - 'object_receivedNotifyMessage' => '', - 'object_receivedNotifyMessage_param_id_type_int' => '', - 'object_chatInviteEmpty' => '', - 'object_chatInviteExported' => '', - 'object_chatInviteExported_param_link_type_string' => '', - 'object_chatInviteAlready' => '', - 'object_chatInviteAlready_param_chat_type_Chat' => '', - 'object_chatInvite' => '', - 'object_chatInvite_param_channel_type_true' => '', - 'object_chatInvite_param_broadcast_type_true' => '', - 'object_chatInvite_param_public_type_true' => '', - 'object_chatInvite_param_megagroup_type_true' => '', - 'object_chatInvite_param_title_type_string' => '', - 'object_chatInvite_param_photo_type_ChatPhoto' => '', - 'object_chatInvite_param_participants_count_type_int' => '', - 'object_chatInvite_param_participants_type_Vector t' => '', - 'object_inputStickerSetEmpty' => '', - 'object_inputStickerSetID' => '', - 'object_inputStickerSetID_param_id_type_long' => '', - 'object_inputStickerSetID_param_access_hash_type_long' => '', - 'object_inputStickerSetShortName' => '', - 'object_inputStickerSetShortName_param_short_name_type_string' => '', - 'object_stickerSet' => '', - 'object_stickerSet_param_installed_type_true' => '', - 'object_stickerSet_param_archived_type_true' => '', - 'object_stickerSet_param_official_type_true' => '', - 'object_stickerSet_param_masks_type_true' => '', - 'object_stickerSet_param_id_type_long' => '', - 'object_stickerSet_param_access_hash_type_long' => '', - 'object_stickerSet_param_title_type_string' => '', - 'object_stickerSet_param_short_name_type_string' => '', - 'object_stickerSet_param_count_type_int' => '', - 'object_stickerSet_param_hash_type_int' => '', - 'object_messages.stickerSet' => '', - 'object_messages.stickerSet_param_set_type_StickerSet' => '', - 'object_messages.stickerSet_param_packs_type_Vector t' => '', - 'object_messages.stickerSet_param_documents_type_Vector t' => '', - 'object_botInfo' => '', - 'object_botInfo_param_user_id_type_int' => '', - 'object_botInfo_param_description_type_string' => '', - 'object_botInfo_param_commands_type_Vector t' => '', - 'object_keyboardButton' => '', - 'object_keyboardButton_param_text_type_string' => '', - 'object_keyboardButtonUrl' => '', - 'object_keyboardButtonUrl_param_text_type_string' => '', - 'object_keyboardButtonUrl_param_url_type_string' => '', - 'object_keyboardButtonCallback' => '', - 'object_keyboardButtonCallback_param_text_type_string' => '', - 'object_keyboardButtonCallback_param_data_type_bytes' => '', - 'object_keyboardButtonRequestPhone' => '', - 'object_keyboardButtonRequestPhone_param_text_type_string' => '', - 'object_keyboardButtonRequestGeoLocation' => '', - 'object_keyboardButtonRequestGeoLocation_param_text_type_string' => '', - 'object_keyboardButtonSwitchInline' => '', - 'object_keyboardButtonSwitchInline_param_same_peer_type_true' => '', - 'object_keyboardButtonSwitchInline_param_text_type_string' => '', - 'object_keyboardButtonSwitchInline_param_query_type_string' => '', - 'object_keyboardButtonGame' => '', - 'object_keyboardButtonGame_param_text_type_string' => '', - 'object_keyboardButtonBuy' => '', - 'object_keyboardButtonBuy_param_text_type_string' => '', - 'object_keyboardButtonRow' => '', - 'object_keyboardButtonRow_param_buttons_type_Vector t' => '', - 'object_replyKeyboardHide' => '', - 'object_replyKeyboardHide_param_selective_type_true' => '', - 'object_replyKeyboardForceReply' => '', - 'object_replyKeyboardForceReply_param_single_use_type_true' => '', - 'object_replyKeyboardForceReply_param_selective_type_true' => '', - 'object_replyKeyboardMarkup' => '', - 'object_replyKeyboardMarkup_param_resize_type_true' => '', - 'object_replyKeyboardMarkup_param_single_use_type_true' => '', - 'object_replyKeyboardMarkup_param_selective_type_true' => '', - 'object_replyKeyboardMarkup_param_rows_type_Vector t' => '', - 'object_replyInlineMarkup' => '', - 'object_replyInlineMarkup_param_rows_type_Vector t' => '', - 'object_messageEntityUnknown' => '', - 'object_messageEntityUnknown_param_offset_type_int' => '', - 'object_messageEntityUnknown_param_length_type_int' => '', - 'object_messageEntityMention' => '', - 'object_messageEntityMention_param_offset_type_int' => '', - 'object_messageEntityMention_param_length_type_int' => '', - 'object_messageEntityHashtag' => '', - 'object_messageEntityHashtag_param_offset_type_int' => '', - 'object_messageEntityHashtag_param_length_type_int' => '', - 'object_messageEntityBotCommand' => '', - 'object_messageEntityBotCommand_param_offset_type_int' => '', - 'object_messageEntityBotCommand_param_length_type_int' => '', - 'object_messageEntityUrl' => '', - 'object_messageEntityUrl_param_offset_type_int' => '', - 'object_messageEntityUrl_param_length_type_int' => '', - 'object_messageEntityEmail' => '', - 'object_messageEntityEmail_param_offset_type_int' => '', - 'object_messageEntityEmail_param_length_type_int' => '', - 'object_messageEntityBold' => '', - 'object_messageEntityBold_param_offset_type_int' => '', - 'object_messageEntityBold_param_length_type_int' => '', - 'object_messageEntityItalic' => '', - 'object_messageEntityItalic_param_offset_type_int' => '', - 'object_messageEntityItalic_param_length_type_int' => '', - 'object_messageEntityCode' => '', - 'object_messageEntityCode_param_offset_type_int' => '', - 'object_messageEntityCode_param_length_type_int' => '', - 'object_messageEntityPre' => '', - 'object_messageEntityPre_param_offset_type_int' => '', - 'object_messageEntityPre_param_length_type_int' => '', - 'object_messageEntityPre_param_language_type_string' => '', - 'object_messageEntityTextUrl' => '', - 'object_messageEntityTextUrl_param_offset_type_int' => '', - 'object_messageEntityTextUrl_param_length_type_int' => '', - 'object_messageEntityTextUrl_param_url_type_string' => '', - 'object_messageEntityMentionName' => '', - 'object_messageEntityMentionName_param_offset_type_int' => '', - 'object_messageEntityMentionName_param_length_type_int' => '', - 'object_messageEntityMentionName_param_user_id_type_int' => '', - 'object_inputMessageEntityMentionName' => '', - 'object_inputMessageEntityMentionName_param_offset_type_int' => '', - 'object_inputMessageEntityMentionName_param_length_type_int' => '', - 'object_inputMessageEntityMentionName_param_user_id_type_InputUser' => '', - 'object_inputChannelEmpty' => '', - 'object_inputChannel' => '', - 'object_inputChannel_param_channel_id_type_int' => '', - 'object_inputChannel_param_access_hash_type_long' => '', - 'object_contacts.resolvedPeer' => '', - 'object_contacts.resolvedPeer_param_peer_type_Peer' => '', - 'object_contacts.resolvedPeer_param_chats_type_Vector t' => '', - 'object_contacts.resolvedPeer_param_users_type_Vector t' => '', - 'object_messageRange' => '', - 'object_messageRange_param_min_id_type_int' => '', - 'object_messageRange_param_max_id_type_int' => '', - 'object_updates.channelDifferenceEmpty' => '', - 'object_updates.channelDifferenceEmpty_param_final_type_true' => '', - 'object_updates.channelDifferenceEmpty_param_pts_type_int' => '', - 'object_updates.channelDifferenceEmpty_param_timeout_type_int' => '', - 'object_updates.channelDifferenceTooLong' => '', - 'object_updates.channelDifferenceTooLong_param_final_type_true' => '', - 'object_updates.channelDifferenceTooLong_param_pts_type_int' => '', - 'object_updates.channelDifferenceTooLong_param_timeout_type_int' => '', - 'object_updates.channelDifferenceTooLong_param_top_message_type_int' => '', - 'object_updates.channelDifferenceTooLong_param_read_inbox_max_id_type_int' => '', - 'object_updates.channelDifferenceTooLong_param_read_outbox_max_id_type_int' => '', - 'object_updates.channelDifferenceTooLong_param_unread_count_type_int' => '', - 'object_updates.channelDifferenceTooLong_param_unread_mentions_count_type_int' => '', - 'object_updates.channelDifferenceTooLong_param_messages_type_Vector t' => '', - 'object_updates.channelDifferenceTooLong_param_chats_type_Vector t' => '', - 'object_updates.channelDifferenceTooLong_param_users_type_Vector t' => '', - 'object_updates.channelDifference' => '', - 'object_updates.channelDifference_param_final_type_true' => '', - 'object_updates.channelDifference_param_pts_type_int' => '', - 'object_updates.channelDifference_param_timeout_type_int' => '', - 'object_updates.channelDifference_param_new_messages_type_Vector t' => '', - 'object_updates.channelDifference_param_other_updates_type_Vector t' => '', - 'object_updates.channelDifference_param_chats_type_Vector t' => '', - 'object_updates.channelDifference_param_users_type_Vector t' => '', - 'object_channelMessagesFilterEmpty' => '', - 'object_channelMessagesFilter' => '', - 'object_channelMessagesFilter_param_exclude_new_messages_type_true' => '', - 'object_channelMessagesFilter_param_ranges_type_Vector t' => '', - 'object_channelParticipant' => '', - 'object_channelParticipant_param_user_id_type_int' => '', - 'object_channelParticipant_param_date_type_int' => '', - 'object_channelParticipantSelf' => '', - 'object_channelParticipantSelf_param_user_id_type_int' => '', - 'object_channelParticipantSelf_param_inviter_id_type_int' => '', - 'object_channelParticipantSelf_param_date_type_int' => '', - 'object_channelParticipantCreator' => '', - 'object_channelParticipantCreator_param_user_id_type_int' => '', - 'object_channelParticipantAdmin' => '', - 'object_channelParticipantAdmin_param_can_edit_type_true' => '', - 'object_channelParticipantAdmin_param_user_id_type_int' => '', - 'object_channelParticipantAdmin_param_inviter_id_type_int' => '', - 'object_channelParticipantAdmin_param_promoted_by_type_int' => '', - 'object_channelParticipantAdmin_param_date_type_int' => '', - 'object_channelParticipantAdmin_param_admin_rights_type_ChannelAdminRights' => '', - 'object_channelParticipantBanned' => '', - 'object_channelParticipantBanned_param_left_type_true' => '', - 'object_channelParticipantBanned_param_user_id_type_int' => '', - 'object_channelParticipantBanned_param_kicked_by_type_int' => '', - 'object_channelParticipantBanned_param_date_type_int' => '', - 'object_channelParticipantBanned_param_banned_rights_type_ChannelBannedRights' => '', - 'object_channelParticipantsRecent' => '', - 'object_channelParticipantsAdmins' => '', - 'object_channelParticipantsKicked' => '', - 'object_channelParticipantsKicked_param_q_type_string' => '', - 'object_channelParticipantsBots' => '', - 'object_channelParticipantsBanned' => '', - 'object_channelParticipantsBanned_param_q_type_string' => '', - 'object_channelParticipantsSearch' => '', - 'object_channelParticipantsSearch_param_q_type_string' => '', - 'object_channels.channelParticipants' => '', - 'object_channels.channelParticipants_param_count_type_int' => '', - 'object_channels.channelParticipants_param_participants_type_Vector t' => '', - 'object_channels.channelParticipants_param_users_type_Vector t' => '', - 'object_channels.channelParticipantsNotModified' => '', - 'object_channels.channelParticipant' => '', - 'object_channels.channelParticipant_param_participant_type_ChannelParticipant' => '', - 'object_channels.channelParticipant_param_users_type_Vector t' => '', - 'object_help.termsOfService' => '', - 'object_help.termsOfService_param_text_type_string' => '', - 'object_foundGif' => '', - 'object_foundGif_param_url_type_string' => '', - 'object_foundGif_param_thumb_url_type_string' => '', - 'object_foundGif_param_content_url_type_string' => '', - 'object_foundGif_param_content_type_type_string' => '', - 'object_foundGif_param_w_type_int' => '', - 'object_foundGif_param_h_type_int' => '', - 'object_foundGifCached' => '', - 'object_foundGifCached_param_url_type_string' => '', - 'object_foundGifCached_param_photo_type_Photo' => '', - 'object_foundGifCached_param_document_type_Document' => '', - 'object_messages.foundGifs' => '', - 'object_messages.foundGifs_param_next_offset_type_int' => '', - 'object_messages.foundGifs_param_results_type_Vector t' => '', - 'object_messages.savedGifsNotModified' => '', - 'object_messages.savedGifs' => '', - 'object_messages.savedGifs_param_hash_type_int' => '', - 'object_messages.savedGifs_param_gifs_type_Vector t' => '', - 'object_inputBotInlineMessageMediaAuto' => '', - 'object_inputBotInlineMessageMediaAuto_param_message_type_string' => '', - 'object_inputBotInlineMessageMediaAuto_param_entities_type_Vector t' => '', - 'object_inputBotInlineMessageMediaAuto_param_reply_markup_type_ReplyMarkup' => '', - 'object_inputBotInlineMessageText' => '', - 'object_inputBotInlineMessageText_param_no_webpage_type_true' => '', - 'object_inputBotInlineMessageText_param_message_type_string' => '', - 'object_inputBotInlineMessageText_param_entities_type_Vector t' => '', - 'object_inputBotInlineMessageText_param_reply_markup_type_ReplyMarkup' => '', - 'object_inputBotInlineMessageMediaGeo' => '', - 'object_inputBotInlineMessageMediaGeo_param_geo_point_type_InputGeoPoint' => '', - 'object_inputBotInlineMessageMediaGeo_param_period_type_int' => '', - 'object_inputBotInlineMessageMediaGeo_param_reply_markup_type_ReplyMarkup' => '', - 'object_inputBotInlineMessageMediaVenue' => '', - 'object_inputBotInlineMessageMediaVenue_param_geo_point_type_InputGeoPoint' => '', - 'object_inputBotInlineMessageMediaVenue_param_title_type_string' => '', - 'object_inputBotInlineMessageMediaVenue_param_address_type_string' => '', - 'object_inputBotInlineMessageMediaVenue_param_provider_type_string' => '', - 'object_inputBotInlineMessageMediaVenue_param_venue_id_type_string' => '', - 'object_inputBotInlineMessageMediaVenue_param_reply_markup_type_ReplyMarkup' => '', - 'object_inputBotInlineMessageMediaContact' => '', - 'object_inputBotInlineMessageMediaContact_param_phone_number_type_string' => '', - 'object_inputBotInlineMessageMediaContact_param_first_name_type_string' => '', - 'object_inputBotInlineMessageMediaContact_param_last_name_type_string' => '', - 'object_inputBotInlineMessageMediaContact_param_reply_markup_type_ReplyMarkup' => '', - 'object_inputBotInlineMessageGame' => '', - 'object_inputBotInlineMessageGame_param_reply_markup_type_ReplyMarkup' => '', - 'object_inputBotInlineResult' => '', - 'object_inputBotInlineResult_param_id_type_string' => '', - 'object_inputBotInlineResult_param_type_type_string' => '', - 'object_inputBotInlineResult_param_title_type_string' => '', - 'object_inputBotInlineResult_param_description_type_string' => '', - 'object_inputBotInlineResult_param_url_type_string' => '', - 'object_inputBotInlineResult_param_thumb_url_type_string' => '', - 'object_inputBotInlineResult_param_content_url_type_string' => '', - 'object_inputBotInlineResult_param_content_type_type_string' => '', - 'object_inputBotInlineResult_param_w_type_int' => '', - 'object_inputBotInlineResult_param_h_type_int' => '', - 'object_inputBotInlineResult_param_duration_type_int' => '', - 'object_inputBotInlineResult_param_send_message_type_InputBotInlineMessage' => '', - 'object_inputBotInlineResultPhoto' => '', - 'object_inputBotInlineResultPhoto_param_id_type_string' => '', - 'object_inputBotInlineResultPhoto_param_type_type_string' => '', - 'object_inputBotInlineResultPhoto_param_photo_type_InputPhoto' => '', - 'object_inputBotInlineResultPhoto_param_send_message_type_InputBotInlineMessage' => '', - 'object_inputBotInlineResultDocument' => '', - 'object_inputBotInlineResultDocument_param_id_type_string' => '', - 'object_inputBotInlineResultDocument_param_type_type_string' => '', - 'object_inputBotInlineResultDocument_param_title_type_string' => '', - 'object_inputBotInlineResultDocument_param_description_type_string' => '', - 'object_inputBotInlineResultDocument_param_document_type_InputDocument' => '', - 'object_inputBotInlineResultDocument_param_send_message_type_InputBotInlineMessage' => '', - 'object_inputBotInlineResultGame' => '', - 'object_inputBotInlineResultGame_param_id_type_string' => '', - 'object_inputBotInlineResultGame_param_short_name_type_string' => '', - 'object_inputBotInlineResultGame_param_send_message_type_InputBotInlineMessage' => '', - 'object_botInlineMessageMediaAuto' => '', - 'object_botInlineMessageMediaAuto_param_message_type_string' => '', - 'object_botInlineMessageMediaAuto_param_entities_type_Vector t' => '', - 'object_botInlineMessageMediaAuto_param_reply_markup_type_ReplyMarkup' => '', - 'object_botInlineMessageText' => '', - 'object_botInlineMessageText_param_no_webpage_type_true' => '', - 'object_botInlineMessageText_param_message_type_string' => '', - 'object_botInlineMessageText_param_entities_type_Vector t' => '', - 'object_botInlineMessageText_param_reply_markup_type_ReplyMarkup' => '', - 'object_botInlineMessageMediaGeo' => '', - 'object_botInlineMessageMediaGeo_param_geo_type_GeoPoint' => '', - 'object_botInlineMessageMediaGeo_param_period_type_int' => '', - 'object_botInlineMessageMediaGeo_param_reply_markup_type_ReplyMarkup' => '', - 'object_botInlineMessageMediaVenue' => '', - 'object_botInlineMessageMediaVenue_param_geo_type_GeoPoint' => '', - 'object_botInlineMessageMediaVenue_param_title_type_string' => '', - 'object_botInlineMessageMediaVenue_param_address_type_string' => '', - 'object_botInlineMessageMediaVenue_param_provider_type_string' => '', - 'object_botInlineMessageMediaVenue_param_venue_id_type_string' => '', - 'object_botInlineMessageMediaVenue_param_reply_markup_type_ReplyMarkup' => '', - 'object_botInlineMessageMediaContact' => '', - 'object_botInlineMessageMediaContact_param_phone_number_type_string' => '', - 'object_botInlineMessageMediaContact_param_first_name_type_string' => '', - 'object_botInlineMessageMediaContact_param_last_name_type_string' => '', - 'object_botInlineMessageMediaContact_param_reply_markup_type_ReplyMarkup' => '', - 'object_botInlineResult' => '', - 'object_botInlineResult_param_id_type_string' => '', - 'object_botInlineResult_param_type_type_string' => '', - 'object_botInlineResult_param_title_type_string' => '', - 'object_botInlineResult_param_description_type_string' => '', - 'object_botInlineResult_param_url_type_string' => '', - 'object_botInlineResult_param_thumb_url_type_string' => '', - 'object_botInlineResult_param_content_url_type_string' => '', - 'object_botInlineResult_param_content_type_type_string' => '', - 'object_botInlineResult_param_w_type_int' => '', - 'object_botInlineResult_param_h_type_int' => '', - 'object_botInlineResult_param_duration_type_int' => '', - 'object_botInlineResult_param_send_message_type_BotInlineMessage' => '', - 'object_botInlineMediaResult' => '', - 'object_botInlineMediaResult_param_id_type_string' => '', - 'object_botInlineMediaResult_param_type_type_string' => '', - 'object_botInlineMediaResult_param_photo_type_Photo' => '', - 'object_botInlineMediaResult_param_document_type_Document' => '', - 'object_botInlineMediaResult_param_title_type_string' => '', - 'object_botInlineMediaResult_param_description_type_string' => '', - 'object_botInlineMediaResult_param_send_message_type_BotInlineMessage' => '', - 'object_messages.botResults' => '', - 'object_messages.botResults_param_gallery_type_true' => '', - 'object_messages.botResults_param_query_id_type_long' => '', - 'object_messages.botResults_param_next_offset_type_string' => '', - 'object_messages.botResults_param_switch_pm_type_InlineBotSwitchPM' => '', - 'object_messages.botResults_param_results_type_Vector t' => '', - 'object_messages.botResults_param_cache_time_type_int' => '', - 'object_messages.botResults_param_users_type_Vector t' => '', - 'object_exportedMessageLink' => '', - 'object_exportedMessageLink_param_link_type_string' => '', - 'object_exportedMessageLink_param_html_type_string' => '', - 'object_messageFwdHeader' => '', - 'object_messageFwdHeader_param_from_id_type_int' => '', - 'object_messageFwdHeader_param_date_type_int' => '', - 'object_messageFwdHeader_param_channel_id_type_int' => '', - 'object_messageFwdHeader_param_channel_post_type_int' => '', - 'object_messageFwdHeader_param_post_author_type_string' => '', - 'object_messageFwdHeader_param_saved_from_peer_type_Peer' => '', - 'object_messageFwdHeader_param_saved_from_msg_id_type_int' => '', - 'object_auth.codeTypeSms' => '', - 'object_auth.codeTypeCall' => '', - 'object_auth.codeTypeFlashCall' => '', - 'object_auth.sentCodeTypeApp' => '', - 'object_auth.sentCodeTypeApp_param_length_type_int' => '', - 'object_auth.sentCodeTypeSms' => '', - 'object_auth.sentCodeTypeSms_param_length_type_int' => '', - 'object_auth.sentCodeTypeCall' => '', - 'object_auth.sentCodeTypeCall_param_length_type_int' => '', - 'object_auth.sentCodeTypeFlashCall' => '', - 'object_auth.sentCodeTypeFlashCall_param_pattern_type_string' => '', - 'object_messages.botCallbackAnswer' => '', - 'object_messages.botCallbackAnswer_param_alert_type_true' => '', - 'object_messages.botCallbackAnswer_param_has_url_type_true' => '', - 'object_messages.botCallbackAnswer_param_native_ui_type_true' => '', - 'object_messages.botCallbackAnswer_param_message_type_string' => '', - 'object_messages.botCallbackAnswer_param_url_type_string' => '', - 'object_messages.botCallbackAnswer_param_cache_time_type_int' => '', - 'object_messages.messageEditData' => '', - 'object_messages.messageEditData_param_caption_type_true' => '', - 'object_inputBotInlineMessageID' => '', - 'object_inputBotInlineMessageID_param_dc_id_type_int' => '', - 'object_inputBotInlineMessageID_param_id_type_long' => '', - 'object_inputBotInlineMessageID_param_access_hash_type_long' => '', - 'object_inlineBotSwitchPM' => '', - 'object_inlineBotSwitchPM_param_text_type_string' => '', - 'object_inlineBotSwitchPM_param_start_param_type_string' => '', - 'object_messages.peerDialogs' => '', - 'object_messages.peerDialogs_param_dialogs_type_Vector t' => '', - 'object_messages.peerDialogs_param_messages_type_Vector t' => '', - 'object_messages.peerDialogs_param_chats_type_Vector t' => '', - 'object_messages.peerDialogs_param_users_type_Vector t' => '', - 'object_messages.peerDialogs_param_state_type_updates.State' => '', - 'object_topPeer' => '', - 'object_topPeer_param_peer_type_Peer' => '', - 'object_topPeer_param_rating_type_double' => '', - 'object_topPeerCategoryBotsPM' => '', - 'object_topPeerCategoryBotsInline' => '', - 'object_topPeerCategoryCorrespondents' => '', - 'object_topPeerCategoryGroups' => '', - 'object_topPeerCategoryChannels' => '', - 'object_topPeerCategoryPhoneCalls' => '', - 'object_topPeerCategoryPeers' => '', - 'object_topPeerCategoryPeers_param_category_type_TopPeerCategory' => '', - 'object_topPeerCategoryPeers_param_count_type_int' => '', - 'object_topPeerCategoryPeers_param_peers_type_Vector t' => '', - 'object_contacts.topPeersNotModified' => '', - 'object_contacts.topPeers' => '', - 'object_contacts.topPeers_param_categories_type_Vector t' => '', - 'object_contacts.topPeers_param_chats_type_Vector t' => '', - 'object_contacts.topPeers_param_users_type_Vector t' => '', - 'object_draftMessageEmpty' => '', - 'object_draftMessage' => '', - 'object_draftMessage_param_no_webpage_type_true' => '', - 'object_draftMessage_param_reply_to_msg_id_type_int' => '', - 'object_draftMessage_param_message_type_string' => '', - 'object_draftMessage_param_entities_type_Vector t' => '', - 'object_draftMessage_param_date_type_int' => '', - 'object_messages.featuredStickersNotModified' => '', - 'object_messages.featuredStickers' => '', - 'object_messages.featuredStickers_param_hash_type_int' => '', - 'object_messages.featuredStickers_param_sets_type_Vector t' => '', - 'object_messages.featuredStickers_param_unread_type_Vector t' => '', - 'object_messages.recentStickersNotModified' => '', - 'object_messages.recentStickers' => '', - 'object_messages.recentStickers_param_hash_type_int' => '', - 'object_messages.recentStickers_param_stickers_type_Vector t' => '', - 'object_messages.archivedStickers' => '', - 'object_messages.archivedStickers_param_count_type_int' => '', - 'object_messages.archivedStickers_param_sets_type_Vector t' => '', - 'object_messages.stickerSetInstallResultSuccess' => '', - 'object_messages.stickerSetInstallResultArchive' => '', - 'object_messages.stickerSetInstallResultArchive_param_sets_type_Vector t' => '', - 'object_stickerSetCovered' => '', - 'object_stickerSetCovered_param_set_type_StickerSet' => '', - 'object_stickerSetCovered_param_cover_type_Document' => '', - 'object_stickerSetMultiCovered' => '', - 'object_stickerSetMultiCovered_param_set_type_StickerSet' => '', - 'object_stickerSetMultiCovered_param_covers_type_Vector t' => '', - 'object_maskCoords' => '', - 'object_maskCoords_param_n_type_int' => '', - 'object_maskCoords_param_x_type_double' => '', - 'object_maskCoords_param_y_type_double' => '', - 'object_maskCoords_param_zoom_type_double' => '', - 'object_inputStickeredMediaPhoto' => '', - 'object_inputStickeredMediaPhoto_param_id_type_InputPhoto' => '', - 'object_inputStickeredMediaDocument' => '', - 'object_inputStickeredMediaDocument_param_id_type_InputDocument' => '', - 'object_game' => '', - 'object_game_param_id_type_long' => '', - 'object_game_param_access_hash_type_long' => '', - 'object_game_param_short_name_type_string' => '', - 'object_game_param_title_type_string' => '', - 'object_game_param_description_type_string' => '', - 'object_game_param_photo_type_Photo' => '', - 'object_game_param_document_type_Document' => '', - 'object_inputGameID' => '', - 'object_inputGameID_param_id_type_long' => '', - 'object_inputGameID_param_access_hash_type_long' => '', - 'object_inputGameShortName' => '', - 'object_inputGameShortName_param_bot_id_type_InputUser' => '', - 'object_inputGameShortName_param_short_name_type_string' => '', - 'object_highScore' => '', - 'object_highScore_param_pos_type_int' => '', - 'object_highScore_param_user_id_type_int' => '', - 'object_highScore_param_score_type_int' => '', - 'object_messages.highScores' => '', - 'object_messages.highScores_param_scores_type_Vector t' => '', - 'object_messages.highScores_param_users_type_Vector t' => '', - 'object_textEmpty' => '', - 'object_textPlain' => '', - 'object_textPlain_param_text_type_string' => '', - 'object_textBold' => '', - 'object_textBold_param_text_type_RichText' => '', - 'object_textItalic' => '', - 'object_textItalic_param_text_type_RichText' => '', - 'object_textUnderline' => '', - 'object_textUnderline_param_text_type_RichText' => '', - 'object_textStrike' => '', - 'object_textStrike_param_text_type_RichText' => '', - 'object_textFixed' => '', - 'object_textFixed_param_text_type_RichText' => '', - 'object_textUrl' => '', - 'object_textUrl_param_text_type_RichText' => '', - 'object_textUrl_param_url_type_string' => '', - 'object_textUrl_param_webpage_id_type_long' => '', - 'object_textEmail' => '', - 'object_textEmail_param_text_type_RichText' => '', - 'object_textEmail_param_email_type_string' => '', - 'object_textConcat' => '', - 'object_textConcat_param_texts_type_Vector t' => '', - 'object_pageBlockUnsupported' => '', - 'object_pageBlockTitle' => '', - 'object_pageBlockTitle_param_text_type_RichText' => '', - 'object_pageBlockSubtitle' => '', - 'object_pageBlockSubtitle_param_text_type_RichText' => '', - 'object_pageBlockAuthorDate' => '', - 'object_pageBlockAuthorDate_param_author_type_RichText' => '', - 'object_pageBlockAuthorDate_param_published_date_type_int' => '', - 'object_pageBlockHeader' => '', - 'object_pageBlockHeader_param_text_type_RichText' => '', - 'object_pageBlockSubheader' => '', - 'object_pageBlockSubheader_param_text_type_RichText' => '', - 'object_pageBlockFooter' => '', - 'object_pageBlockFooter_param_text_type_RichText' => '', - 'object_pageBlockList' => '', - 'object_pageBlockList_param_ordered_type_Bool' => '', - 'object_pageBlockList_param_items_type_Vector t' => '', - 'object_pageBlockBlockquote' => '', - 'object_pageBlockBlockquote_param_text_type_RichText' => '', - 'object_pageBlockBlockquote_param_caption_type_RichText' => '', - 'object_pageBlockPullquote' => '', - 'object_pageBlockPullquote_param_text_type_RichText' => '', - 'object_pageBlockPullquote_param_caption_type_RichText' => '', - 'object_pageBlockPhoto' => '', - 'object_pageBlockPhoto_param_photo_id_type_long' => '', - 'object_pageBlockPhoto_param_caption_type_RichText' => '', - 'object_pageBlockVideo' => '', - 'object_pageBlockVideo_param_autoplay_type_true' => '', - 'object_pageBlockVideo_param_loop_type_true' => '', - 'object_pageBlockVideo_param_video_id_type_long' => '', - 'object_pageBlockVideo_param_caption_type_RichText' => '', - 'object_pageBlockEmbed' => '', - 'object_pageBlockEmbed_param_full_width_type_true' => '', - 'object_pageBlockEmbed_param_allow_scrolling_type_true' => '', - 'object_pageBlockEmbed_param_url_type_string' => '', - 'object_pageBlockEmbed_param_html_type_string' => '', - 'object_pageBlockEmbed_param_poster_photo_id_type_long' => '', - 'object_pageBlockEmbed_param_w_type_int' => '', - 'object_pageBlockEmbed_param_h_type_int' => '', - 'object_pageBlockEmbed_param_caption_type_RichText' => '', - 'object_pageBlockEmbedPost' => '', - 'object_pageBlockEmbedPost_param_url_type_string' => '', - 'object_pageBlockEmbedPost_param_webpage_id_type_long' => '', - 'object_pageBlockEmbedPost_param_author_photo_id_type_long' => '', - 'object_pageBlockEmbedPost_param_author_type_string' => '', - 'object_pageBlockEmbedPost_param_date_type_int' => '', - 'object_pageBlockEmbedPost_param_blocks_type_Vector t' => '', - 'object_pageBlockEmbedPost_param_caption_type_RichText' => '', - 'object_pageBlockCollage' => '', - 'object_pageBlockCollage_param_items_type_Vector t' => '', - 'object_pageBlockCollage_param_caption_type_RichText' => '', - 'object_pageBlockSlideshow' => '', - 'object_pageBlockSlideshow_param_items_type_Vector t' => '', - 'object_pageBlockSlideshow_param_caption_type_RichText' => '', - 'object_pageBlockChannel' => '', - 'object_pageBlockChannel_param_channel_type_Chat' => '', - 'object_pageBlockAudio' => '', - 'object_pageBlockAudio_param_audio_id_type_long' => '', - 'object_pageBlockAudio_param_caption_type_RichText' => '', - 'object_pagePart' => '', - 'object_pagePart_param_blocks_type_Vector t' => '', - 'object_pagePart_param_photos_type_Vector t' => '', - 'object_pagePart_param_documents_type_Vector t' => '', - 'object_pageFull' => '', - 'object_pageFull_param_blocks_type_Vector t' => '', - 'object_pageFull_param_photos_type_Vector t' => '', - 'object_pageFull_param_documents_type_Vector t' => '', - 'object_phoneCallDiscardReasonMissed' => '', - 'object_phoneCallDiscardReasonDisconnect' => '', - 'object_phoneCallDiscardReasonHangup' => '', - 'object_phoneCallDiscardReasonBusy' => '', - 'object_dataJSON' => '', - 'object_dataJSON_param_data_type_string' => '', - 'object_labeledPrice' => '', - 'object_labeledPrice_param_label_type_string' => '', - 'object_labeledPrice_param_amount_type_long' => '', - 'object_invoice' => '', - 'object_invoice_param_test_type_true' => '', - 'object_invoice_param_name_requested_type_true' => '', - 'object_invoice_param_phone_requested_type_true' => '', - 'object_invoice_param_email_requested_type_true' => '', - 'object_invoice_param_shipping_address_requested_type_true' => '', - 'object_invoice_param_flexible_type_true' => '', - 'object_invoice_param_phone_to_provider_type_true' => '', - 'object_invoice_param_email_to_provider_type_true' => '', - 'object_invoice_param_currency_type_string' => '', - 'object_invoice_param_prices_type_Vector t' => '', - 'object_paymentCharge' => '', - 'object_paymentCharge_param_id_type_string' => '', - 'object_paymentCharge_param_provider_charge_id_type_string' => '', - 'object_postAddress' => '', - 'object_postAddress_param_street_line1_type_string' => '', - 'object_postAddress_param_street_line2_type_string' => '', - 'object_postAddress_param_city_type_string' => '', - 'object_postAddress_param_state_type_string' => '', - 'object_postAddress_param_country_iso2_type_string' => '', - 'object_postAddress_param_post_code_type_string' => '', - 'object_paymentRequestedInfo' => '', - 'object_paymentRequestedInfo_param_name_type_string' => '', - 'object_paymentRequestedInfo_param_phone_type_string' => '', - 'object_paymentRequestedInfo_param_email_type_string' => '', - 'object_paymentRequestedInfo_param_shipping_address_type_PostAddress' => '', - 'object_paymentSavedCredentialsCard' => '', - 'object_paymentSavedCredentialsCard_param_id_type_string' => '', - 'object_paymentSavedCredentialsCard_param_title_type_string' => '', - 'object_webDocument' => '', - 'object_webDocument_param_url_type_string' => '', - 'object_webDocument_param_access_hash_type_long' => '', - 'object_webDocument_param_size_type_int' => '', - 'object_webDocument_param_mime_type_type_string' => '', - 'object_webDocument_param_attributes_type_Vector t' => '', - 'object_webDocument_param_dc_id_type_int' => '', - 'object_inputWebDocument' => '', - 'object_inputWebDocument_param_url_type_string' => '', - 'object_inputWebDocument_param_size_type_int' => '', - 'object_inputWebDocument_param_mime_type_type_string' => '', - 'object_inputWebDocument_param_attributes_type_Vector t' => '', - 'object_inputWebFileLocation' => '', - 'object_inputWebFileLocation_param_url_type_string' => '', - 'object_inputWebFileLocation_param_access_hash_type_long' => '', - 'object_upload.webFile' => '', - 'object_upload.webFile_param_size_type_int' => '', - 'object_upload.webFile_param_mime_type_type_string' => '', - 'object_upload.webFile_param_file_type_type_storage.FileType' => '', - 'object_upload.webFile_param_mtime_type_int' => '', - 'object_upload.webFile_param_bytes_type_bytes' => '', - 'object_payments.paymentForm' => '', - 'object_payments.paymentForm_param_can_save_credentials_type_true' => '', - 'object_payments.paymentForm_param_password_missing_type_true' => '', - 'object_payments.paymentForm_param_bot_id_type_int' => '', - 'object_payments.paymentForm_param_invoice_type_Invoice' => '', - 'object_payments.paymentForm_param_provider_id_type_int' => '', - 'object_payments.paymentForm_param_url_type_string' => '', - 'object_payments.paymentForm_param_native_provider_type_string' => '', - 'object_payments.paymentForm_param_native_params_type_DataJSON' => '', - 'object_payments.paymentForm_param_saved_info_type_PaymentRequestedInfo' => '', - 'object_payments.paymentForm_param_saved_credentials_type_PaymentSavedCredentials' => '', - 'object_payments.paymentForm_param_users_type_Vector t' => '', - 'object_payments.validatedRequestedInfo' => '', - 'object_payments.validatedRequestedInfo_param_id_type_string' => '', - 'object_payments.validatedRequestedInfo_param_shipping_options_type_Vector t' => '', - 'object_payments.paymentResult' => '', - 'object_payments.paymentResult_param_updates_type_Updates' => '', - 'object_payments.paymentVerficationNeeded' => '', - 'object_payments.paymentVerficationNeeded_param_url_type_string' => '', - 'object_payments.paymentReceipt' => '', - 'object_payments.paymentReceipt_param_date_type_int' => '', - 'object_payments.paymentReceipt_param_bot_id_type_int' => '', - 'object_payments.paymentReceipt_param_invoice_type_Invoice' => '', - 'object_payments.paymentReceipt_param_provider_id_type_int' => '', - 'object_payments.paymentReceipt_param_info_type_PaymentRequestedInfo' => '', - 'object_payments.paymentReceipt_param_shipping_type_ShippingOption' => '', - 'object_payments.paymentReceipt_param_currency_type_string' => '', - 'object_payments.paymentReceipt_param_total_amount_type_long' => '', - 'object_payments.paymentReceipt_param_credentials_title_type_string' => '', - 'object_payments.paymentReceipt_param_users_type_Vector t' => '', - 'object_payments.savedInfo' => '', - 'object_payments.savedInfo_param_has_saved_credentials_type_true' => '', - 'object_payments.savedInfo_param_saved_info_type_PaymentRequestedInfo' => '', - 'object_inputPaymentCredentialsSaved' => '', - 'object_inputPaymentCredentialsSaved_param_id_type_string' => '', - 'object_inputPaymentCredentialsSaved_param_tmp_password_type_bytes' => '', - 'object_inputPaymentCredentials' => '', - 'object_inputPaymentCredentials_param_save_type_true' => '', - 'object_inputPaymentCredentials_param_data_type_DataJSON' => '', - 'object_inputPaymentCredentialsApplePay' => '', - 'object_inputPaymentCredentialsApplePay_param_payment_data_type_DataJSON' => '', - 'object_inputPaymentCredentialsAndroidPay' => '', - 'object_inputPaymentCredentialsAndroidPay_param_payment_token_type_DataJSON' => '', - 'object_inputPaymentCredentialsAndroidPay_param_google_transaction_id_type_string' => '', - 'object_account.tmpPassword' => '', - 'object_account.tmpPassword_param_tmp_password_type_bytes' => '', - 'object_account.tmpPassword_param_valid_until_type_int' => '', - 'object_shippingOption' => '', - 'object_shippingOption_param_id_type_string' => '', - 'object_shippingOption_param_title_type_string' => '', - 'object_shippingOption_param_prices_type_Vector t' => '', - 'object_inputStickerSetItem' => '', - 'object_inputStickerSetItem_param_document_type_InputDocument' => '', - 'object_inputStickerSetItem_param_emoji_type_string' => '', - 'object_inputStickerSetItem_param_mask_coords_type_MaskCoords' => '', - 'object_inputPhoneCall' => '', - 'object_inputPhoneCall_param_id_type_long' => '', - 'object_inputPhoneCall_param_access_hash_type_long' => '', - 'object_phoneCallEmpty' => '', - 'object_phoneCallEmpty_param_id_type_long' => '', - 'object_phoneCallWaiting' => '', - 'object_phoneCallWaiting_param_id_type_long' => '', - 'object_phoneCallWaiting_param_access_hash_type_long' => '', - 'object_phoneCallWaiting_param_date_type_int' => '', - 'object_phoneCallWaiting_param_admin_id_type_int' => '', - 'object_phoneCallWaiting_param_participant_id_type_int' => '', - 'object_phoneCallWaiting_param_protocol_type_PhoneCallProtocol' => '', - 'object_phoneCallWaiting_param_receive_date_type_int' => '', - 'object_phoneCallRequested' => '', - 'object_phoneCallRequested_param_id_type_long' => '', - 'object_phoneCallRequested_param_access_hash_type_long' => '', - 'object_phoneCallRequested_param_date_type_int' => '', - 'object_phoneCallRequested_param_admin_id_type_int' => '', - 'object_phoneCallRequested_param_participant_id_type_int' => '', - 'object_phoneCallRequested_param_g_a_hash_type_bytes' => '', - 'object_phoneCallRequested_param_protocol_type_PhoneCallProtocol' => '', - 'object_phoneCallAccepted' => '', - 'object_phoneCallAccepted_param_id_type_long' => '', - 'object_phoneCallAccepted_param_access_hash_type_long' => '', - 'object_phoneCallAccepted_param_date_type_int' => '', - 'object_phoneCallAccepted_param_admin_id_type_int' => '', - 'object_phoneCallAccepted_param_participant_id_type_int' => '', - 'object_phoneCallAccepted_param_g_b_type_bytes' => '', - 'object_phoneCallAccepted_param_protocol_type_PhoneCallProtocol' => '', - 'object_phoneCall' => '', - 'object_phoneCall_param_id_type_long' => '', - 'object_phoneCall_param_access_hash_type_long' => '', - 'object_phoneCall_param_date_type_int' => '', - 'object_phoneCall_param_admin_id_type_int' => '', - 'object_phoneCall_param_participant_id_type_int' => '', - 'object_phoneCall_param_g_a_or_b_type_bytes' => '', - 'object_phoneCall_param_key_fingerprint_type_long' => '', - 'object_phoneCall_param_protocol_type_PhoneCallProtocol' => '', - 'object_phoneCall_param_connection_type_PhoneConnection' => '', - 'object_phoneCall_param_alternative_connections_type_Vector t' => '', - 'object_phoneCall_param_start_date_type_int' => '', - 'object_phoneCallDiscarded' => '', - 'object_phoneCallDiscarded_param_need_rating_type_true' => '', - 'object_phoneCallDiscarded_param_need_debug_type_true' => '', - 'object_phoneCallDiscarded_param_id_type_long' => '', - 'object_phoneCallDiscarded_param_reason_type_PhoneCallDiscardReason' => '', - 'object_phoneCallDiscarded_param_duration_type_int' => '', - 'object_phoneConnection' => '', - 'object_phoneConnection_param_id_type_long' => '', - 'object_phoneConnection_param_ip_type_string' => '', - 'object_phoneConnection_param_ipv6_type_string' => '', - 'object_phoneConnection_param_port_type_int' => '', - 'object_phoneConnection_param_peer_tag_type_bytes' => '', - 'object_phoneCallProtocol' => '', - 'object_phoneCallProtocol_param_udp_p2p_type_true' => '', - 'object_phoneCallProtocol_param_udp_reflector_type_true' => '', - 'object_phoneCallProtocol_param_min_layer_type_int' => '', - 'object_phoneCallProtocol_param_max_layer_type_int' => '', - 'object_phone.phoneCall' => '', - 'object_phone.phoneCall_param_phone_call_type_PhoneCall' => '', - 'object_phone.phoneCall_param_users_type_Vector t' => '', - 'object_upload.cdnFileReuploadNeeded' => '', - 'object_upload.cdnFileReuploadNeeded_param_request_token_type_bytes' => '', - 'object_upload.cdnFile' => '', - 'object_upload.cdnFile_param_bytes_type_bytes' => '', - 'object_cdnPublicKey' => '', - 'object_cdnPublicKey_param_dc_id_type_int' => '', - 'object_cdnPublicKey_param_public_key_type_string' => '', - 'object_cdnConfig' => '', - 'object_cdnConfig_param_public_keys_type_Vector t' => '', - 'object_langPackString' => '', - 'object_langPackString_param_key_type_string' => '', - 'object_langPackString_param_value_type_string' => '', - 'object_langPackStringPluralized' => '', - 'object_langPackStringPluralized_param_key_type_string' => '', - 'object_langPackStringPluralized_param_zero_value_type_string' => '', - 'object_langPackStringPluralized_param_one_value_type_string' => '', - 'object_langPackStringPluralized_param_two_value_type_string' => '', - 'object_langPackStringPluralized_param_few_value_type_string' => '', - 'object_langPackStringPluralized_param_many_value_type_string' => '', - 'object_langPackStringPluralized_param_other_value_type_string' => '', - 'object_langPackStringDeleted' => '', - 'object_langPackStringDeleted_param_key_type_string' => '', - 'object_langPackDifference' => '', - 'object_langPackDifference_param_lang_code_type_string' => '', - 'object_langPackDifference_param_from_version_type_int' => '', - 'object_langPackDifference_param_version_type_int' => '', - 'object_langPackDifference_param_strings_type_Vector t' => '', - 'object_langPackLanguage' => '', - 'object_langPackLanguage_param_name_type_string' => '', - 'object_langPackLanguage_param_native_name_type_string' => '', - 'object_langPackLanguage_param_lang_code_type_string' => '', - 'object_channelAdminRights' => '', - 'object_channelAdminRights_param_change_info_type_true' => '', - 'object_channelAdminRights_param_post_messages_type_true' => '', - 'object_channelAdminRights_param_edit_messages_type_true' => '', - 'object_channelAdminRights_param_delete_messages_type_true' => '', - 'object_channelAdminRights_param_ban_users_type_true' => '', - 'object_channelAdminRights_param_invite_users_type_true' => '', - 'object_channelAdminRights_param_invite_link_type_true' => '', - 'object_channelAdminRights_param_pin_messages_type_true' => '', - 'object_channelAdminRights_param_add_admins_type_true' => '', - 'object_channelBannedRights' => '', - 'object_channelBannedRights_param_view_messages_type_true' => '', - 'object_channelBannedRights_param_send_messages_type_true' => '', - 'object_channelBannedRights_param_send_media_type_true' => '', - 'object_channelBannedRights_param_send_stickers_type_true' => '', - 'object_channelBannedRights_param_send_gifs_type_true' => '', - 'object_channelBannedRights_param_send_games_type_true' => '', - 'object_channelBannedRights_param_send_inline_type_true' => '', - 'object_channelBannedRights_param_embed_links_type_true' => '', - 'object_channelBannedRights_param_until_date_type_int' => '', - 'object_channelAdminLogEventActionChangeTitle' => '', - 'object_channelAdminLogEventActionChangeTitle_param_prev_value_type_string' => '', - 'object_channelAdminLogEventActionChangeTitle_param_new_value_type_string' => '', - 'object_channelAdminLogEventActionChangeAbout' => '', - 'object_channelAdminLogEventActionChangeAbout_param_prev_value_type_string' => '', - 'object_channelAdminLogEventActionChangeAbout_param_new_value_type_string' => '', - 'object_channelAdminLogEventActionChangeUsername' => '', - 'object_channelAdminLogEventActionChangeUsername_param_prev_value_type_string' => '', - 'object_channelAdminLogEventActionChangeUsername_param_new_value_type_string' => '', - 'object_channelAdminLogEventActionChangePhoto' => '', - 'object_channelAdminLogEventActionChangePhoto_param_prev_photo_type_ChatPhoto' => '', - 'object_channelAdminLogEventActionChangePhoto_param_new_photo_type_ChatPhoto' => '', - 'object_channelAdminLogEventActionToggleInvites' => '', - 'object_channelAdminLogEventActionToggleInvites_param_new_value_type_Bool' => '', - 'object_channelAdminLogEventActionToggleSignatures' => '', - 'object_channelAdminLogEventActionToggleSignatures_param_new_value_type_Bool' => '', - 'object_channelAdminLogEventActionUpdatePinned' => '', - 'object_channelAdminLogEventActionUpdatePinned_param_message_type_Message' => '', - 'object_channelAdminLogEventActionEditMessage' => '', - 'object_channelAdminLogEventActionEditMessage_param_prev_message_type_Message' => '', - 'object_channelAdminLogEventActionEditMessage_param_new_message_type_Message' => '', - 'object_channelAdminLogEventActionDeleteMessage' => '', - 'object_channelAdminLogEventActionDeleteMessage_param_message_type_Message' => '', - 'object_channelAdminLogEventActionParticipantJoin' => '', - 'object_channelAdminLogEventActionParticipantLeave' => '', - 'object_channelAdminLogEventActionParticipantInvite' => '', - 'object_channelAdminLogEventActionParticipantInvite_param_participant_type_ChannelParticipant' => '', - 'object_channelAdminLogEventActionParticipantToggleBan' => '', - 'object_channelAdminLogEventActionParticipantToggleBan_param_prev_participant_type_ChannelParticipant' => '', - 'object_channelAdminLogEventActionParticipantToggleBan_param_new_participant_type_ChannelParticipant' => '', - 'object_channelAdminLogEventActionParticipantToggleAdmin' => '', - 'object_channelAdminLogEventActionParticipantToggleAdmin_param_prev_participant_type_ChannelParticipant' => '', - 'object_channelAdminLogEventActionParticipantToggleAdmin_param_new_participant_type_ChannelParticipant' => '', - 'object_channelAdminLogEventActionChangeStickerSet' => '', - 'object_channelAdminLogEventActionChangeStickerSet_param_prev_stickerset_type_InputStickerSet' => '', - 'object_channelAdminLogEventActionChangeStickerSet_param_new_stickerset_type_InputStickerSet' => '', - 'object_channelAdminLogEventActionTogglePreHistoryHidden' => '', - 'object_channelAdminLogEventActionTogglePreHistoryHidden_param_new_value_type_Bool' => '', - 'object_channelAdminLogEvent' => '', - 'object_channelAdminLogEvent_param_id_type_long' => '', - 'object_channelAdminLogEvent_param_date_type_int' => '', - 'object_channelAdminLogEvent_param_user_id_type_int' => '', - 'object_channelAdminLogEvent_param_action_type_ChannelAdminLogEventAction' => '', - 'object_channels.adminLogResults' => '', - 'object_channels.adminLogResults_param_events_type_Vector t' => '', - 'object_channels.adminLogResults_param_chats_type_Vector t' => '', - 'object_channels.adminLogResults_param_users_type_Vector t' => '', - 'object_channelAdminLogEventsFilter' => '', - 'object_channelAdminLogEventsFilter_param_join_type_true' => '', - 'object_channelAdminLogEventsFilter_param_leave_type_true' => '', - 'object_channelAdminLogEventsFilter_param_invite_type_true' => '', - 'object_channelAdminLogEventsFilter_param_ban_type_true' => '', - 'object_channelAdminLogEventsFilter_param_unban_type_true' => '', - 'object_channelAdminLogEventsFilter_param_kick_type_true' => '', - 'object_channelAdminLogEventsFilter_param_unkick_type_true' => '', - 'object_channelAdminLogEventsFilter_param_promote_type_true' => '', - 'object_channelAdminLogEventsFilter_param_demote_type_true' => '', - 'object_channelAdminLogEventsFilter_param_info_type_true' => '', - 'object_channelAdminLogEventsFilter_param_settings_type_true' => '', - 'object_channelAdminLogEventsFilter_param_pinned_type_true' => '', - 'object_channelAdminLogEventsFilter_param_edit_type_true' => '', - 'object_channelAdminLogEventsFilter_param_delete_type_true' => '', - 'object_popularContact' => '', - 'object_popularContact_param_client_id_type_long' => '', - 'object_popularContact_param_importers_type_int' => '', - 'object_cdnFileHash' => '', - 'object_cdnFileHash_param_offset_type_int' => '', - 'object_cdnFileHash_param_limit_type_int' => '', - 'object_cdnFileHash_param_hash_type_bytes' => '', - 'object_messages.favedStickersNotModified' => '', - 'object_messages.favedStickers' => '', - 'object_messages.favedStickers_param_hash_type_int' => '', - 'object_messages.favedStickers_param_packs_type_Vector t' => '', - 'object_messages.favedStickers_param_stickers_type_Vector t' => '', - 'object_recentMeUrlUnknown' => '', - 'object_recentMeUrlUnknown_param_url_type_string' => '', - 'object_recentMeUrlUser' => '', - 'object_recentMeUrlUser_param_url_type_string' => '', - 'object_recentMeUrlUser_param_user_id_type_int' => '', - 'object_recentMeUrlChat' => '', - 'object_recentMeUrlChat_param_url_type_string' => '', - 'object_recentMeUrlChat_param_chat_id_type_int' => '', - 'object_recentMeUrlChatInvite' => '', - 'object_recentMeUrlChatInvite_param_url_type_string' => '', - 'object_recentMeUrlChatInvite_param_chat_invite_type_ChatInvite' => '', - 'object_recentMeUrlStickerSet' => '', - 'object_recentMeUrlStickerSet_param_url_type_string' => '', - 'object_recentMeUrlStickerSet_param_set_type_StickerSetCovered' => '', - 'object_help.recentMeUrls' => '', - 'object_help.recentMeUrls_param_urls_type_Vector t' => '', - 'object_help.recentMeUrls_param_chats_type_Vector t' => '', - 'object_help.recentMeUrls_param_users_type_Vector t' => '', - 'object_inputSingleMedia' => '', - 'object_inputSingleMedia_param_media_type_InputMedia' => '', - 'object_inputSingleMedia_param_message_type_string' => '', - 'object_inputSingleMedia_param_entities_type_Vector t' => '', - 'object_webAuthorization' => '', - 'object_webAuthorization_param_hash_type_long' => '', - 'object_webAuthorization_param_bot_id_type_int' => '', - 'object_webAuthorization_param_domain_type_string' => '', - 'object_webAuthorization_param_browser_type_string' => '', - 'object_webAuthorization_param_platform_type_string' => '', - 'object_webAuthorization_param_date_created_type_int' => '', - 'object_webAuthorization_param_date_active_type_int' => '', - 'object_webAuthorization_param_ip_type_string' => '', - 'object_webAuthorization_param_region_type_string' => '', - 'object_account.webAuthorizations' => '', - 'object_account.webAuthorizations_param_authorizations_type_Vector t' => '', - 'object_account.webAuthorizations_param_users_type_Vector t' => '', - 'object_inputMessageID' => '', - 'object_inputMessageID_param_id_type_int' => '', - 'object_inputMessageReplyTo' => '', - 'object_inputMessageReplyTo_param_id_type_int' => '', - 'object_inputMessagePinned' => '', - 'object_decryptedDataBlock' => '', - 'object_decryptedDataBlock_param_voice_call_id_type_int128' => '', - 'object_decryptedDataBlock_param_in_seq_no_type_int' => '', - 'object_decryptedDataBlock_param_out_seq_no_type_int' => '', - 'object_decryptedDataBlock_param_recent_received_mask_type_int' => '', - 'object_decryptedDataBlock_param_proto_type_int' => '', - 'object_decryptedDataBlock_param_extra_type_string' => '', - 'object_decryptedDataBlock_param_raw_data_type_string' => '', - 'object_simpleDataBlock' => '', - 'object_simpleDataBlock_param_raw_data_type_string' => '', - 'object_decryptedMessage' => '', - 'object_decryptedMessage_param_message_type_string' => '', - 'object_decryptedMessage_param_media_type_DecryptedMessageMedia' => '', - 'object_decryptedMessageService' => '', - 'object_decryptedMessageService_param_action_type_DecryptedMessageAction' => '', - 'object_decryptedMessageMediaEmpty' => '', - 'object_decryptedMessageMediaPhoto' => '', - 'object_decryptedMessageMediaPhoto_param_thumb_type_bytes' => '', - 'object_decryptedMessageMediaPhoto_param_thumb_w_type_int' => '', - 'object_decryptedMessageMediaPhoto_param_thumb_h_type_int' => '', - 'object_decryptedMessageMediaPhoto_param_w_type_int' => '', - 'object_decryptedMessageMediaPhoto_param_h_type_int' => '', - 'object_decryptedMessageMediaPhoto_param_size_type_int' => '', - 'object_decryptedMessageMediaPhoto_param_key_type_bytes' => '', - 'object_decryptedMessageMediaPhoto_param_iv_type_bytes' => '', - 'object_decryptedMessageMediaVideo' => '', - 'object_decryptedMessageMediaVideo_param_thumb_type_bytes' => '', - 'object_decryptedMessageMediaVideo_param_thumb_w_type_int' => '', - 'object_decryptedMessageMediaVideo_param_thumb_h_type_int' => '', - 'object_decryptedMessageMediaVideo_param_duration_type_int' => '', - 'object_decryptedMessageMediaVideo_param_w_type_int' => '', - 'object_decryptedMessageMediaVideo_param_h_type_int' => '', - 'object_decryptedMessageMediaVideo_param_size_type_int' => '', - 'object_decryptedMessageMediaVideo_param_key_type_bytes' => '', - 'object_decryptedMessageMediaVideo_param_iv_type_bytes' => '', - 'object_decryptedMessageMediaGeoPoint' => '', - 'object_decryptedMessageMediaGeoPoint_param_lat_type_double' => '', - 'object_decryptedMessageMediaGeoPoint_param_long_type_double' => '', - 'object_decryptedMessageMediaContact' => '', - 'object_decryptedMessageMediaContact_param_phone_number_type_string' => '', - 'object_decryptedMessageMediaContact_param_first_name_type_string' => '', - 'object_decryptedMessageMediaContact_param_last_name_type_string' => '', - 'object_decryptedMessageMediaContact_param_user_id_type_int' => '', - 'object_decryptedMessageActionSetMessageTTL' => '', - 'object_decryptedMessageActionSetMessageTTL_param_ttl_seconds_type_int' => '', - 'object_decryptedMessageMediaDocument' => '', - 'object_decryptedMessageMediaDocument_param_thumb_type_bytes' => '', - 'object_decryptedMessageMediaDocument_param_thumb_w_type_int' => '', - 'object_decryptedMessageMediaDocument_param_thumb_h_type_int' => '', - 'object_decryptedMessageMediaDocument_param_file_name_type_string' => '', - 'object_decryptedMessageMediaDocument_param_mime_type_type_string' => '', - 'object_decryptedMessageMediaDocument_param_size_type_int' => '', - 'object_decryptedMessageMediaDocument_param_key_type_bytes' => '', - 'object_decryptedMessageMediaDocument_param_iv_type_bytes' => '', - 'object_decryptedMessageMediaAudio' => '', - 'object_decryptedMessageMediaAudio_param_duration_type_int' => '', - 'object_decryptedMessageMediaAudio_param_size_type_int' => '', - 'object_decryptedMessageMediaAudio_param_key_type_bytes' => '', - 'object_decryptedMessageMediaAudio_param_iv_type_bytes' => '', - 'object_decryptedMessageActionReadMessages' => '', - 'object_decryptedMessageActionReadMessages_param_random_ids_type_Vector t' => '', - 'object_decryptedMessageActionDeleteMessages' => '', - 'object_decryptedMessageActionDeleteMessages_param_random_ids_type_Vector t' => '', - 'object_decryptedMessageActionScreenshotMessages' => '', - 'object_decryptedMessageActionScreenshotMessages_param_random_ids_type_Vector t' => '', - 'object_decryptedMessageActionFlushHistory' => '', - 'object_decryptedMessage_param_ttl_type_int' => '', - 'object_decryptedMessageMediaVideo_param_mime_type_type_string' => '', - 'object_decryptedMessageMediaAudio_param_mime_type_type_string' => '', - 'object_decryptedMessageLayer' => '', - 'object_decryptedMessageLayer_param_layer_type_int' => '', - 'object_decryptedMessageLayer_param_in_seq_no_type_int' => '', - 'object_decryptedMessageLayer_param_out_seq_no_type_int' => '', - 'object_decryptedMessageLayer_param_message_type_DecryptedMessage' => '', - 'object_decryptedMessageActionResend' => '', - 'object_decryptedMessageActionResend_param_start_seq_no_type_int' => '', - 'object_decryptedMessageActionResend_param_end_seq_no_type_int' => '', - 'object_decryptedMessageActionNotifyLayer' => '', - 'object_decryptedMessageActionNotifyLayer_param_layer_type_int' => '', - 'object_decryptedMessageActionTyping' => '', - 'object_decryptedMessageActionTyping_param_action_type_SendMessageAction' => '', - 'object_decryptedMessageActionRequestKey' => '', - 'object_decryptedMessageActionRequestKey_param_exchange_id_type_long' => '', - 'object_decryptedMessageActionRequestKey_param_g_a_type_bytes' => '', - 'object_decryptedMessageActionAcceptKey' => '', - 'object_decryptedMessageActionAcceptKey_param_exchange_id_type_long' => '', - 'object_decryptedMessageActionAcceptKey_param_g_b_type_bytes' => '', - 'object_decryptedMessageActionAcceptKey_param_key_fingerprint_type_long' => '', - 'object_decryptedMessageActionAbortKey' => '', - 'object_decryptedMessageActionAbortKey_param_exchange_id_type_long' => '', - 'object_decryptedMessageActionCommitKey' => '', - 'object_decryptedMessageActionCommitKey_param_exchange_id_type_long' => '', - 'object_decryptedMessageActionCommitKey_param_key_fingerprint_type_long' => '', - 'object_decryptedMessageActionNoop' => '', - 'object_decryptedMessageMediaExternalDocument' => '', - 'object_decryptedMessageMediaExternalDocument_param_id_type_long' => '', - 'object_decryptedMessageMediaExternalDocument_param_access_hash_type_long' => '', - 'object_decryptedMessageMediaExternalDocument_param_date_type_int' => '', - 'object_decryptedMessageMediaExternalDocument_param_mime_type_type_string' => '', - 'object_decryptedMessageMediaExternalDocument_param_size_type_int' => '', - 'object_decryptedMessageMediaExternalDocument_param_thumb_type_PhotoSize' => '', - 'object_decryptedMessageMediaExternalDocument_param_dc_id_type_int' => '', - 'object_decryptedMessageMediaExternalDocument_param_attributes_type_Vector t' => '', - 'object_decryptedMessage_param_entities_type_Vector t' => '', - 'object_decryptedMessage_param_via_bot_name_type_string' => '', - 'object_decryptedMessage_param_reply_to_random_id_type_long' => '', - 'object_decryptedMessageMediaPhoto_param_caption_type_string' => '', - 'object_decryptedMessageMediaVideo_param_caption_type_string' => '', - 'object_decryptedMessageMediaDocument_param_attributes_type_Vector t' => '', - 'object_decryptedMessageMediaDocument_param_caption_type_string' => '', - 'object_decryptedMessageMediaVenue' => '', - 'object_decryptedMessageMediaVenue_param_lat_type_double' => '', - 'object_decryptedMessageMediaVenue_param_long_type_double' => '', - 'object_decryptedMessageMediaVenue_param_title_type_string' => '', - 'object_decryptedMessageMediaVenue_param_address_type_string' => '', - 'object_decryptedMessageMediaVenue_param_provider_type_string' => '', - 'object_decryptedMessageMediaVenue_param_venue_id_type_string' => '', - 'object_decryptedMessageMediaWebPage' => '', - 'object_decryptedMessageMediaWebPage_param_url_type_string' => '', - 'object_decryptedMessage_param_grouped_id_type_long' => '', - 'object_inputPeerContact' => '', - 'object_inputPeerContact_param_user_id_type_int' => '', - 'object_inputPeerForeign' => '', - 'object_inputPeerForeign_param_user_id_type_int' => '', - 'object_inputPeerForeign_param_access_hash_type_long' => '', - 'object_inputUserContact' => '', - 'object_inputUserContact_param_user_id_type_int' => '', - 'object_inputUserForeign' => '', - 'object_inputUserForeign_param_user_id_type_int' => '', - 'object_inputUserForeign_param_access_hash_type_long' => '', - 'object_inputMediaUploadedVideo' => '', - 'object_inputMediaUploadedVideo_param_file_type_InputFile' => '', - 'object_inputMediaUploadedVideo_param_duration_type_int' => '', - 'object_inputMediaUploadedVideo_param_w_type_int' => '', - 'object_inputMediaUploadedVideo_param_h_type_int' => '', - 'object_inputMediaUploadedVideo_param_mime_type_type_string' => '', - 'object_inputMediaUploadedThumbVideo' => '', - 'object_inputMediaUploadedThumbVideo_param_file_type_InputFile' => '', - 'object_inputMediaUploadedThumbVideo_param_thumb_type_InputFile' => '', - 'object_inputMediaUploadedThumbVideo_param_duration_type_int' => '', - 'object_inputMediaUploadedThumbVideo_param_w_type_int' => '', - 'object_inputMediaUploadedThumbVideo_param_h_type_int' => '', - 'object_inputMediaUploadedThumbVideo_param_mime_type_type_string' => '', - 'object_inputMediaVideo' => '', - 'object_inputMediaVideo_param_id_type_InputVideo' => '', - 'object_inputChatUploadedPhoto_param_crop_type_InputPhotoCrop' => '', - 'object_inputChatPhoto_param_crop_type_InputPhotoCrop' => '', - 'object_inputVideoEmpty' => '', - 'object_inputVideo' => '', - 'object_inputVideo_param_id_type_long' => '', - 'object_inputVideo_param_access_hash_type_long' => '', - 'object_inputVideoFileLocation' => '', - 'object_inputVideoFileLocation_param_id_type_long' => '', - 'object_inputVideoFileLocation_param_access_hash_type_long' => '', - 'object_inputPhotoCropAuto' => '', - 'object_inputPhotoCrop' => '', - 'object_inputPhotoCrop_param_crop_left_type_double' => '', - 'object_inputPhotoCrop_param_crop_top_type_double' => '', - 'object_inputPhotoCrop_param_crop_width_type_double' => '', - 'object_userSelf' => '', - 'object_userSelf_param_id_type_int' => '', - 'object_userSelf_param_first_name_type_string' => '', - 'object_userSelf_param_last_name_type_string' => '', - 'object_userSelf_param_username_type_string' => '', - 'object_userSelf_param_phone_type_string' => '', - 'object_userSelf_param_photo_type_UserProfilePhoto' => '', - 'object_userSelf_param_status_type_UserStatus' => '', - 'object_userSelf_param_inactive_type_Bool' => '', - 'object_userContact' => '', - 'object_userContact_param_id_type_int' => '', - 'object_userContact_param_first_name_type_string' => '', - 'object_userContact_param_last_name_type_string' => '', - 'object_userContact_param_username_type_string' => '', - 'object_userContact_param_access_hash_type_long' => '', - 'object_userContact_param_phone_type_string' => '', - 'object_userContact_param_photo_type_UserProfilePhoto' => '', - 'object_userContact_param_status_type_UserStatus' => '', - 'object_userRequest' => '', - 'object_userRequest_param_id_type_int' => '', - 'object_userRequest_param_first_name_type_string' => '', - 'object_userRequest_param_last_name_type_string' => '', - 'object_userRequest_param_username_type_string' => '', - 'object_userRequest_param_access_hash_type_long' => '', - 'object_userRequest_param_phone_type_string' => '', - 'object_userRequest_param_photo_type_UserProfilePhoto' => '', - 'object_userRequest_param_status_type_UserStatus' => '', - 'object_userForeign' => '', - 'object_userForeign_param_id_type_int' => '', - 'object_userForeign_param_first_name_type_string' => '', - 'object_userForeign_param_last_name_type_string' => '', - 'object_userForeign_param_username_type_string' => '', - 'object_userForeign_param_access_hash_type_long' => '', - 'object_userForeign_param_photo_type_UserProfilePhoto' => '', - 'object_userForeign_param_status_type_UserStatus' => '', - 'object_userDeleted' => '', - 'object_userDeleted_param_id_type_int' => '', - 'object_userDeleted_param_first_name_type_string' => '', - 'object_userDeleted_param_last_name_type_string' => '', - 'object_userDeleted_param_username_type_string' => '', - 'object_userStatusEmpty' => '', - 'object_userStatusOnline' => '', - 'object_userStatusOnline_param_expires_type_int' => '', - 'object_userStatusOffline' => '', - 'object_userStatusOffline_param_was_online_type_int' => '', - 'object_chat_param_left_type_Bool' => '', - 'object_chatForbidden_param_date_type_int' => '', - 'object_chatParticipants_param_admin_id_type_int' => '', - 'object_messageForwarded' => '', - 'object_messageForwarded_param_id_type_int' => '', - 'object_messageForwarded_param_fwd_from_id_type_int' => '', - 'object_messageForwarded_param_fwd_date_type_int' => '', - 'object_messageForwarded_param_from_id_type_int' => '', - 'object_messageForwarded_param_to_id_type_Peer' => '', - 'object_messageForwarded_param_date_type_int' => '', - 'object_messageForwarded_param_message_type_string' => '', - 'object_messageForwarded_param_media_type_MessageMedia' => '', - 'object_messageMediaVideo' => '', - 'object_messageMediaVideo_param_video_type_Video' => '', - 'object_messageMediaUnsupported_param_bytes_type_bytes' => '', - 'object_messageActionChatAddUser_param_user_id_type_int' => '', - 'object_photo_param_user_id_type_int' => '', - 'object_photo_param_caption_type_string' => '', - 'object_photo_param_geo_type_GeoPoint' => '', - 'object_videoEmpty' => '', - 'object_videoEmpty_param_id_type_long' => '', - 'object_video' => '', - 'object_video_param_id_type_long' => '', - 'object_video_param_access_hash_type_long' => '', - 'object_video_param_user_id_type_int' => '', - 'object_video_param_date_type_int' => '', - 'object_video_param_caption_type_string' => '', - 'object_video_param_duration_type_int' => '', - 'object_video_param_mime_type_type_string' => '', - 'object_video_param_size_type_int' => '', - 'object_video_param_thumb_type_PhotoSize' => '', - 'object_video_param_dc_id_type_int' => '', - 'object_video_param_w_type_int' => '', - 'object_video_param_h_type_int' => '', - 'object_auth.checkedPhone_param_phone_invited_type_Bool' => '', - 'object_auth.sentCode_param_phone_registered_type_Bool' => '', - 'object_auth.sentCode_param_send_call_timeout_type_int' => '', - 'object_auth.sentCode_param_is_password_type_Bool' => '', - 'object_auth.authorization_param_expires_type_int' => '', - 'object_inputPeerNotifySettings_param_show_previews_type_Bool' => '', - 'object_inputPeerNotifySettings_param_events_mask_type_int' => '', - 'object_peerNotifySettings_param_show_previews_type_Bool' => '', - 'object_peerNotifySettings_param_events_mask_type_int' => '', - 'object_userFull_param_blocked_type_Bool' => '', - 'object_userFull_param_real_first_name_type_string' => '', - 'object_userFull_param_real_last_name_type_string' => '', - 'object_contactSuggested' => '', - 'object_contactSuggested_param_user_id_type_int' => '', - 'object_contactSuggested_param_mutual_contacts_type_int' => '', - 'object_contactStatus_param_expires_type_int' => '', - 'object_contacts.foreignLinkUnknown' => '', - 'object_contacts.foreignLinkRequested' => '', - 'object_contacts.foreignLinkRequested_param_has_phone_type_Bool' => '', - 'object_contacts.foreignLinkMutual' => '', - 'object_contacts.myLinkEmpty' => '', - 'object_contacts.myLinkRequested' => '', - 'object_contacts.myLinkRequested_param_contact_type_Bool' => '', - 'object_contacts.myLinkContact' => '', - 'object_contacts.link_param_my_link_type_contacts.MyLink' => '', - 'object_contacts.link_param_foreign_link_type_contacts.ForeignLink' => '', - 'object_contacts.suggested' => '', - 'object_contacts.suggested_param_results_type_Vector t' => '', - 'object_contacts.suggested_param_users_type_Vector t' => '', - 'object_messages.statedMessages' => '', - 'object_messages.statedMessages_param_messages_type_Vector t' => '', - 'object_messages.statedMessages_param_chats_type_Vector t' => '', - 'object_messages.statedMessages_param_users_type_Vector t' => '', - 'object_messages.statedMessages_param_pts_type_int' => '', - 'object_messages.statedMessages_param_seq_type_int' => '', - 'object_messages.statedMessage' => '', - 'object_messages.statedMessage_param_message_type_Message' => '', - 'object_messages.statedMessage_param_chats_type_Vector t' => '', - 'object_messages.statedMessage_param_users_type_Vector t' => '', - 'object_messages.statedMessage_param_pts_type_int' => '', - 'object_messages.statedMessage_param_seq_type_int' => '', - 'object_messages.sentMessage' => '', - 'object_messages.sentMessage_param_id_type_int' => '', - 'object_messages.sentMessage_param_date_type_int' => '', - 'object_messages.sentMessage_param_pts_type_int' => '', - 'object_messages.sentMessage_param_seq_type_int' => '', - 'object_messages.chats_param_users_type_Vector t' => '', - 'object_messages.affectedHistory_param_seq_type_int' => '', - 'object_inputMessagesFilterPhotoVideoDocuments' => '', - 'object_inputMessagesFilterAudio' => '', - 'object_inputMessagesFilterAudioDocuments' => '', - 'object_updateReadMessages' => '', - 'object_updateReadMessages_param_messages_type_Vector t' => '', - 'object_updateReadMessages_param_pts_type_int' => '', - 'object_updateUserStatus' => '', - 'object_updateUserStatus_param_user_id_type_int' => '', - 'object_updateUserStatus_param_status_type_UserStatus' => '', - 'object_updateContactLink_param_my_link_type_contacts.MyLink' => '', - 'object_updateContactLink_param_foreign_link_type_contacts.ForeignLink' => '', - 'object_updateNewAuthorization' => '', - 'object_updateNewAuthorization_param_auth_key_id_type_long' => '', - 'object_updateNewAuthorization_param_date_type_int' => '', - 'object_updateNewAuthorization_param_device_type_string' => '', - 'object_updateNewAuthorization_param_location_type_string' => '', - 'object_updateShortMessage_param_from_id_type_int' => '', - 'object_updateShortMessage_param_seq_type_int' => '', - 'object_updateShortChatMessage_param_seq_type_int' => '', - 'object_dcOption_param_hostname_type_string' => '', - 'object_config_param_broadcast_size_max_type_int' => '', - 'object_messages.statedMessagesLinks' => '', - 'object_messages.statedMessagesLinks_param_messages_type_Vector t' => '', - 'object_messages.statedMessagesLinks_param_chats_type_Vector t' => '', - 'object_messages.statedMessagesLinks_param_users_type_Vector t' => '', - 'object_messages.statedMessagesLinks_param_links_type_Vector t' => '', - 'object_messages.statedMessagesLinks_param_pts_type_int' => '', - 'object_messages.statedMessagesLinks_param_seq_type_int' => '', - 'object_messages.statedMessageLink' => '', - 'object_messages.statedMessageLink_param_message_type_Message' => '', - 'object_messages.statedMessageLink_param_chats_type_Vector t' => '', - 'object_messages.statedMessageLink_param_users_type_Vector t' => '', - 'object_messages.statedMessageLink_param_links_type_Vector t' => '', - 'object_messages.statedMessageLink_param_pts_type_int' => '', - 'object_messages.statedMessageLink_param_seq_type_int' => '', - 'object_messages.sentMessageLink' => '', - 'object_messages.sentMessageLink_param_id_type_int' => '', - 'object_messages.sentMessageLink_param_date_type_int' => '', - 'object_messages.sentMessageLink_param_pts_type_int' => '', - 'object_messages.sentMessageLink_param_seq_type_int' => '', - 'object_messages.sentMessageLink_param_links_type_Vector t' => '', - 'object_inputMediaUploadedAudio' => '', - 'object_inputMediaUploadedAudio_param_file_type_InputFile' => '', - 'object_inputMediaUploadedAudio_param_duration_type_int' => '', - 'object_inputMediaUploadedAudio_param_mime_type_type_string' => '', - 'object_inputMediaAudio' => '', - 'object_inputMediaAudio_param_id_type_InputAudio' => '', - 'object_inputMediaUploadedDocument_param_file_name_type_string' => '', - 'object_inputMediaUploadedThumbDocument' => '', - 'object_inputMediaUploadedThumbDocument_param_file_type_InputFile' => '', - 'object_inputMediaUploadedThumbDocument_param_thumb_type_InputFile' => '', - 'object_inputMediaUploadedThumbDocument_param_file_name_type_string' => '', - 'object_inputMediaUploadedThumbDocument_param_mime_type_type_string' => '', - 'object_messageMediaAudio' => '', - 'object_messageMediaAudio_param_audio_type_Audio' => '', - 'object_inputAudioEmpty' => '', - 'object_inputAudio' => '', - 'object_inputAudio_param_id_type_long' => '', - 'object_inputAudio_param_access_hash_type_long' => '', - 'object_inputAudioFileLocation' => '', - 'object_inputAudioFileLocation_param_id_type_long' => '', - 'object_inputAudioFileLocation_param_access_hash_type_long' => '', - 'object_audioEmpty' => '', - 'object_audioEmpty_param_id_type_long' => '', - 'object_audio' => '', - 'object_audio_param_id_type_long' => '', - 'object_audio_param_access_hash_type_long' => '', - 'object_audio_param_user_id_type_int' => '', - 'object_audio_param_date_type_int' => '', - 'object_audio_param_duration_type_int' => '', - 'object_audio_param_mime_type_type_string' => '', - 'object_audio_param_size_type_int' => '', - 'object_audio_param_dc_id_type_int' => '', - 'object_document_param_user_id_type_int' => '', - 'object_document_param_file_name_type_string' => '', - 'object_auth.sentAppCode' => '', - 'object_auth.sentAppCode_param_phone_registered_type_Bool' => '', - 'object_auth.sentAppCode_param_phone_code_hash_type_string' => '', - 'object_auth.sentAppCode_param_send_call_timeout_type_int' => '', - 'object_auth.sentAppCode_param_is_password_type_Bool' => '', - 'object_contactFound' => '', - 'object_contactFound_param_user_id_type_int' => '', - 'object_updateServiceNotification_param_popup_type_Bool' => '', - 'object_inputMediaUploadedThumbDocument_param_attributes_type_Vector t' => '', - 'object_userStatusRecently' => '', - 'object_userStatusLastWeek' => '', - 'object_userStatusLastMonth' => '', - 'object_account.sentChangePhoneCode' => '', - 'object_account.sentChangePhoneCode_param_phone_code_hash_type_string' => '', - 'object_account.sentChangePhoneCode_param_send_call_timeout_type_int' => '', - 'object_messages.allStickers_param_hash_type_string' => '', - 'object_messages.allStickers_param_packs_type_Vector t' => '', - 'object_messages.allStickers_param_documents_type_Vector t' => '', - 'object_message_param_fwd_from_id_type_int' => '', - 'object_message_param_fwd_date_type_int' => '', - 'object_chatLocated' => '', - 'object_chatLocated_param_chat_id_type_int' => '', - 'object_chatLocated_param_distance_type_int' => '', - 'object_messages.messageEmpty' => '', - 'object_messages.statedMessages_param_pts_count_type_int' => '', - 'object_messages.statedMessage_param_pts_count_type_int' => '', - 'object_messages.sentMessage_param_pts_count_type_int' => '', - 'object_updateReadMessages_param_pts_count_type_int' => '', - 'object_updateShortMessage_param_fwd_from_id_type_int' => '', - 'object_updateShortMessage_param_fwd_date_type_int' => '', - 'object_updateShortChatMessage_param_fwd_from_id_type_int' => '', - 'object_updateShortChatMessage_param_fwd_date_type_int' => '', - 'object_messages.statedMessagesLinks_param_pts_count_type_int' => '', - 'object_messages.statedMessageLink_param_pts_count_type_int' => '', - 'object_messages.sentMessageLink_param_pts_count_type_int' => '', - 'object_inputGeoChat' => '', - 'object_inputGeoChat_param_chat_id_type_int' => '', - 'object_inputGeoChat_param_access_hash_type_long' => '', - 'object_inputNotifyGeoChatPeer' => '', - 'object_inputNotifyGeoChatPeer_param_peer_type_InputGeoChat' => '', - 'object_geoChat' => '', - 'object_geoChat_param_id_type_int' => '', - 'object_geoChat_param_access_hash_type_long' => '', - 'object_geoChat_param_title_type_string' => '', - 'object_geoChat_param_address_type_string' => '', - 'object_geoChat_param_venue_type_string' => '', - 'object_geoChat_param_geo_type_GeoPoint' => '', - 'object_geoChat_param_photo_type_ChatPhoto' => '', - 'object_geoChat_param_participants_count_type_int' => '', - 'object_geoChat_param_date_type_int' => '', - 'object_geoChat_param_checked_in_type_Bool' => '', - 'object_geoChat_param_version_type_int' => '', - 'object_geoChatMessageEmpty' => '', - 'object_geoChatMessageEmpty_param_chat_id_type_int' => '', - 'object_geoChatMessageEmpty_param_id_type_int' => '', - 'object_geoChatMessage' => '', - 'object_geoChatMessage_param_chat_id_type_int' => '', - 'object_geoChatMessage_param_id_type_int' => '', - 'object_geoChatMessage_param_from_id_type_int' => '', - 'object_geoChatMessage_param_date_type_int' => '', - 'object_geoChatMessage_param_message_type_string' => '', - 'object_geoChatMessage_param_media_type_MessageMedia' => '', - 'object_geoChatMessageService' => '', - 'object_geoChatMessageService_param_chat_id_type_int' => '', - 'object_geoChatMessageService_param_id_type_int' => '', - 'object_geoChatMessageService_param_from_id_type_int' => '', - 'object_geoChatMessageService_param_date_type_int' => '', - 'object_geoChatMessageService_param_action_type_MessageAction' => '', - 'object_geochats.statedMessage' => '', - 'object_geochats.statedMessage_param_message_type_GeoChatMessage' => '', - 'object_geochats.statedMessage_param_chats_type_Vector t' => '', - 'object_geochats.statedMessage_param_users_type_Vector t' => '', - 'object_geochats.statedMessage_param_seq_type_int' => '', - 'object_geochats.located' => '', - 'object_geochats.located_param_results_type_Vector t' => '', - 'object_geochats.located_param_messages_type_Vector t' => '', - 'object_geochats.located_param_chats_type_Vector t' => '', - 'object_geochats.located_param_users_type_Vector t' => '', - 'object_geochats.messages' => '', - 'object_geochats.messages_param_messages_type_Vector t' => '', - 'object_geochats.messages_param_chats_type_Vector t' => '', - 'object_geochats.messages_param_users_type_Vector t' => '', - 'object_geochats.messagesSlice' => '', - 'object_geochats.messagesSlice_param_count_type_int' => '', - 'object_geochats.messagesSlice_param_messages_type_Vector t' => '', - 'object_geochats.messagesSlice_param_chats_type_Vector t' => '', - 'object_geochats.messagesSlice_param_users_type_Vector t' => '', - 'object_messageActionGeoChatCreate' => '', - 'object_messageActionGeoChatCreate_param_title_type_string' => '', - 'object_messageActionGeoChatCreate_param_address_type_string' => '', - 'object_messageActionGeoChatCheckin' => '', - 'object_updateNewGeoChatMessage' => '', - 'object_updateNewGeoChatMessage_param_message_type_GeoChatMessage' => '', - 'object_messages.sentMessage_param_media_type_MessageMedia' => '', - 'object_messages.sentMessageLink_param_media_type_MessageMedia' => '', - 'object_inputMediaUploadedPhoto_param_caption_type_string' => '', - 'object_inputMediaPhoto_param_caption_type_string' => '', - 'object_inputMediaUploadedVideo_param_caption_type_string' => '', - 'object_inputMediaUploadedThumbVideo_param_caption_type_string' => '', - 'object_inputMediaVideo_param_caption_type_string' => '', - 'object_messageMediaPhoto_param_caption_type_string' => '', - 'object_messageMediaVideo_param_caption_type_string' => '', - 'object_botCommand' => '', - 'object_botCommand_param_command_type_string' => '', - 'object_botCommand_param_description_type_string' => '', - 'object_botInfoEmpty' => '', - 'object_botInfo_param_version_type_int' => '', - 'object_botInfo_param_share_text_type_string' => '', - 'object_help.appChangelogEmpty' => '', - 'object_help.appChangelog' => '', - 'object_help.appChangelog_param_text_type_string' => '', - 'object_message_param_fwd_from_id_type_Peer' => '', - 'object_updateShortMessage_param_fwd_from_id_type_Peer' => '', - 'object_updateShortChatMessage_param_fwd_from_id_type_Peer' => '', - 'object_channelFull_param_unread_important_count_type_int' => '', - 'object_dialogChannel' => '', - 'object_dialogChannel_param_peer_type_Peer' => '', - 'object_dialogChannel_param_top_message_type_int' => '', - 'object_dialogChannel_param_top_important_message_type_int' => '', - 'object_dialogChannel_param_read_inbox_max_id_type_int' => '', - 'object_dialogChannel_param_unread_count_type_int' => '', - 'object_dialogChannel_param_unread_important_count_type_int' => '', - 'object_dialogChannel_param_notify_settings_type_PeerNotifySettings' => '', - 'object_dialogChannel_param_pts_type_int' => '', - 'object_messageGroup' => '', - 'object_messageGroup_param_min_id_type_int' => '', - 'object_messageGroup_param_max_id_type_int' => '', - 'object_messageGroup_param_count_type_int' => '', - 'object_messageGroup_param_date_type_int' => '', - 'object_messages.channelMessages_param_collapsed_type_Vector t' => '', - 'object_updateChannelGroup' => '', - 'object_updateChannelGroup_param_channel_id_type_int' => '', - 'object_updateChannelGroup_param_group_type_MessageGroup' => '', - 'object_updates.channelDifferenceTooLong_param_top_important_message_type_int' => '', - 'object_updates.channelDifferenceTooLong_param_unread_important_count_type_int' => '', - 'object_channelMessagesFilterCollapsed' => '', - 'object_channelParticipantModerator' => '', - 'object_channelParticipantModerator_param_user_id_type_int' => '', - 'object_channelParticipantModerator_param_inviter_id_type_int' => '', - 'object_channelParticipantModerator_param_date_type_int' => '', - 'object_channelParticipantEditor' => '', - 'object_channelParticipantEditor_param_user_id_type_int' => '', - 'object_channelParticipantEditor_param_inviter_id_type_int' => '', - 'object_channelParticipantEditor_param_date_type_int' => '', - 'object_channelParticipantKicked' => '', - 'object_channelParticipantKicked_param_user_id_type_int' => '', - 'object_channelParticipantKicked_param_kicked_by_type_int' => '', - 'object_channelParticipantKicked_param_date_type_int' => '', - 'object_channelRoleEmpty' => '', - 'object_channelRoleModerator' => '', - 'object_channelRoleEditor' => '', - 'object_inputChatEmpty' => '', - 'object_inputChat' => '', - 'object_inputChat_param_chat_id_type_int' => '', - 'object_updateReadChannelInbox_param_peer_type_Peer' => '', - 'object_updateDeleteChannelMessages_param_peer_type_Peer' => '', - 'object_message_param_unread_type_true' => '', - 'object_messageService_param_unread_type_true' => '', - 'object_updateShortMessage_param_unread_type_true' => '', - 'object_updateShortChatMessage_param_unread_type_true' => '', - 'object_stickerSet_param_disabled_type_true' => '', - 'object_updateShortSentMessage_param_unread_type_true' => '', - 'object_channel_param_kicked_type_true' => '', - 'object_channel_param_moderator_type_true' => '', - 'object_channelMessagesFilter_param_important_only_type_true' => '', - 'object_messageActionChatDeactivate' => '', - 'object_messageActionChatActivate' => '', - 'object_user_param_restiction_reason_type_string' => '', - 'object_channel_param_restiction_reason_type_string' => '', - 'object_webPageExternal' => '', - 'object_webPageExternal_param_url_type_string' => '', - 'object_webPageExternal_param_display_url_type_string' => '', - 'object_webPageExternal_param_type_type_string' => '', - 'object_webPageExternal_param_title_type_string' => '', - 'object_webPageExternal_param_description_type_string' => '', - 'object_webPageExternal_param_thumb_url_type_string' => '', - 'object_webPageExternal_param_content_url_type_string' => '', - 'object_webPageExternal_param_w_type_int' => '', - 'object_webPageExternal_param_h_type_int' => '', - 'object_webPageExternal_param_duration_type_int' => '', - 'object_foundGif_param_webpage_type_WebPage' => '', - 'object_inputMediaUploadedDocument_param_caption_type_string' => '', - 'object_inputMediaUploadedThumbDocument_param_caption_type_string' => '', - 'object_inputMediaDocument_param_caption_type_string' => '', - 'object_messageMediaDocument_param_caption_type_string' => '', - 'object_inputBotInlineMessageMediaAuto_param_caption_type_string' => '', - 'object_botInlineMessageMediaAuto_param_caption_type_string' => '', - 'object_botInlineMediaResultDocument' => '', - 'object_botInlineMediaResultDocument_param_id_type_string' => '', - 'object_botInlineMediaResultDocument_param_type_type_string' => '', - 'object_botInlineMediaResultDocument_param_document_type_Document' => '', - 'object_botInlineMediaResultDocument_param_send_message_type_BotInlineMessage' => '', - 'object_botInlineMediaResultPhoto' => '', - 'object_botInlineMediaResultPhoto_param_id_type_string' => '', - 'object_botInlineMediaResultPhoto_param_type_type_string' => '', - 'object_botInlineMediaResultPhoto_param_photo_type_Photo' => '', - 'object_botInlineMediaResultPhoto_param_send_message_type_BotInlineMessage' => '', - 'object_inputMediaVideo_param_video_type_InputVideo' => '', - 'object_inputMediaAudio_param_audio_type_InputAudio' => '', - 'object_inputMediaDocument_param_document_id_type_InputDocument' => '', - 'object_inputGeoPoint_param_latitude_type_double' => '', - 'object_inputGeoPoint_param_longitude_type_double' => '', - 'object_geoPoint_param_longitude_type_double' => '', - 'object_geoPoint_param_latitude_type_double' => '', - 'object_updateNewEncryptedMessage_param_encr_message_type_EncryptedMessage' => '', - 'object_updateEncryption_param_encr_chat_type_EncryptedChat' => '', - 'object_updateNotifySettings_param_notify_peer_type_NotifyPeer' => '', - 'object_updateServiceNotification_param_message_text_type_string' => '', - 'object_updateNewChannelMessage_param_channel_pts_type_int' => '', - 'object_updateNewChannelMessage_param_channel_pts_count_type_int' => '', - 'object_updateDeleteChannelMessages_param_channel_pts_type_int' => '', - 'object_updateDeleteChannelMessages_param_channel_pts_count_type_int' => '', - 'object_updates.channelDifferenceEmpty_param_channel_pts_type_int' => '', - 'object_updates.channelDifferenceTooLong_param_channel_pts_type_int' => '', - 'object_updates.channelDifference_param_channel_pts_type_int' => '', - 'object_privacyKeyChatInvite' => '', - 'object_inputMediaUploadedThumbDocument_param_stickers_type_Vector t' => '', - 'object_inputMediaPhotoExternal_param_caption_type_string' => '', - 'object_inputMediaDocumentExternal_param_caption_type_string' => '', - 'object_destroy_auth_key_ok' => '', - 'object_destroy_auth_key_none' => '', - 'object_destroy_auth_key_fail' => '', - 'object_help.appChangelog_param_message_type_string' => '', - 'object_help.appChangelog_param_media_type_MessageMedia' => '', - 'object_help.appChangelog_param_entities_type_Vector t' => '', - 'object_pageBlockParagraph' => '', - 'object_pageBlockParagraph_param_text_type_RichText' => '', - 'object_pageBlockPreformatted' => '', - 'object_pageBlockPreformatted_param_text_type_RichText' => '', - 'object_pageBlockPreformatted_param_language_type_string' => '', - 'object_pageBlockDivider' => '', - 'object_pageBlockAnchor' => '', - 'object_pageBlockAnchor_param_name_type_string' => '', - 'object_pageBlockCover' => '', - 'object_pageBlockCover_param_cover_type_PageBlock' => '', - 'object_pagePart_param_videos_type_Vector t' => '', - 'object_pageFull_param_videos_type_Vector t' => '', - 'object_phoneCallRequested_param_g_a_type_bytes' => '', - 'object_resPQ_param_pq_type_string' => '', - 'object_p_q_inner_data_param_pq_type_string' => '', - 'object_p_q_inner_data_param_p_type_string' => '', - 'object_p_q_inner_data_param_q_type_string' => '', - 'object_server_DH_params_ok_param_encrypted_answer_type_string' => '', - 'object_server_DH_inner_data_param_dh_prime_type_string' => '', - 'object_server_DH_inner_data_param_g_a_type_string' => '', - 'object_client_DH_inner_data_param_g_b_type_string' => '', - 'object_msgs_state_info_param_info_type_string' => '', - 'object_msgs_all_info_param_info_type_string' => '', - 'object_http_wait' => '', - 'object_http_wait_param_max_delay_type_int' => '', - 'object_http_wait_param_wait_after_type_int' => '', - 'object_http_wait_param_max_wait_type_int' => '', - 'object_ipPort' => '', - 'object_ipPort_param_ipv4_type_int' => '', - 'object_ipPort_param_port_type_int' => '', - 'object_help.configSimple' => '', - 'object_help.configSimple_param_date_type_int' => '', - 'object_help.configSimple_param_expires_type_int' => '', - 'object_help.configSimple_param_dc_id_type_int' => '', - 'object_help.configSimple_param_ip_port_list_type_Vector t' => '', - 'object_inputMessagesFilterMyMentionsUnread' => '', + 'object_account.passwordInputSettings_param_hint_type_string' => 'Hint', + 'object_account.passwordInputSettings_param_email_type_string' => 'Email', + 'object_auth.passwordRecovery' => 'Password recovery', + 'object_auth.passwordRecovery_param_email_pattern_type_string' => 'Email pattern', + 'object_receivedNotifyMessage' => 'Received notify message', + 'object_receivedNotifyMessage_param_id_type_int' => 'ID', + 'object_chatInviteEmpty' => 'Empty chat invite', + 'object_chatInviteExported' => 'Exported chat invite', + 'object_chatInviteExported_param_link_type_string' => 'Link', + 'object_chatInviteAlready' => 'Invite of a chat of which I am already member ', + 'object_chatInviteAlready_param_chat_type_Chat' => 'Chat', + 'object_chatInvite' => 'Chat invite', + 'object_chatInvite_param_channel_type_true' => 'Channel?', + 'object_chatInvite_param_broadcast_type_true' => 'Broadcast?', + 'object_chatInvite_param_public_type_true' => 'Public?', + 'object_chatInvite_param_megagroup_type_true' => 'Megagroup?', + 'object_chatInvite_param_title_type_string' => 'Title', + 'object_chatInvite_param_photo_type_ChatPhoto' => 'Photo', + 'object_chatInvite_param_participants_count_type_int' => 'Participants count', + 'object_chatInvite_param_participants_type_Vector t' => 'Participants', + 'object_inputStickerSetEmpty' => 'Empty input sticker set', + 'object_inputStickerSetID' => 'Sticker set ID', + 'object_inputStickerSetID_param_id_type_long' => 'ID', + 'object_inputStickerSetID_param_access_hash_type_long' => 'Access hash', + 'object_inputStickerSetShortName' => 'Sticker set short name', + 'object_inputStickerSetShortName_param_short_name_type_string' => 'Short name', + 'object_stickerSet' => 'Sticker set', + 'object_stickerSet_param_installed_type_true' => 'Installed?', + 'object_stickerSet_param_archived_type_true' => 'Archived?', + 'object_stickerSet_param_official_type_true' => 'Official?', + 'object_stickerSet_param_masks_type_true' => 'Masks?', + 'object_stickerSet_param_id_type_long' => 'ID', + 'object_stickerSet_param_access_hash_type_long' => 'Access hash', + 'object_stickerSet_param_title_type_string' => 'Title', + 'object_stickerSet_param_short_name_type_string' => 'Short name', + 'object_stickerSet_param_count_type_int' => 'Count', + 'object_stickerSet_param_hash_type_int' => 'Hash', + 'object_messages.stickerSet' => 'Sticker set', + 'object_messages.stickerSet_param_set_type_StickerSet' => 'Set', + 'object_messages.stickerSet_param_packs_type_Vector t' => 'Packs', + 'object_messages.stickerSet_param_documents_type_Vector t' => 'Documents', + 'object_botInfo' => 'Bot info', + 'object_botInfo_param_user_id_type_int' => 'User ID', + 'object_botInfo_param_description_type_string' => 'Description', + 'object_botInfo_param_commands_type_Vector t' => 'Commands', + 'object_keyboardButton' => 'Keyboard button', + 'object_keyboardButton_param_text_type_string' => 'Text', + 'object_keyboardButtonUrl' => 'Keyboard button URL', + 'object_keyboardButtonUrl_param_text_type_string' => 'Text', + 'object_keyboardButtonUrl_param_url_type_string' => 'URL', + 'object_keyboardButtonCallback' => 'Keyboard button callback', + 'object_keyboardButtonCallback_param_text_type_string' => 'Text', + 'object_keyboardButtonCallback_param_data_type_bytes' => 'Data', + 'object_keyboardButtonRequestPhone' => 'Keyboard button request phone', + 'object_keyboardButtonRequestPhone_param_text_type_string' => 'Text', + 'object_keyboardButtonRequestGeoLocation' => 'Keyboard button request geo location', + 'object_keyboardButtonRequestGeoLocation_param_text_type_string' => 'Text', + 'object_keyboardButtonSwitchInline' => 'Keyboard button switch inline', + 'object_keyboardButtonSwitchInline_param_same_peer_type_true' => 'Same peer?', + 'object_keyboardButtonSwitchInline_param_text_type_string' => 'Text', + 'object_keyboardButtonSwitchInline_param_query_type_string' => 'Query', + 'object_keyboardButtonGame' => 'Keyboard button game', + 'object_keyboardButtonGame_param_text_type_string' => 'Text', + 'object_keyboardButtonBuy' => 'Keyboard button buy', + 'object_keyboardButtonBuy_param_text_type_string' => 'Text', + 'object_keyboardButtonRow' => 'Keyboard button row', + 'object_keyboardButtonRow_param_buttons_type_Vector t' => 'Buttons', + 'object_replyKeyboardHide' => 'Reply keyboard hide', + 'object_replyKeyboardHide_param_selective_type_true' => 'Selective?', + 'object_replyKeyboardForceReply' => 'Reply keyboard force reply', + 'object_replyKeyboardForceReply_param_single_use_type_true' => 'Single use?', + 'object_replyKeyboardForceReply_param_selective_type_true' => 'Selective?', + 'object_replyKeyboardMarkup' => 'Reply keyboard markup', + 'object_replyKeyboardMarkup_param_resize_type_true' => 'Resize?', + 'object_replyKeyboardMarkup_param_single_use_type_true' => 'Single use?', + 'object_replyKeyboardMarkup_param_selective_type_true' => 'Selective?', + 'object_replyKeyboardMarkup_param_rows_type_Vector t' => 'Rows', + 'object_replyInlineMarkup' => 'Reply inline markup', + 'object_replyInlineMarkup_param_rows_type_Vector t' => 'Rows', + 'object_messageEntityUnknown' => 'Message entity unknown', + 'object_messageEntityUnknown_param_offset_type_int' => 'Offset', + 'object_messageEntityUnknown_param_length_type_int' => 'Length', + 'object_messageEntityMention' => 'Message entity mention', + 'object_messageEntityMention_param_offset_type_int' => 'Offset', + 'object_messageEntityMention_param_length_type_int' => 'Length', + 'object_messageEntityHashtag' => 'Message entity hashtag', + 'object_messageEntityHashtag_param_offset_type_int' => 'Offset', + 'object_messageEntityHashtag_param_length_type_int' => 'Length', + 'object_messageEntityBotCommand' => 'Message entity bot command', + 'object_messageEntityBotCommand_param_offset_type_int' => 'Offset', + 'object_messageEntityBotCommand_param_length_type_int' => 'Length', + 'object_messageEntityUrl' => 'Message entity URL', + 'object_messageEntityUrl_param_offset_type_int' => 'Offset', + 'object_messageEntityUrl_param_length_type_int' => 'Length', + 'object_messageEntityEmail' => 'Message entity email', + 'object_messageEntityEmail_param_offset_type_int' => 'Offset', + 'object_messageEntityEmail_param_length_type_int' => 'Length', + 'object_messageEntityBold' => 'Message entity bold', + 'object_messageEntityBold_param_offset_type_int' => 'Offset', + 'object_messageEntityBold_param_length_type_int' => 'Length', + 'object_messageEntityItalic' => 'Message entity italic', + 'object_messageEntityItalic_param_offset_type_int' => 'Offset', + 'object_messageEntityItalic_param_length_type_int' => 'Length', + 'object_messageEntityCode' => 'Message entity code', + 'object_messageEntityCode_param_offset_type_int' => 'Offset', + 'object_messageEntityCode_param_length_type_int' => 'Length', + 'object_messageEntityPre' => 'Message entity pre', + 'object_messageEntityPre_param_offset_type_int' => 'Offset', + 'object_messageEntityPre_param_length_type_int' => 'Length', + 'object_messageEntityPre_param_language_type_string' => 'Language', + 'object_messageEntityTextUrl' => 'Message entity text URL', + 'object_messageEntityTextUrl_param_offset_type_int' => 'Offset', + 'object_messageEntityTextUrl_param_length_type_int' => 'Length', + 'object_messageEntityTextUrl_param_url_type_string' => 'URL', + 'object_messageEntityMentionName' => 'Message entity mention name', + 'object_messageEntityMentionName_param_offset_type_int' => 'Offset', + 'object_messageEntityMentionName_param_length_type_int' => 'Length', + 'object_messageEntityMentionName_param_user_id_type_int' => 'User ID', + 'object_inputMessageEntityMentionName' => 'Message entity mention name', + 'object_inputMessageEntityMentionName_param_offset_type_int' => 'Offset', + 'object_inputMessageEntityMentionName_param_length_type_int' => 'Length', + 'object_inputMessageEntityMentionName_param_user_id_type_InputUser' => 'User ID', + 'object_inputChannelEmpty' => 'Empty input channel', + 'object_inputChannel' => 'Channel', + 'object_inputChannel_param_channel_id_type_int' => 'Channel ID', + 'object_inputChannel_param_access_hash_type_long' => 'Access hash', + 'object_contacts.resolvedPeer' => 'Resolved peer', + 'object_contacts.resolvedPeer_param_peer_type_Peer' => 'Peer', + 'object_contacts.resolvedPeer_param_chats_type_Vector t' => 'Chats', + 'object_contacts.resolvedPeer_param_users_type_Vector t' => 'Users', + 'object_messageRange' => 'Message range', + 'object_messageRange_param_min_id_type_int' => 'Min ID', + 'object_messageRange_param_max_id_type_int' => 'Max ID', + 'object_updates.channelDifferenceEmpty' => 'Empty channel difference', + 'object_updates.channelDifferenceEmpty_param_final_type_true' => 'Final?', + 'object_updates.channelDifferenceEmpty_param_pts_type_int' => 'Pts', + 'object_updates.channelDifferenceEmpty_param_timeout_type_int' => 'Timeout', + 'object_updates.channelDifferenceTooLong' => 'Channel difference too long', + 'object_updates.channelDifferenceTooLong_param_final_type_true' => 'Final?', + 'object_updates.channelDifferenceTooLong_param_pts_type_int' => 'Pts', + 'object_updates.channelDifferenceTooLong_param_timeout_type_int' => 'Timeout', + 'object_updates.channelDifferenceTooLong_param_top_message_type_int' => 'Top message', + 'object_updates.channelDifferenceTooLong_param_read_inbox_max_id_type_int' => 'Read inbox max ID', + 'object_updates.channelDifferenceTooLong_param_read_outbox_max_id_type_int' => 'Read outbox max ID', + 'object_updates.channelDifferenceTooLong_param_unread_count_type_int' => 'Unread count', + 'object_updates.channelDifferenceTooLong_param_unread_mentions_count_type_int' => 'Unread mentions count', + 'object_updates.channelDifferenceTooLong_param_messages_type_Vector t' => 'Messages', + 'object_updates.channelDifferenceTooLong_param_chats_type_Vector t' => 'Chats', + 'object_updates.channelDifferenceTooLong_param_users_type_Vector t' => 'Users', + 'object_updates.channelDifference' => 'Channel difference', + 'object_updates.channelDifference_param_final_type_true' => 'Final?', + 'object_updates.channelDifference_param_pts_type_int' => 'Pts', + 'object_updates.channelDifference_param_timeout_type_int' => 'Timeout', + 'object_updates.channelDifference_param_new_messages_type_Vector t' => 'New messages', + 'object_updates.channelDifference_param_other_updates_type_Vector t' => 'Other updates', + 'object_updates.channelDifference_param_chats_type_Vector t' => 'Chats', + 'object_updates.channelDifference_param_users_type_Vector t' => 'Users', + 'object_channelMessagesFilterEmpty' => 'Empty channel messages filter', + 'object_channelMessagesFilter' => 'Channel messages filter', + 'object_channelMessagesFilter_param_exclude_new_messages_type_true' => 'Exclude new messages?', + 'object_channelMessagesFilter_param_ranges_type_Vector t' => 'Ranges', + 'object_channelParticipant' => 'Channel participant', + 'object_channelParticipant_param_user_id_type_int' => 'User ID', + 'object_channelParticipant_param_date_type_int' => 'Date', + 'object_channelParticipantSelf' => 'Channel participant self', + 'object_channelParticipantSelf_param_user_id_type_int' => 'User ID', + 'object_channelParticipantSelf_param_inviter_id_type_int' => 'Inviter ID', + 'object_channelParticipantSelf_param_date_type_int' => 'Date', + 'object_channelParticipantCreator' => 'Channel participant creator', + 'object_channelParticipantCreator_param_user_id_type_int' => 'User ID', + 'object_channelParticipantAdmin' => 'Channel participant admin', + 'object_channelParticipantAdmin_param_can_edit_type_true' => 'Can edit?', + 'object_channelParticipantAdmin_param_user_id_type_int' => 'User ID', + 'object_channelParticipantAdmin_param_inviter_id_type_int' => 'Inviter ID', + 'object_channelParticipantAdmin_param_promoted_by_type_int' => 'Promoted by', + 'object_channelParticipantAdmin_param_date_type_int' => 'Date', + 'object_channelParticipantAdmin_param_admin_rights_type_ChannelAdminRights' => 'Admin rights', + 'object_channelParticipantBanned' => 'Channel participant banned', + 'object_channelParticipantBanned_param_left_type_true' => 'Left?', + 'object_channelParticipantBanned_param_user_id_type_int' => 'User ID', + 'object_channelParticipantBanned_param_kicked_by_type_int' => 'Kicked by', + 'object_channelParticipantBanned_param_date_type_int' => 'Date', + 'object_channelParticipantBanned_param_banned_rights_type_ChannelBannedRights' => 'Banned rights', + 'object_channelParticipantsRecent' => 'Channel participants recent', + 'object_channelParticipantsAdmins' => 'Channel participants admins', + 'object_channelParticipantsKicked' => 'Channel participants kicked', + 'object_channelParticipantsKicked_param_q_type_string' => 'Query', + 'object_channelParticipantsBots' => 'Channel participants bots', + 'object_channelParticipantsBanned' => 'Channel participants banned', + 'object_channelParticipantsBanned_param_q_type_string' => 'Query', + 'object_channelParticipantsSearch' => 'Channel participants search', + 'object_channelParticipantsSearch_param_q_type_string' => 'Query', + 'object_channels.channelParticipants' => 'Channel participants', + 'object_channels.channelParticipants_param_count_type_int' => 'Count', + 'object_channels.channelParticipants_param_participants_type_Vector t' => 'Participants', + 'object_channels.channelParticipants_param_users_type_Vector t' => 'Users', + 'object_channels.channelParticipantsNotModified' => 'Channel participants not modified', + 'object_channels.channelParticipant' => 'Channel participant', + 'object_channels.channelParticipant_param_participant_type_ChannelParticipant' => 'Participant', + 'object_channels.channelParticipant_param_users_type_Vector t' => 'Users', + 'object_help.termsOfService' => 'Terms of service', + 'object_help.termsOfService_param_text_type_string' => 'Text', + 'object_foundGif' => 'Found gif', + 'object_foundGif_param_url_type_string' => 'URL', + 'object_foundGif_param_thumb_url_type_string' => 'Thumbnail URL', + 'object_foundGif_param_content_url_type_string' => 'Content URL', + 'object_foundGif_param_content_type_type_string' => 'Content type', + 'object_foundGif_param_w_type_int' => 'Width', + 'object_foundGif_param_h_type_int' => 'Height', + 'object_foundGifCached' => 'Found gif cached', + 'object_foundGifCached_param_url_type_string' => 'URL', + 'object_foundGifCached_param_photo_type_Photo' => 'Photo', + 'object_foundGifCached_param_document_type_Document' => 'Document', + 'object_messages.foundGifs' => 'Found gifs', + 'object_messages.foundGifs_param_next_offset_type_int' => 'Next offset', + 'object_messages.foundGifs_param_results_type_Vector t' => 'Results', + 'object_messages.savedGifsNotModified' => 'Saved gifs not modified', + 'object_messages.savedGifs' => 'Saved gifs', + 'object_messages.savedGifs_param_hash_type_int' => 'Hash', + 'object_messages.savedGifs_param_gifs_type_Vector t' => 'Gifs', + 'object_inputBotInlineMessageMediaAuto' => 'Bot inline message media auto', + 'object_inputBotInlineMessageMediaAuto_param_message_type_string' => 'Message', + 'object_inputBotInlineMessageMediaAuto_param_entities_type_Vector t' => 'Entities', + 'object_inputBotInlineMessageMediaAuto_param_reply_markup_type_ReplyMarkup' => 'Reply markup', + 'object_inputBotInlineMessageText' => 'Bot inline message text', + 'object_inputBotInlineMessageText_param_no_webpage_type_true' => 'No webpage?', + 'object_inputBotInlineMessageText_param_message_type_string' => 'Message', + 'object_inputBotInlineMessageText_param_entities_type_Vector t' => 'Entities', + 'object_inputBotInlineMessageText_param_reply_markup_type_ReplyMarkup' => 'Reply markup', + 'object_inputBotInlineMessageMediaGeo' => 'Bot inline message media geo', + 'object_inputBotInlineMessageMediaGeo_param_geo_point_type_InputGeoPoint' => 'Geo point', + 'object_inputBotInlineMessageMediaGeo_param_period_type_int' => 'Period', + 'object_inputBotInlineMessageMediaGeo_param_reply_markup_type_ReplyMarkup' => 'Reply markup', + 'object_inputBotInlineMessageMediaVenue' => 'Bot inline message media venue', + 'object_inputBotInlineMessageMediaVenue_param_geo_point_type_InputGeoPoint' => 'Geo point', + 'object_inputBotInlineMessageMediaVenue_param_title_type_string' => 'Title', + 'object_inputBotInlineMessageMediaVenue_param_address_type_string' => 'Address', + 'object_inputBotInlineMessageMediaVenue_param_provider_type_string' => 'Provider', + 'object_inputBotInlineMessageMediaVenue_param_venue_id_type_string' => 'Venue ID', + 'object_inputBotInlineMessageMediaVenue_param_reply_markup_type_ReplyMarkup' => 'Reply markup', + 'object_inputBotInlineMessageMediaContact' => 'Bot inline message media contact', + 'object_inputBotInlineMessageMediaContact_param_phone_number_type_string' => 'Phone number', + 'object_inputBotInlineMessageMediaContact_param_first_name_type_string' => 'First name', + 'object_inputBotInlineMessageMediaContact_param_last_name_type_string' => 'Last name', + 'object_inputBotInlineMessageMediaContact_param_reply_markup_type_ReplyMarkup' => 'Reply markup', + 'object_inputBotInlineMessageGame' => 'Bot inline message game', + 'object_inputBotInlineMessageGame_param_reply_markup_type_ReplyMarkup' => 'Reply markup', + 'object_inputBotInlineResult' => 'Bot inline result', + 'object_inputBotInlineResult_param_id_type_string' => 'ID', + 'object_inputBotInlineResult_param_type_type_string' => 'Type', + 'object_inputBotInlineResult_param_title_type_string' => 'Title', + 'object_inputBotInlineResult_param_description_type_string' => 'Description', + 'object_inputBotInlineResult_param_url_type_string' => 'URL', + 'object_inputBotInlineResult_param_thumb_url_type_string' => 'Thumbnail URL', + 'object_inputBotInlineResult_param_content_url_type_string' => 'Content URL', + 'object_inputBotInlineResult_param_content_type_type_string' => 'Content type', + 'object_inputBotInlineResult_param_w_type_int' => 'Width', + 'object_inputBotInlineResult_param_h_type_int' => 'Height', + 'object_inputBotInlineResult_param_duration_type_int' => 'Duration', + 'object_inputBotInlineResult_param_send_message_type_InputBotInlineMessage' => 'Message to send', + 'object_inputBotInlineResultPhoto' => 'Bot inline result photo', + 'object_inputBotInlineResultPhoto_param_id_type_string' => 'ID', + 'object_inputBotInlineResultPhoto_param_type_type_string' => 'Type', + 'object_inputBotInlineResultPhoto_param_photo_type_InputPhoto' => 'Photo', + 'object_inputBotInlineResultPhoto_param_send_message_type_InputBotInlineMessage' => 'Message to send', + 'object_inputBotInlineResultDocument' => 'Bot inline result document', + 'object_inputBotInlineResultDocument_param_id_type_string' => 'ID', + 'object_inputBotInlineResultDocument_param_type_type_string' => 'Type', + 'object_inputBotInlineResultDocument_param_title_type_string' => 'Title', + 'object_inputBotInlineResultDocument_param_description_type_string' => 'Description', + 'object_inputBotInlineResultDocument_param_document_type_InputDocument' => 'Document', + 'object_inputBotInlineResultDocument_param_send_message_type_InputBotInlineMessage' => 'Message to send', + 'object_inputBotInlineResultGame' => 'Bot inline result game', + 'object_inputBotInlineResultGame_param_id_type_string' => 'ID', + 'object_inputBotInlineResultGame_param_short_name_type_string' => 'Short name', + 'object_inputBotInlineResultGame_param_send_message_type_InputBotInlineMessage' => 'Message to send', + 'object_botInlineMessageMediaAuto' => 'Bot inline message media auto', + 'object_botInlineMessageMediaAuto_param_message_type_string' => 'Message', + 'object_botInlineMessageMediaAuto_param_entities_type_Vector t' => 'Entities', + 'object_botInlineMessageMediaAuto_param_reply_markup_type_ReplyMarkup' => 'Reply markup', + 'object_botInlineMessageText' => 'Bot inline message text', + 'object_botInlineMessageText_param_no_webpage_type_true' => 'No webpage?', + 'object_botInlineMessageText_param_message_type_string' => 'Message', + 'object_botInlineMessageText_param_entities_type_Vector t' => 'Entities', + 'object_botInlineMessageText_param_reply_markup_type_ReplyMarkup' => 'Reply markup', + 'object_botInlineMessageMediaGeo' => 'Bot inline message media geo', + 'object_botInlineMessageMediaGeo_param_geo_type_GeoPoint' => 'Geo', + 'object_botInlineMessageMediaGeo_param_period_type_int' => 'Period', + 'object_botInlineMessageMediaGeo_param_reply_markup_type_ReplyMarkup' => 'Reply markup', + 'object_botInlineMessageMediaVenue' => 'Bot inline message media venue', + 'object_botInlineMessageMediaVenue_param_geo_type_GeoPoint' => 'Geo', + 'object_botInlineMessageMediaVenue_param_title_type_string' => 'Title', + 'object_botInlineMessageMediaVenue_param_address_type_string' => 'Address', + 'object_botInlineMessageMediaVenue_param_provider_type_string' => 'Provider', + 'object_botInlineMessageMediaVenue_param_venue_id_type_string' => 'Venue ID', + 'object_botInlineMessageMediaVenue_param_reply_markup_type_ReplyMarkup' => 'Reply markup', + 'object_botInlineMessageMediaContact' => 'Bot inline message media contact', + 'object_botInlineMessageMediaContact_param_phone_number_type_string' => 'Phone number', + 'object_botInlineMessageMediaContact_param_first_name_type_string' => 'First name', + 'object_botInlineMessageMediaContact_param_last_name_type_string' => 'Last name', + 'object_botInlineMessageMediaContact_param_reply_markup_type_ReplyMarkup' => 'Reply markup', + 'object_botInlineResult' => 'Bot inline result', + 'object_botInlineResult_param_id_type_string' => 'ID', + 'object_botInlineResult_param_type_type_string' => 'Type', + 'object_botInlineResult_param_title_type_string' => 'Title', + 'object_botInlineResult_param_description_type_string' => 'Description', + 'object_botInlineResult_param_url_type_string' => 'URL', + 'object_botInlineResult_param_thumb_url_type_string' => 'Thumbnail URL', + 'object_botInlineResult_param_content_url_type_string' => 'Content URL', + 'object_botInlineResult_param_content_type_type_string' => 'Content type', + 'object_botInlineResult_param_w_type_int' => 'Width', + 'object_botInlineResult_param_h_type_int' => 'Height', + 'object_botInlineResult_param_duration_type_int' => 'Duration', + 'object_botInlineResult_param_send_message_type_BotInlineMessage' => 'Message to send', + 'object_botInlineMediaResult' => 'Bot inline media result', + 'object_botInlineMediaResult_param_id_type_string' => 'ID', + 'object_botInlineMediaResult_param_type_type_string' => 'Type', + 'object_botInlineMediaResult_param_photo_type_Photo' => 'Photo', + 'object_botInlineMediaResult_param_document_type_Document' => 'Document', + 'object_botInlineMediaResult_param_title_type_string' => 'Title', + 'object_botInlineMediaResult_param_description_type_string' => 'Description', + 'object_botInlineMediaResult_param_send_message_type_BotInlineMessage' => 'Send message', + 'object_messages.botResults' => 'Bot results', + 'object_messages.botResults_param_gallery_type_true' => 'Gallery?', + 'object_messages.botResults_param_query_id_type_long' => 'Query ID', + 'object_messages.botResults_param_next_offset_type_string' => 'Next offset', + 'object_messages.botResults_param_switch_pm_type_InlineBotSwitchPM' => 'Switch pm', + 'object_messages.botResults_param_results_type_Vector t' => 'Results', + 'object_messages.botResults_param_cache_time_type_int' => 'Cache time', + 'object_messages.botResults_param_users_type_Vector t' => 'Users', + 'object_exportedMessageLink' => 'Exported message link', + 'object_exportedMessageLink_param_link_type_string' => 'Link', + 'object_exportedMessageLink_param_html_type_string' => 'Html', + 'object_messageFwdHeader' => 'Forwarded message info', + 'object_messageFwdHeader_param_from_id_type_int' => 'From ID', + 'object_messageFwdHeader_param_date_type_int' => 'Date', + 'object_messageFwdHeader_param_channel_id_type_int' => 'Channel ID', + 'object_messageFwdHeader_param_channel_post_type_int' => 'Channel post', + 'object_messageFwdHeader_param_post_author_type_string' => 'Post author', + 'object_messageFwdHeader_param_saved_from_peer_type_Peer' => 'Saved from peer', + 'object_messageFwdHeader_param_saved_from_msg_id_type_int' => 'Saved from msg ID', + 'object_auth.codeTypeSms' => 'Auth code type: SMS', + 'object_auth.codeTypeCall' => 'Auth code type: call', + 'object_auth.codeTypeFlashCall' => 'Auth code type: flash call', + 'object_auth.sentCodeTypeApp' => 'Sent code type app', + 'object_auth.sentCodeTypeApp_param_length_type_int' => 'Length', + 'object_auth.sentCodeTypeSms' => 'Sent code type sms', + 'object_auth.sentCodeTypeSms_param_length_type_int' => 'Length', + 'object_auth.sentCodeTypeCall' => 'Sent code type call', + 'object_auth.sentCodeTypeCall_param_length_type_int' => 'Length', + 'object_auth.sentCodeTypeFlashCall' => 'Sent code type flash call', + 'object_auth.sentCodeTypeFlashCall_param_pattern_type_string' => 'Pattern', + 'object_messages.botCallbackAnswer' => 'Bot callback answer', + 'object_messages.botCallbackAnswer_param_alert_type_true' => 'Alert?', + 'object_messages.botCallbackAnswer_param_has_url_type_true' => 'Has URL?', + 'object_messages.botCallbackAnswer_param_native_ui_type_true' => 'Native ui?', + 'object_messages.botCallbackAnswer_param_message_type_string' => 'Message', + 'object_messages.botCallbackAnswer_param_url_type_string' => 'URL', + 'object_messages.botCallbackAnswer_param_cache_time_type_int' => 'Cache time', + 'object_messages.messageEditData' => 'Message edit data', + 'object_messages.messageEditData_param_caption_type_true' => 'Caption?', + 'object_inputBotInlineMessageID' => 'Bot inline message ID', + 'object_inputBotInlineMessageID_param_dc_id_type_int' => 'DC ID', + 'object_inputBotInlineMessageID_param_id_type_long' => 'ID', + 'object_inputBotInlineMessageID_param_access_hash_type_long' => 'Access hash', + 'object_inlineBotSwitchPM' => 'Inline bot switch pm', + 'object_inlineBotSwitchPM_param_text_type_string' => 'Text', + 'object_inlineBotSwitchPM_param_start_param_type_string' => 'Start param', + 'object_messages.peerDialogs' => 'Peer dialogs', + 'object_messages.peerDialogs_param_dialogs_type_Vector t' => 'Dialogs', + 'object_messages.peerDialogs_param_messages_type_Vector t' => 'Messages', + 'object_messages.peerDialogs_param_chats_type_Vector t' => 'Chats', + 'object_messages.peerDialogs_param_users_type_Vector t' => 'Users', + 'object_messages.peerDialogs_param_state_type_updates.State' => 'State', + 'object_topPeer' => 'Top peer', + 'object_topPeer_param_peer_type_Peer' => 'Peer', + 'object_topPeer_param_rating_type_double' => 'Rating', + 'object_topPeerCategoryBotsPM' => 'Top peer category bots pm', + 'object_topPeerCategoryBotsInline' => 'Top peer category bots inline', + 'object_topPeerCategoryCorrespondents' => 'Top peer category correspondents', + 'object_topPeerCategoryGroups' => 'Top peer category groups', + 'object_topPeerCategoryChannels' => 'Top peer category channels', + 'object_topPeerCategoryPhoneCalls' => 'Top peer category phone calls', + 'object_topPeerCategoryPeers' => 'Top peer category peers', + 'object_topPeerCategoryPeers_param_category_type_TopPeerCategory' => 'Category', + 'object_topPeerCategoryPeers_param_count_type_int' => 'Count', + 'object_topPeerCategoryPeers_param_peers_type_Vector t' => 'Peers', + 'object_contacts.topPeersNotModified' => 'Top peers not modified', + 'object_contacts.topPeers' => 'Top peers', + 'object_contacts.topPeers_param_categories_type_Vector t' => 'Categories', + 'object_contacts.topPeers_param_chats_type_Vector t' => 'Chats', + 'object_contacts.topPeers_param_users_type_Vector t' => 'Users', + 'object_draftMessageEmpty' => 'Empty draft message', + 'object_draftMessage' => 'Draft message', + 'object_draftMessage_param_no_webpage_type_true' => 'No webpage?', + 'object_draftMessage_param_reply_to_msg_id_type_int' => 'Reply to msg ID', + 'object_draftMessage_param_message_type_string' => 'Message', + 'object_draftMessage_param_entities_type_Vector t' => 'Entities', + 'object_draftMessage_param_date_type_int' => 'Date', + 'object_messages.featuredStickersNotModified' => 'Featured stickers not modified', + 'object_messages.featuredStickers' => 'Featured stickers', + 'object_messages.featuredStickers_param_hash_type_int' => 'Hash', + 'object_messages.featuredStickers_param_sets_type_Vector t' => 'Sets', + 'object_messages.featuredStickers_param_unread_type_Vector t' => 'Unread', + 'object_messages.recentStickersNotModified' => 'Recent stickers not modified', + 'object_messages.recentStickers' => 'Recent stickers', + 'object_messages.recentStickers_param_hash_type_int' => 'Hash', + 'object_messages.recentStickers_param_stickers_type_Vector t' => 'Stickers', + 'object_messages.archivedStickers' => 'Archived stickers', + 'object_messages.archivedStickers_param_count_type_int' => 'Count', + 'object_messages.archivedStickers_param_sets_type_Vector t' => 'Sets', + 'object_messages.stickerSetInstallResultSuccess' => 'Sticker set install result success', + 'object_messages.stickerSetInstallResultArchive' => 'Sticker set install result archive', + 'object_messages.stickerSetInstallResultArchive_param_sets_type_Vector t' => 'Sets', + 'object_stickerSetCovered' => 'Sticker set covered', + 'object_stickerSetCovered_param_set_type_StickerSet' => 'Set', + 'object_stickerSetCovered_param_cover_type_Document' => 'Cover', + 'object_stickerSetMultiCovered' => 'Sticker set multi covered', + 'object_stickerSetMultiCovered_param_set_type_StickerSet' => 'Set', + 'object_stickerSetMultiCovered_param_covers_type_Vector t' => 'Covers', + 'object_maskCoords' => 'Mask coords', + 'object_maskCoords_param_n_type_int' => 'N', + 'object_maskCoords_param_x_type_double' => 'X', + 'object_maskCoords_param_y_type_double' => 'Y', + 'object_maskCoords_param_zoom_type_double' => 'Zoom', + 'object_inputStickeredMediaPhoto' => 'Stickered media photo', + 'object_inputStickeredMediaPhoto_param_id_type_InputPhoto' => 'ID', + 'object_inputStickeredMediaDocument' => 'Stickered media document', + 'object_inputStickeredMediaDocument_param_id_type_InputDocument' => 'ID', + 'object_game' => 'Game', + 'object_game_param_id_type_long' => 'ID', + 'object_game_param_access_hash_type_long' => 'Access hash', + 'object_game_param_short_name_type_string' => 'Short name', + 'object_game_param_title_type_string' => 'Title', + 'object_game_param_description_type_string' => 'Description', + 'object_game_param_photo_type_Photo' => 'Photo', + 'object_game_param_document_type_Document' => 'Document', + 'object_inputGameID' => 'Game ID', + 'object_inputGameID_param_id_type_long' => 'ID', + 'object_inputGameID_param_access_hash_type_long' => 'Access hash', + 'object_inputGameShortName' => 'Game short name', + 'object_inputGameShortName_param_bot_id_type_InputUser' => 'Bot ID', + 'object_inputGameShortName_param_short_name_type_string' => 'Short name', + 'object_highScore' => 'High score', + 'object_highScore_param_pos_type_int' => 'Pos', + 'object_highScore_param_user_id_type_int' => 'User ID', + 'object_highScore_param_score_type_int' => 'Score', + 'object_messages.highScores' => 'High scores', + 'object_messages.highScores_param_scores_type_Vector t' => 'Scores', + 'object_messages.highScores_param_users_type_Vector t' => 'Users', + 'object_textEmpty' => 'Empty text', + 'object_textPlain' => 'Text plain', + 'object_textPlain_param_text_type_string' => 'Text', + 'object_textBold' => 'Text bold', + 'object_textBold_param_text_type_RichText' => 'Text', + 'object_textItalic' => 'Text italic', + 'object_textItalic_param_text_type_RichText' => 'Text', + 'object_textUnderline' => 'Text underline', + 'object_textUnderline_param_text_type_RichText' => 'Text', + 'object_textStrike' => 'Text strike', + 'object_textStrike_param_text_type_RichText' => 'Text', + 'object_textFixed' => 'Text fixed', + 'object_textFixed_param_text_type_RichText' => 'Text', + 'object_textUrl' => 'Text URL', + 'object_textUrl_param_text_type_RichText' => 'Text', + 'object_textUrl_param_url_type_string' => 'URL', + 'object_textUrl_param_webpage_id_type_long' => 'Webpage ID', + 'object_textEmail' => 'Text email', + 'object_textEmail_param_text_type_RichText' => 'Text', + 'object_textEmail_param_email_type_string' => 'Email', + 'object_textConcat' => 'Text concat', + 'object_textConcat_param_texts_type_Vector t' => 'Texts', + 'object_pageBlockUnsupported' => 'Page block unsupported', + 'object_pageBlockTitle' => 'Page block title', + 'object_pageBlockTitle_param_text_type_RichText' => 'Text', + 'object_pageBlockSubtitle' => 'Page block subtitle', + 'object_pageBlockSubtitle_param_text_type_RichText' => 'Text', + 'object_pageBlockAuthorDate' => 'Page block author date', + 'object_pageBlockAuthorDate_param_author_type_RichText' => 'Author', + 'object_pageBlockAuthorDate_param_published_date_type_int' => 'Published date', + 'object_pageBlockHeader' => 'Page block header', + 'object_pageBlockHeader_param_text_type_RichText' => 'Text', + 'object_pageBlockSubheader' => 'Page block subheader', + 'object_pageBlockSubheader_param_text_type_RichText' => 'Text', + 'object_pageBlockFooter' => 'Page block footer', + 'object_pageBlockFooter_param_text_type_RichText' => 'Text', + 'object_pageBlockList' => 'Page block list', + 'object_pageBlockList_param_ordered_type_Bool' => 'Ordered?', + 'object_pageBlockList_param_items_type_Vector t' => 'Items', + 'object_pageBlockBlockquote' => 'Page block blockquote', + 'object_pageBlockBlockquote_param_text_type_RichText' => 'Text', + 'object_pageBlockBlockquote_param_caption_type_RichText' => 'Caption', + 'object_pageBlockPullquote' => 'Page block pullquote', + 'object_pageBlockPullquote_param_text_type_RichText' => 'Text', + 'object_pageBlockPullquote_param_caption_type_RichText' => 'Caption', + 'object_pageBlockPhoto' => 'Page block photo', + 'object_pageBlockPhoto_param_photo_id_type_long' => 'Photo ID', + 'object_pageBlockPhoto_param_caption_type_RichText' => 'Caption', + 'object_pageBlockVideo' => 'Page block video', + 'object_pageBlockVideo_param_autoplay_type_true' => 'Autoplay?', + 'object_pageBlockVideo_param_loop_type_true' => 'Loop?', + 'object_pageBlockVideo_param_video_id_type_long' => 'Video ID', + 'object_pageBlockVideo_param_caption_type_RichText' => 'Caption', + 'object_pageBlockEmbed' => 'Page block embed', + 'object_pageBlockEmbed_param_full_width_type_true' => 'Full width?', + 'object_pageBlockEmbed_param_allow_scrolling_type_true' => 'Allow scrolling?', + 'object_pageBlockEmbed_param_url_type_string' => 'URL', + 'object_pageBlockEmbed_param_html_type_string' => 'Html', + 'object_pageBlockEmbed_param_poster_photo_id_type_long' => 'Poster photo ID', + 'object_pageBlockEmbed_param_w_type_int' => 'Width', + 'object_pageBlockEmbed_param_h_type_int' => 'Height', + 'object_pageBlockEmbed_param_caption_type_RichText' => 'Caption', + 'object_pageBlockEmbedPost' => 'Page block embed post', + 'object_pageBlockEmbedPost_param_url_type_string' => 'URL', + 'object_pageBlockEmbedPost_param_webpage_id_type_long' => 'Webpage ID', + 'object_pageBlockEmbedPost_param_author_photo_id_type_long' => 'Author photo ID', + 'object_pageBlockEmbedPost_param_author_type_string' => 'Author', + 'object_pageBlockEmbedPost_param_date_type_int' => 'Date', + 'object_pageBlockEmbedPost_param_blocks_type_Vector t' => 'Blocks', + 'object_pageBlockEmbedPost_param_caption_type_RichText' => 'Caption', + 'object_pageBlockCollage' => 'Page block collage', + 'object_pageBlockCollage_param_items_type_Vector t' => 'Items', + 'object_pageBlockCollage_param_caption_type_RichText' => 'Caption', + 'object_pageBlockSlideshow' => 'Page block slideshow', + 'object_pageBlockSlideshow_param_items_type_Vector t' => 'Items', + 'object_pageBlockSlideshow_param_caption_type_RichText' => 'Caption', + 'object_pageBlockChannel' => 'Page block channel', + 'object_pageBlockChannel_param_channel_type_Chat' => 'Channel', + 'object_pageBlockAudio' => 'Page block audio', + 'object_pageBlockAudio_param_audio_id_type_long' => 'Audio ID', + 'object_pageBlockAudio_param_caption_type_RichText' => 'Caption', + 'object_pagePart' => 'Page part', + 'object_pagePart_param_blocks_type_Vector t' => 'Blocks', + 'object_pagePart_param_photos_type_Vector t' => 'Photos', + 'object_pagePart_param_documents_type_Vector t' => 'Documents', + 'object_pageFull' => 'Page full', + 'object_pageFull_param_blocks_type_Vector t' => 'Blocks', + 'object_pageFull_param_photos_type_Vector t' => 'Photos', + 'object_pageFull_param_documents_type_Vector t' => 'Documents', + 'object_phoneCallDiscardReasonMissed' => 'Phone call discard reason missed', + 'object_phoneCallDiscardReasonDisconnect' => 'Phone call discard reason disconnect', + 'object_phoneCallDiscardReasonHangup' => 'Phone call discard reason hangup', + 'object_phoneCallDiscardReasonBusy' => 'Phone call discard reason busy', + 'object_dataJSON' => 'Data json', + 'object_dataJSON_param_data_type_string' => 'Data', + 'object_labeledPrice' => 'Labeled price', + 'object_labeledPrice_param_label_type_string' => 'Label', + 'object_labeledPrice_param_amount_type_long' => 'Amount', + 'object_invoice' => 'Invoice', + 'object_invoice_param_test_type_true' => 'Test?', + 'object_invoice_param_name_requested_type_true' => 'Name requested?', + 'object_invoice_param_phone_requested_type_true' => 'Phone requested?', + 'object_invoice_param_email_requested_type_true' => 'Email requested?', + 'object_invoice_param_shipping_address_requested_type_true' => 'Shipping address requested?', + 'object_invoice_param_flexible_type_true' => 'Flexible?', + 'object_invoice_param_phone_to_provider_type_true' => 'Phone to provider?', + 'object_invoice_param_email_to_provider_type_true' => 'Email to provider?', + 'object_invoice_param_currency_type_string' => 'Currency', + 'object_invoice_param_prices_type_Vector t' => 'Prices', + 'object_paymentCharge' => 'Payment charge', + 'object_paymentCharge_param_id_type_string' => 'ID', + 'object_paymentCharge_param_provider_charge_id_type_string' => 'Provider charge ID', + 'object_postAddress' => 'Post address', + 'object_postAddress_param_street_line1_type_string' => 'Street line1', + 'object_postAddress_param_street_line2_type_string' => 'Street line2', + 'object_postAddress_param_city_type_string' => 'City', + 'object_postAddress_param_state_type_string' => 'State', + 'object_postAddress_param_country_iso2_type_string' => 'Country iso2', + 'object_postAddress_param_post_code_type_string' => 'Post code', + 'object_paymentRequestedInfo' => 'Payment requested info', + 'object_paymentRequestedInfo_param_name_type_string' => 'Name', + 'object_paymentRequestedInfo_param_phone_type_string' => 'Phone', + 'object_paymentRequestedInfo_param_email_type_string' => 'Email', + 'object_paymentRequestedInfo_param_shipping_address_type_PostAddress' => 'Shipping address', + 'object_paymentSavedCredentialsCard' => 'Payment saved credentials card', + 'object_paymentSavedCredentialsCard_param_id_type_string' => 'ID', + 'object_paymentSavedCredentialsCard_param_title_type_string' => 'Title', + 'object_webDocument' => 'Web document', + 'object_webDocument_param_url_type_string' => 'URL', + 'object_webDocument_param_access_hash_type_long' => 'Access hash', + 'object_webDocument_param_size_type_int' => 'Size', + 'object_webDocument_param_mime_type_type_string' => 'Mime type', + 'object_webDocument_param_attributes_type_Vector t' => 'Attributes', + 'object_webDocument_param_dc_id_type_int' => 'DC ID', + 'object_inputWebDocument' => 'Web document', + 'object_inputWebDocument_param_url_type_string' => 'URL', + 'object_inputWebDocument_param_size_type_int' => 'Size', + 'object_inputWebDocument_param_mime_type_type_string' => 'Mime type', + 'object_inputWebDocument_param_attributes_type_Vector t' => 'Attributes', + 'object_inputWebFileLocation' => 'Web file location', + 'object_inputWebFileLocation_param_url_type_string' => 'URL', + 'object_inputWebFileLocation_param_access_hash_type_long' => 'Access hash', + 'object_upload.webFile' => 'Web file', + 'object_upload.webFile_param_size_type_int' => 'Size', + 'object_upload.webFile_param_mime_type_type_string' => 'Mime type', + 'object_upload.webFile_param_file_type_type_storage.FileType' => 'File type', + 'object_upload.webFile_param_mtime_type_int' => 'Mtime', + 'object_upload.webFile_param_bytes_type_bytes' => 'Bytes', + 'object_payments.paymentForm' => 'Payment form', + 'object_payments.paymentForm_param_can_save_credentials_type_true' => 'Can save credentials?', + 'object_payments.paymentForm_param_password_missing_type_true' => 'Password missing?', + 'object_payments.paymentForm_param_bot_id_type_int' => 'Bot ID', + 'object_payments.paymentForm_param_invoice_type_Invoice' => 'Invoice', + 'object_payments.paymentForm_param_provider_id_type_int' => 'Provider ID', + 'object_payments.paymentForm_param_url_type_string' => 'URL', + 'object_payments.paymentForm_param_native_provider_type_string' => 'Native provider', + 'object_payments.paymentForm_param_native_params_type_DataJSON' => 'Native params', + 'object_payments.paymentForm_param_saved_info_type_PaymentRequestedInfo' => 'Saved info', + 'object_payments.paymentForm_param_saved_credentials_type_PaymentSavedCredentials' => 'Saved credentials', + 'object_payments.paymentForm_param_users_type_Vector t' => 'Users', + 'object_payments.validatedRequestedInfo' => 'Validated requested info', + 'object_payments.validatedRequestedInfo_param_id_type_string' => 'ID', + 'object_payments.validatedRequestedInfo_param_shipping_options_type_Vector t' => 'Shipping options', + 'object_payments.paymentResult' => 'Payment result', + 'object_payments.paymentResult_param_updates_type_Updates' => 'Updates', + 'object_payments.paymentVerficationNeeded' => 'Payment verfication needed', + 'object_payments.paymentVerficationNeeded_param_url_type_string' => 'URL', + 'object_payments.paymentReceipt' => 'Payment receipt', + 'object_payments.paymentReceipt_param_date_type_int' => 'Date', + 'object_payments.paymentReceipt_param_bot_id_type_int' => 'Bot ID', + 'object_payments.paymentReceipt_param_invoice_type_Invoice' => 'Invoice', + 'object_payments.paymentReceipt_param_provider_id_type_int' => 'Provider ID', + 'object_payments.paymentReceipt_param_info_type_PaymentRequestedInfo' => 'Info', + 'object_payments.paymentReceipt_param_shipping_type_ShippingOption' => 'Shipping', + 'object_payments.paymentReceipt_param_currency_type_string' => 'Currency', + 'object_payments.paymentReceipt_param_total_amount_type_long' => 'Total amount', + 'object_payments.paymentReceipt_param_credentials_title_type_string' => 'Credentials title', + 'object_payments.paymentReceipt_param_users_type_Vector t' => 'Users', + 'object_payments.savedInfo' => 'Saved info', + 'object_payments.savedInfo_param_has_saved_credentials_type_true' => 'Has saved credentials?', + 'object_payments.savedInfo_param_saved_info_type_PaymentRequestedInfo' => 'Saved info', + 'object_inputPaymentCredentialsSaved' => 'Payment credentials saved', + 'object_inputPaymentCredentialsSaved_param_id_type_string' => 'ID', + 'object_inputPaymentCredentialsSaved_param_tmp_password_type_bytes' => 'Tmp password', + 'object_inputPaymentCredentials' => 'Payment credentials', + 'object_inputPaymentCredentials_param_save_type_true' => 'Save?', + 'object_inputPaymentCredentials_param_data_type_DataJSON' => 'Data', + 'object_inputPaymentCredentialsApplePay' => 'Payment credentials apple pay', + 'object_inputPaymentCredentialsApplePay_param_payment_data_type_DataJSON' => 'Payment data', + 'object_inputPaymentCredentialsAndroidPay' => 'Payment credentials android pay', + 'object_inputPaymentCredentialsAndroidPay_param_payment_token_type_DataJSON' => 'Payment token', + 'object_inputPaymentCredentialsAndroidPay_param_google_transaction_id_type_string' => 'Google transaction ID', + 'object_account.tmpPassword' => 'Tmp password', + 'object_account.tmpPassword_param_tmp_password_type_bytes' => 'Tmp password', + 'object_account.tmpPassword_param_valid_until_type_int' => 'Valid until', + 'object_shippingOption' => 'Shipping option', + 'object_shippingOption_param_id_type_string' => 'ID', + 'object_shippingOption_param_title_type_string' => 'Title', + 'object_shippingOption_param_prices_type_Vector t' => 'Prices', + 'object_inputStickerSetItem' => 'Sticker set item', + 'object_inputStickerSetItem_param_document_type_InputDocument' => 'Document', + 'object_inputStickerSetItem_param_emoji_type_string' => 'Emoji', + 'object_inputStickerSetItem_param_mask_coords_type_MaskCoords' => 'Mask coords', + 'object_inputPhoneCall' => 'Phone call', + 'object_inputPhoneCall_param_id_type_long' => 'ID', + 'object_inputPhoneCall_param_access_hash_type_long' => 'Access hash', + 'object_phoneCallEmpty' => 'Empty phone call', + 'object_phoneCallEmpty_param_id_type_long' => 'ID', + 'object_phoneCallWaiting' => 'Phone call waiting', + 'object_phoneCallWaiting_param_id_type_long' => 'ID', + 'object_phoneCallWaiting_param_access_hash_type_long' => 'Access hash', + 'object_phoneCallWaiting_param_date_type_int' => 'Date', + 'object_phoneCallWaiting_param_admin_id_type_int' => 'Admin ID', + 'object_phoneCallWaiting_param_participant_id_type_int' => 'Participant ID', + 'object_phoneCallWaiting_param_protocol_type_PhoneCallProtocol' => 'Protocol', + 'object_phoneCallWaiting_param_receive_date_type_int' => 'Receive date', + 'object_phoneCallRequested' => 'Phone call requested', + 'object_phoneCallRequested_param_id_type_long' => 'ID', + 'object_phoneCallRequested_param_access_hash_type_long' => 'Access hash', + 'object_phoneCallRequested_param_date_type_int' => 'Date', + 'object_phoneCallRequested_param_admin_id_type_int' => 'Admin ID', + 'object_phoneCallRequested_param_participant_id_type_int' => 'Participant ID', + 'object_phoneCallRequested_param_g_a_hash_type_bytes' => 'G a hash', + 'object_phoneCallRequested_param_protocol_type_PhoneCallProtocol' => 'Protocol', + 'object_phoneCallAccepted' => 'Phone call accepted', + 'object_phoneCallAccepted_param_id_type_long' => 'ID', + 'object_phoneCallAccepted_param_access_hash_type_long' => 'Access hash', + 'object_phoneCallAccepted_param_date_type_int' => 'Date', + 'object_phoneCallAccepted_param_admin_id_type_int' => 'Admin ID', + 'object_phoneCallAccepted_param_participant_id_type_int' => 'Participant ID', + 'object_phoneCallAccepted_param_g_b_type_bytes' => 'G b', + 'object_phoneCallAccepted_param_protocol_type_PhoneCallProtocol' => 'Protocol', + 'object_phoneCall' => 'Phone call', + 'object_phoneCall_param_id_type_long' => 'ID', + 'object_phoneCall_param_access_hash_type_long' => 'Access hash', + 'object_phoneCall_param_date_type_int' => 'Date', + 'object_phoneCall_param_admin_id_type_int' => 'Admin ID', + 'object_phoneCall_param_participant_id_type_int' => 'Participant ID', + 'object_phoneCall_param_g_a_or_b_type_bytes' => 'G a or b', + 'object_phoneCall_param_key_fingerprint_type_long' => 'Key fingerprint', + 'object_phoneCall_param_protocol_type_PhoneCallProtocol' => 'Protocol', + 'object_phoneCall_param_connection_type_PhoneConnection' => 'Connection', + 'object_phoneCall_param_alternative_connections_type_Vector t' => 'Alternative connections', + 'object_phoneCall_param_start_date_type_int' => 'Start date', + 'object_phoneCallDiscarded' => 'Phone call discarded', + 'object_phoneCallDiscarded_param_need_rating_type_true' => 'Need rating?', + 'object_phoneCallDiscarded_param_need_debug_type_true' => 'Need debug?', + 'object_phoneCallDiscarded_param_id_type_long' => 'ID', + 'object_phoneCallDiscarded_param_reason_type_PhoneCallDiscardReason' => 'Reason', + 'object_phoneCallDiscarded_param_duration_type_int' => 'Duration', + 'object_phoneConnection' => 'Phone connection', + 'object_phoneConnection_param_id_type_long' => 'ID', + 'object_phoneConnection_param_ip_type_string' => 'Ip', + 'object_phoneConnection_param_ipv6_type_string' => 'Ipv6', + 'object_phoneConnection_param_port_type_int' => 'Port', + 'object_phoneConnection_param_peer_tag_type_bytes' => 'Peer tag', + 'object_phoneCallProtocol' => 'Phone call protocol', + 'object_phoneCallProtocol_param_udp_p2p_type_true' => 'Udp p2p?', + 'object_phoneCallProtocol_param_udp_reflector_type_true' => 'Udp reflector?', + 'object_phoneCallProtocol_param_min_layer_type_int' => 'Min layer', + 'object_phoneCallProtocol_param_max_layer_type_int' => 'Max layer', + 'object_phone.phoneCall' => 'Phone call', + 'object_phone.phoneCall_param_phone_call_type_PhoneCall' => 'Phone call', + 'object_phone.phoneCall_param_users_type_Vector t' => 'Users', + 'object_upload.cdnFileReuploadNeeded' => 'Cdn file reupload needed', + 'object_upload.cdnFileReuploadNeeded_param_request_token_type_bytes' => 'Request token', + 'object_upload.cdnFile' => 'Cdn file', + 'object_upload.cdnFile_param_bytes_type_bytes' => 'Bytes', + 'object_cdnPublicKey' => 'Cdn public key', + 'object_cdnPublicKey_param_dc_id_type_int' => 'DC ID', + 'object_cdnPublicKey_param_public_key_type_string' => 'Public key', + 'object_cdnConfig' => 'CDN configuration', + 'object_cdnConfig_param_public_keys_type_Vector t' => 'Public keys', + 'object_langPackString' => 'Lang pack string', + 'object_langPackString_param_key_type_string' => 'Key', + 'object_langPackString_param_value_type_string' => 'Value', + 'object_langPackStringPluralized' => 'Lang pack string pluralized', + 'object_langPackStringPluralized_param_key_type_string' => 'Key', + 'object_langPackStringPluralized_param_zero_value_type_string' => 'Zero value', + 'object_langPackStringPluralized_param_one_value_type_string' => 'One value', + 'object_langPackStringPluralized_param_two_value_type_string' => 'Two value', + 'object_langPackStringPluralized_param_few_value_type_string' => 'Few value', + 'object_langPackStringPluralized_param_many_value_type_string' => 'Many value', + 'object_langPackStringPluralized_param_other_value_type_string' => 'Other value', + 'object_langPackStringDeleted' => 'Lang pack string deleted', + 'object_langPackStringDeleted_param_key_type_string' => 'Key', + 'object_langPackDifference' => 'Lang pack difference', + 'object_langPackDifference_param_lang_code_type_string' => 'Lang code', + 'object_langPackDifference_param_from_version_type_int' => 'From version', + 'object_langPackDifference_param_version_type_int' => 'Version', + 'object_langPackDifference_param_strings_type_Vector t' => 'Strings', + 'object_langPackLanguage' => 'Lang pack language', + 'object_langPackLanguage_param_name_type_string' => 'Name', + 'object_langPackLanguage_param_native_name_type_string' => 'Native name', + 'object_langPackLanguage_param_lang_code_type_string' => 'Lang code', + 'object_channelAdminRights' => 'Admin rights', + 'object_channelAdminRights_param_change_info_type_true' => 'Change info', + 'object_channelAdminRights_param_post_messages_type_true' => 'Post messages', + 'object_channelAdminRights_param_edit_messages_type_true' => 'Edit messages', + 'object_channelAdminRights_param_delete_messages_type_true' => 'Delete messages', + 'object_channelAdminRights_param_ban_users_type_true' => 'Ban users', + 'object_channelAdminRights_param_invite_users_type_true' => 'Invite users', + 'object_channelAdminRights_param_invite_link_type_true' => 'Generate an invite link', + 'object_channelAdminRights_param_pin_messages_type_true' => 'Pin messages', + 'object_channelAdminRights_param_add_admins_type_true' => 'Add other admins', + 'object_channelBannedRights' => 'Banned user rights (when true, the user will NOT be able to do that thing)', + 'object_channelBannedRights_param_view_messages_type_true' => 'Disallow viewing messages', + 'object_channelBannedRights_param_send_messages_type_true' => 'Disallow sending messages', + 'object_channelBannedRights_param_send_media_type_true' => 'Disallow sending media', + 'object_channelBannedRights_param_send_stickers_type_true' => 'Disallow sending stickers', + 'object_channelBannedRights_param_send_gifs_type_true' => 'Disallow sending gifs', + 'object_channelBannedRights_param_send_games_type_true' => 'Disallow sending games', + 'object_channelBannedRights_param_send_inline_type_true' => 'Disallow sending inline keyboards', + 'object_channelBannedRights_param_embed_links_type_true' => 'Disallow embedding links', + 'object_channelBannedRights_param_until_date_type_int' => 'Until date', + 'object_channelAdminLogEventActionChangeTitle' => 'Change title', + 'object_channelAdminLogEventActionChangeTitle_param_prev_value_type_string' => 'Previous value', + 'object_channelAdminLogEventActionChangeTitle_param_new_value_type_string' => 'New value', + 'object_channelAdminLogEventActionChangeAbout' => 'Change about text', + 'object_channelAdminLogEventActionChangeAbout_param_prev_value_type_string' => 'Previous value', + 'object_channelAdminLogEventActionChangeAbout_param_new_value_type_string' => 'New value', + 'object_channelAdminLogEventActionChangeUsername' => 'Change username', + 'object_channelAdminLogEventActionChangeUsername_param_prev_value_type_string' => 'Prev value', + 'object_channelAdminLogEventActionChangeUsername_param_new_value_type_string' => 'New value', + 'object_channelAdminLogEventActionChangePhoto' => 'Change photo', + 'object_channelAdminLogEventActionChangePhoto_param_prev_photo_type_ChatPhoto' => 'Previous photo', + 'object_channelAdminLogEventActionChangePhoto_param_new_photo_type_ChatPhoto' => 'New photo', + 'object_channelAdminLogEventActionToggleInvites' => 'Invite setting toggled', + 'object_channelAdminLogEventActionToggleInvites_param_new_value_type_Bool' => 'New value', + 'object_channelAdminLogEventActionToggleSignatures' => 'Toggle channel signatures', + 'object_channelAdminLogEventActionToggleSignatures_param_new_value_type_Bool' => 'New value?', + 'object_channelAdminLogEventActionUpdatePinned' => 'Message pinned', + 'object_channelAdminLogEventActionUpdatePinned_param_message_type_Message' => 'Message', + 'object_channelAdminLogEventActionEditMessage' => 'Edit message', + 'object_channelAdminLogEventActionEditMessage_param_prev_message_type_Message' => 'Prev message', + 'object_channelAdminLogEventActionEditMessage_param_new_message_type_Message' => 'New message', + 'object_channelAdminLogEventActionDeleteMessage' => 'Delete message', + 'object_channelAdminLogEventActionDeleteMessage_param_message_type_Message' => 'Message', + 'object_channelAdminLogEventActionParticipantJoin' => 'Joined participant', + 'object_channelAdminLogEventActionParticipantLeave' => 'Left participant', + 'object_channelAdminLogEventActionParticipantInvite' => 'Invite participant', + 'object_channelAdminLogEventActionParticipantInvite_param_participant_type_ChannelParticipant' => 'Participant', + 'object_channelAdminLogEventActionParticipantToggleBan' => 'User banned', + 'object_channelAdminLogEventActionParticipantToggleBan_param_prev_participant_type_ChannelParticipant' => 'Prev participant', + 'object_channelAdminLogEventActionParticipantToggleBan_param_new_participant_type_ChannelParticipant' => 'New participant', + 'object_channelAdminLogEventActionParticipantToggleAdmin' => 'Admin toggled', + 'object_channelAdminLogEventActionParticipantToggleAdmin_param_prev_participant_type_ChannelParticipant' => 'Prev participant', + 'object_channelAdminLogEventActionParticipantToggleAdmin_param_new_participant_type_ChannelParticipant' => 'New participant', + 'object_channelAdminLogEventActionChangeStickerSet' => 'Change stickerset', + 'object_channelAdminLogEventActionChangeStickerSet_param_prev_stickerset_type_InputStickerSet' => 'Previous stickerset', + 'object_channelAdminLogEventActionChangeStickerSet_param_new_stickerset_type_InputStickerSet' => 'New stickerset', + 'object_channelAdminLogEventActionTogglePreHistoryHidden' => 'Previous history hidden', + 'object_channelAdminLogEventActionTogglePreHistoryHidden_param_new_value_type_Bool' => 'New value', + 'object_channelAdminLogEvent' => 'Channel admin log event', + 'object_channelAdminLogEvent_param_id_type_long' => 'ID', + 'object_channelAdminLogEvent_param_date_type_int' => 'Date', + 'object_channelAdminLogEvent_param_user_id_type_int' => 'User ID', + 'object_channelAdminLogEvent_param_action_type_ChannelAdminLogEventAction' => 'Action', + 'object_channels.adminLogResults' => 'Admin log results', + 'object_channels.adminLogResults_param_events_type_Vector t' => 'Events', + 'object_channels.adminLogResults_param_chats_type_Vector t' => 'Chats', + 'object_channels.adminLogResults_param_users_type_Vector t' => 'Users', + 'object_channelAdminLogEventsFilter' => 'Event filter', + 'object_channelAdminLogEventsFilter_param_join_type_true' => 'Join users events', + 'object_channelAdminLogEventsFilter_param_leave_type_true' => 'Left users events', + 'object_channelAdminLogEventsFilter_param_invite_type_true' => 'Invite users events', + 'object_channelAdminLogEventsFilter_param_ban_type_true' => 'Ban events', + 'object_channelAdminLogEventsFilter_param_unban_type_true' => 'Unban events', + 'object_channelAdminLogEventsFilter_param_kick_type_true' => 'Kicked users events', + 'object_channelAdminLogEventsFilter_param_unkick_type_true' => 'Unkick events', + 'object_channelAdminLogEventsFilter_param_promote_type_true' => 'Admin promotion events', + 'object_channelAdminLogEventsFilter_param_demote_type_true' => 'Demote admin events', + 'object_channelAdminLogEventsFilter_param_info_type_true' => 'Change info events', + 'object_channelAdminLogEventsFilter_param_settings_type_true' => 'Setting changes', + 'object_channelAdminLogEventsFilter_param_pinned_type_true' => 'Pinned message events', + 'object_channelAdminLogEventsFilter_param_edit_type_true' => 'Edit message events', + 'object_channelAdminLogEventsFilter_param_delete_type_true' => 'Delete message events', + 'object_popularContact' => 'Popular contact', + 'object_popularContact_param_client_id_type_long' => 'Client ID', + 'object_popularContact_param_importers_type_int' => 'Importers', + 'object_cdnFileHash' => 'CDN file hash', + 'object_cdnFileHash_param_offset_type_int' => 'Offset', + 'object_cdnFileHash_param_limit_type_int' => 'Limit', + 'object_cdnFileHash_param_hash_type_bytes' => 'Hash', + 'object_messages.favedStickersNotModified' => 'Faved stickers not modified', + 'object_messages.favedStickers' => 'Faved stickers', + 'object_messages.favedStickers_param_hash_type_int' => 'Hash', + 'object_messages.favedStickers_param_packs_type_Vector t' => 'Packs', + 'object_messages.favedStickers_param_stickers_type_Vector t' => 'Stickers', + 'object_recentMeUrlUnknown' => 'Recent me URL unknown', + 'object_recentMeUrlUnknown_param_url_type_string' => 'URL', + 'object_recentMeUrlUser' => 'Recent me URL user', + 'object_recentMeUrlUser_param_url_type_string' => 'URL', + 'object_recentMeUrlUser_param_user_id_type_int' => 'User ID', + 'object_recentMeUrlChat' => 'Recent me URL chat', + 'object_recentMeUrlChat_param_url_type_string' => 'URL', + 'object_recentMeUrlChat_param_chat_id_type_int' => 'Chat ID', + 'object_recentMeUrlChatInvite' => 'Recent me URL chat invite', + 'object_recentMeUrlChatInvite_param_url_type_string' => 'URL', + 'object_recentMeUrlChatInvite_param_chat_invite_type_ChatInvite' => 'Chat invite', + 'object_recentMeUrlStickerSet' => 'Recent me URL sticker set', + 'object_recentMeUrlStickerSet_param_url_type_string' => 'URL', + 'object_recentMeUrlStickerSet_param_set_type_StickerSetCovered' => 'Set', + 'object_help.recentMeUrls' => 'Recent me URLs', + 'object_help.recentMeUrls_param_urls_type_Vector t' => 'URLs', + 'object_help.recentMeUrls_param_chats_type_Vector t' => 'Chats', + 'object_help.recentMeUrls_param_users_type_Vector t' => 'Users', + 'object_inputSingleMedia' => 'Single media', + 'object_inputSingleMedia_param_media_type_InputMedia' => 'Media', + 'object_inputSingleMedia_param_message_type_string' => 'Message', + 'object_inputSingleMedia_param_entities_type_Vector t' => 'Entities', + 'object_webAuthorization' => 'Web authorization', + 'object_webAuthorization_param_hash_type_long' => 'Hash', + 'object_webAuthorization_param_bot_id_type_int' => 'Bot ID', + 'object_webAuthorization_param_domain_type_string' => 'Domain', + 'object_webAuthorization_param_browser_type_string' => 'Browser', + 'object_webAuthorization_param_platform_type_string' => 'Platform', + 'object_webAuthorization_param_date_created_type_int' => 'Date created', + 'object_webAuthorization_param_date_active_type_int' => 'Date active', + 'object_webAuthorization_param_ip_type_string' => 'Ip', + 'object_webAuthorization_param_region_type_string' => 'Region', + 'object_account.webAuthorizations' => 'Telegram login authorizations', + 'object_account.webAuthorizations_param_authorizations_type_Vector t' => 'Authorizations', + 'object_account.webAuthorizations_param_users_type_Vector t' => 'Users', + 'object_inputMessageID' => 'Message ID', + 'object_inputMessageID_param_id_type_int' => 'ID', + 'object_inputMessageReplyTo' => 'Message reply to', + 'object_inputMessageReplyTo_param_id_type_int' => 'ID', + 'object_inputMessagePinned' => 'Message pinned', + 'object_decryptedDataBlock' => 'Decrypted data block', + 'object_decryptedDataBlock_param_voice_call_id_type_int128' => 'Voice call ID', + 'object_decryptedDataBlock_param_in_seq_no_type_int' => 'In seq no', + 'object_decryptedDataBlock_param_out_seq_no_type_int' => 'Out seq no', + 'object_decryptedDataBlock_param_recent_received_mask_type_int' => 'Recent received mask', + 'object_decryptedDataBlock_param_proto_type_int' => 'Proto', + 'object_decryptedDataBlock_param_extra_type_string' => 'Extra', + 'object_decryptedDataBlock_param_raw_data_type_string' => 'Raw data', + 'object_simpleDataBlock' => 'Simple data block', + 'object_simpleDataBlock_param_raw_data_type_string' => 'Raw data', + 'object_decryptedMessage' => 'Decrypted message', + 'object_decryptedMessage_param_message_type_string' => 'Message', + 'object_decryptedMessage_param_media_type_DecryptedMessageMedia' => 'Media', + 'object_decryptedMessageService' => 'Decrypted message service', + 'object_decryptedMessageService_param_action_type_DecryptedMessageAction' => 'Action', + 'object_decryptedMessageMediaEmpty' => 'Empty decrypted message media', + 'object_decryptedMessageMediaPhoto' => 'Decrypted message media photo', + 'object_decryptedMessageMediaPhoto_param_thumb_type_bytes' => 'Thumbnail', + 'object_decryptedMessageMediaPhoto_param_thumb_w_type_int' => 'Thumbnail width', + 'object_decryptedMessageMediaPhoto_param_thumb_h_type_int' => 'Thumbnail height', + 'object_decryptedMessageMediaPhoto_param_w_type_int' => 'Width', + 'object_decryptedMessageMediaPhoto_param_h_type_int' => 'Height', + 'object_decryptedMessageMediaPhoto_param_size_type_int' => 'Size', + 'object_decryptedMessageMediaPhoto_param_key_type_bytes' => 'Key', + 'object_decryptedMessageMediaPhoto_param_iv_type_bytes' => 'Iv', + 'object_decryptedMessageMediaVideo' => 'Decrypted message media video', + 'object_decryptedMessageMediaVideo_param_thumb_type_bytes' => 'Thumbnail', + 'object_decryptedMessageMediaVideo_param_thumb_w_type_int' => 'Thumbnail width', + 'object_decryptedMessageMediaVideo_param_thumb_h_type_int' => 'Thumbnail height', + 'object_decryptedMessageMediaVideo_param_duration_type_int' => 'Duration', + 'object_decryptedMessageMediaVideo_param_w_type_int' => 'Width', + 'object_decryptedMessageMediaVideo_param_h_type_int' => 'Height', + 'object_decryptedMessageMediaVideo_param_size_type_int' => 'Size', + 'object_decryptedMessageMediaVideo_param_key_type_bytes' => 'Key', + 'object_decryptedMessageMediaVideo_param_iv_type_bytes' => 'Iv', + 'object_decryptedMessageMediaGeoPoint' => 'Decrypted message media geo point', + 'object_decryptedMessageMediaGeoPoint_param_lat_type_double' => 'Lat', + 'object_decryptedMessageMediaGeoPoint_param_long_type_double' => 'Long', + 'object_decryptedMessageMediaContact' => 'Decrypted message media contact', + 'object_decryptedMessageMediaContact_param_phone_number_type_string' => 'Phone number', + 'object_decryptedMessageMediaContact_param_first_name_type_string' => 'First name', + 'object_decryptedMessageMediaContact_param_last_name_type_string' => 'Last name', + 'object_decryptedMessageMediaContact_param_user_id_type_int' => 'User ID', + 'object_decryptedMessageActionSetMessageTTL' => 'Decrypted message action set message ttl', + 'object_decryptedMessageActionSetMessageTTL_param_ttl_seconds_type_int' => 'Ttl seconds', + 'object_decryptedMessageMediaDocument' => 'Decrypted message media document', + 'object_decryptedMessageMediaDocument_param_thumb_type_bytes' => 'Thumbnail', + 'object_decryptedMessageMediaDocument_param_thumb_w_type_int' => 'Thumbnail w', + 'object_decryptedMessageMediaDocument_param_thumb_h_type_int' => 'Thumbnail h', + 'object_decryptedMessageMediaDocument_param_file_name_type_string' => 'File name', + 'object_decryptedMessageMediaDocument_param_mime_type_type_string' => 'Mime type', + 'object_decryptedMessageMediaDocument_param_size_type_int' => 'Size', + 'object_decryptedMessageMediaDocument_param_key_type_bytes' => 'Key', + 'object_decryptedMessageMediaDocument_param_iv_type_bytes' => 'Iv', + 'object_decryptedMessageMediaAudio' => 'Decrypted message media audio', + 'object_decryptedMessageMediaAudio_param_duration_type_int' => 'Duration', + 'object_decryptedMessageMediaAudio_param_size_type_int' => 'Size', + 'object_decryptedMessageMediaAudio_param_key_type_bytes' => 'Key', + 'object_decryptedMessageMediaAudio_param_iv_type_bytes' => 'Iv', + 'object_decryptedMessageActionReadMessages' => 'Decrypted message action read messages', + 'object_decryptedMessageActionReadMessages_param_random_ids_type_Vector t' => 'Random IDs', + 'object_decryptedMessageActionDeleteMessages' => 'Decrypted message action delete messages', + 'object_decryptedMessageActionDeleteMessages_param_random_ids_type_Vector t' => 'Random IDs', + 'object_decryptedMessageActionScreenshotMessages' => 'Decrypted message action screenshot messages', + 'object_decryptedMessageActionScreenshotMessages_param_random_ids_type_Vector t' => 'Random IDs', + 'object_decryptedMessageActionFlushHistory' => 'Decrypted message action flush history', + 'object_decryptedMessage_param_ttl_type_int' => 'Ttl', + 'object_decryptedMessageMediaVideo_param_mime_type_type_string' => 'Mime type', + 'object_decryptedMessageMediaAudio_param_mime_type_type_string' => 'Mime type', + 'object_decryptedMessageLayer' => 'Decrypted message layer', + 'object_decryptedMessageLayer_param_layer_type_int' => 'Layer', + 'object_decryptedMessageLayer_param_in_seq_no_type_int' => 'In seq no', + 'object_decryptedMessageLayer_param_out_seq_no_type_int' => 'Out seq no', + 'object_decryptedMessageLayer_param_message_type_DecryptedMessage' => 'Message', + 'object_decryptedMessageActionResend' => 'Decrypted message action resend', + 'object_decryptedMessageActionResend_param_start_seq_no_type_int' => 'Start seq no', + 'object_decryptedMessageActionResend_param_end_seq_no_type_int' => 'End seq no', + 'object_decryptedMessageActionNotifyLayer' => 'Decrypted message action notify layer', + 'object_decryptedMessageActionNotifyLayer_param_layer_type_int' => 'Layer', + 'object_decryptedMessageActionTyping' => 'Decrypted message action typing', + 'object_decryptedMessageActionTyping_param_action_type_SendMessageAction' => 'Action', + 'object_decryptedMessageActionRequestKey' => 'Decrypted message action request key', + 'object_decryptedMessageActionRequestKey_param_exchange_id_type_long' => 'Exchange ID', + 'object_decryptedMessageActionRequestKey_param_g_a_type_bytes' => 'G a', + 'object_decryptedMessageActionAcceptKey' => 'Decrypted message action accept key', + 'object_decryptedMessageActionAcceptKey_param_exchange_id_type_long' => 'Exchange ID', + 'object_decryptedMessageActionAcceptKey_param_g_b_type_bytes' => 'G b', + 'object_decryptedMessageActionAcceptKey_param_key_fingerprint_type_long' => 'Key fingerprint', + 'object_decryptedMessageActionAbortKey' => 'Decrypted message action abort key', + 'object_decryptedMessageActionAbortKey_param_exchange_id_type_long' => 'Exchange ID', + 'object_decryptedMessageActionCommitKey' => 'Decrypted message action commit key', + 'object_decryptedMessageActionCommitKey_param_exchange_id_type_long' => 'Exchange ID', + 'object_decryptedMessageActionCommitKey_param_key_fingerprint_type_long' => 'Key fingerprint', + 'object_decryptedMessageActionNoop' => 'Decrypted message action noop', + 'object_decryptedMessageMediaExternalDocument' => 'Decrypted message media external document', + 'object_decryptedMessageMediaExternalDocument_param_id_type_long' => 'ID', + 'object_decryptedMessageMediaExternalDocument_param_access_hash_type_long' => 'Access hash', + 'object_decryptedMessageMediaExternalDocument_param_date_type_int' => 'Date', + 'object_decryptedMessageMediaExternalDocument_param_mime_type_type_string' => 'Mime type', + 'object_decryptedMessageMediaExternalDocument_param_size_type_int' => 'Size', + 'object_decryptedMessageMediaExternalDocument_param_thumb_type_PhotoSize' => 'Thumbnail', + 'object_decryptedMessageMediaExternalDocument_param_dc_id_type_int' => 'DC ID', + 'object_decryptedMessageMediaExternalDocument_param_attributes_type_Vector t' => 'Attributes', + 'object_decryptedMessage_param_entities_type_Vector t' => 'Entities', + 'object_decryptedMessage_param_via_bot_name_type_string' => 'Via bot name', + 'object_decryptedMessage_param_reply_to_random_id_type_long' => 'Reply to random ID', + 'object_decryptedMessageMediaPhoto_param_caption_type_string' => 'Caption', + 'object_decryptedMessageMediaVideo_param_caption_type_string' => 'Caption', + 'object_decryptedMessageMediaDocument_param_attributes_type_Vector t' => 'Attributes', + 'object_decryptedMessageMediaDocument_param_caption_type_string' => 'Caption', + 'object_decryptedMessageMediaVenue' => 'Decrypted message media venue', + 'object_decryptedMessageMediaVenue_param_lat_type_double' => 'Lat', + 'object_decryptedMessageMediaVenue_param_long_type_double' => 'Long', + 'object_decryptedMessageMediaVenue_param_title_type_string' => 'Title', + 'object_decryptedMessageMediaVenue_param_address_type_string' => 'Address', + 'object_decryptedMessageMediaVenue_param_provider_type_string' => 'Provider', + 'object_decryptedMessageMediaVenue_param_venue_id_type_string' => 'Venue ID', + 'object_decryptedMessageMediaWebPage' => 'Decrypted message media web page', + 'object_decryptedMessageMediaWebPage_param_url_type_string' => 'URL', + 'object_decryptedMessage_param_grouped_id_type_long' => 'Grouped ID', + 'object_inputPeerContact' => 'Peer contact', + 'object_inputPeerContact_param_user_id_type_int' => 'User ID', + 'object_inputPeerForeign' => 'Peer foreign', + 'object_inputPeerForeign_param_user_id_type_int' => 'User ID', + 'object_inputPeerForeign_param_access_hash_type_long' => 'Access hash', + 'object_inputUserContact' => 'User contact', + 'object_inputUserContact_param_user_id_type_int' => 'User ID', + 'object_inputUserForeign' => 'User foreign', + 'object_inputUserForeign_param_user_id_type_int' => 'User ID', + 'object_inputUserForeign_param_access_hash_type_long' => 'Access hash', + 'object_inputMediaUploadedVideo' => 'Media uploaded video', + 'object_inputMediaUploadedVideo_param_file_type_InputFile' => 'File', + 'object_inputMediaUploadedVideo_param_duration_type_int' => 'Duration', + 'object_inputMediaUploadedVideo_param_w_type_int' => 'Width', + 'object_inputMediaUploadedVideo_param_h_type_int' => 'Height', + 'object_inputMediaUploadedVideo_param_mime_type_type_string' => 'Mime type', + 'object_inputMediaUploadedThumbVideo' => 'Media uploaded thumb video', + 'object_inputMediaUploadedThumbVideo_param_file_type_InputFile' => 'File', + 'object_inputMediaUploadedThumbVideo_param_thumb_type_InputFile' => 'Thumbnail', + 'object_inputMediaUploadedThumbVideo_param_duration_type_int' => 'Duration', + 'object_inputMediaUploadedThumbVideo_param_w_type_int' => 'Width', + 'object_inputMediaUploadedThumbVideo_param_h_type_int' => 'Height', + 'object_inputMediaUploadedThumbVideo_param_mime_type_type_string' => 'Mime type', + 'object_inputMediaVideo' => 'Media video', + 'object_inputMediaVideo_param_id_type_InputVideo' => 'ID', + 'object_inputChatUploadedPhoto_param_crop_type_InputPhotoCrop' => 'Crop', + 'object_inputChatPhoto_param_crop_type_InputPhotoCrop' => 'Crop', + 'object_inputVideoEmpty' => 'Empty input video', + 'object_inputVideo' => 'Video', + 'object_inputVideo_param_id_type_long' => 'ID', + 'object_inputVideo_param_access_hash_type_long' => 'Access hash', + 'object_inputVideoFileLocation' => 'Video file location', + 'object_inputVideoFileLocation_param_id_type_long' => 'ID', + 'object_inputVideoFileLocation_param_access_hash_type_long' => 'Access hash', + 'object_inputPhotoCropAuto' => 'Photo crop auto', + 'object_inputPhotoCrop' => 'Photo crop', + 'object_inputPhotoCrop_param_crop_left_type_double' => 'Crop left', + 'object_inputPhotoCrop_param_crop_top_type_double' => 'Crop top', + 'object_inputPhotoCrop_param_crop_width_type_double' => 'Crop width', + 'object_userSelf' => 'User self', + 'object_userSelf_param_id_type_int' => 'ID', + 'object_userSelf_param_first_name_type_string' => 'First name', + 'object_userSelf_param_last_name_type_string' => 'Last name', + 'object_userSelf_param_username_type_string' => 'Username', + 'object_userSelf_param_phone_type_string' => 'Phone', + 'object_userSelf_param_photo_type_UserProfilePhoto' => 'Photo', + 'object_userSelf_param_status_type_UserStatus' => 'Status', + 'object_userSelf_param_inactive_type_Bool' => 'Inactive?', + 'object_userContact' => 'User contact', + 'object_userContact_param_id_type_int' => 'ID', + 'object_userContact_param_first_name_type_string' => 'First name', + 'object_userContact_param_last_name_type_string' => 'Last name', + 'object_userContact_param_username_type_string' => 'Username', + 'object_userContact_param_access_hash_type_long' => 'Access hash', + 'object_userContact_param_phone_type_string' => 'Phone', + 'object_userContact_param_photo_type_UserProfilePhoto' => 'Photo', + 'object_userContact_param_status_type_UserStatus' => 'Status', + 'object_userRequest' => 'User request', + 'object_userRequest_param_id_type_int' => 'ID', + 'object_userRequest_param_first_name_type_string' => 'First name', + 'object_userRequest_param_last_name_type_string' => 'Last name', + 'object_userRequest_param_username_type_string' => 'Username', + 'object_userRequest_param_access_hash_type_long' => 'Access hash', + 'object_userRequest_param_phone_type_string' => 'Phone', + 'object_userRequest_param_photo_type_UserProfilePhoto' => 'Photo', + 'object_userRequest_param_status_type_UserStatus' => 'Status', + 'object_userForeign' => 'User foreign', + 'object_userForeign_param_id_type_int' => 'ID', + 'object_userForeign_param_first_name_type_string' => 'First name', + 'object_userForeign_param_last_name_type_string' => 'Last name', + 'object_userForeign_param_username_type_string' => 'Username', + 'object_userForeign_param_access_hash_type_long' => 'Access hash', + 'object_userForeign_param_photo_type_UserProfilePhoto' => 'Photo', + 'object_userForeign_param_status_type_UserStatus' => 'Status', + 'object_userDeleted' => 'User deleted', + 'object_userDeleted_param_id_type_int' => 'ID', + 'object_userDeleted_param_first_name_type_string' => 'First name', + 'object_userDeleted_param_last_name_type_string' => 'Last name', + 'object_userDeleted_param_username_type_string' => 'Username', + 'object_userStatusEmpty' => 'Empty user status', + 'object_userStatusOnline' => 'User status online', + 'object_userStatusOnline_param_expires_type_int' => 'Expires', + 'object_userStatusOffline' => 'User status offline', + 'object_userStatusOffline_param_was_online_type_int' => 'Was online', + 'object_chat_param_left_type_Bool' => 'Left?', + 'object_chatForbidden_param_date_type_int' => 'Date', + 'object_chatParticipants_param_admin_id_type_int' => 'Admin ID', + 'object_messageForwarded' => 'Message forwarded', + 'object_messageForwarded_param_id_type_int' => 'ID', + 'object_messageForwarded_param_fwd_from_id_type_int' => 'Forwarded from ID', + 'object_messageForwarded_param_fwd_date_type_int' => 'Forwarded date', + 'object_messageForwarded_param_from_id_type_int' => 'From ID', + 'object_messageForwarded_param_to_id_type_Peer' => 'To ID', + 'object_messageForwarded_param_date_type_int' => 'Date', + 'object_messageForwarded_param_message_type_string' => 'Message', + 'object_messageForwarded_param_media_type_MessageMedia' => 'Media', + 'object_messageMediaVideo' => 'Message media video', + 'object_messageMediaVideo_param_video_type_Video' => 'Video', + 'object_messageMediaUnsupported_param_bytes_type_bytes' => 'Bytes', + 'object_messageActionChatAddUser_param_user_id_type_int' => 'User ID', + 'object_photo_param_user_id_type_int' => 'User ID', + 'object_photo_param_caption_type_string' => 'Caption', + 'object_photo_param_geo_type_GeoPoint' => 'Geo', + 'object_videoEmpty' => 'Empty video', + 'object_videoEmpty_param_id_type_long' => 'ID', + 'object_video' => 'Video', + 'object_video_param_id_type_long' => 'ID', + 'object_video_param_access_hash_type_long' => 'Access hash', + 'object_video_param_user_id_type_int' => 'User ID', + 'object_video_param_date_type_int' => 'Date', + 'object_video_param_caption_type_string' => 'Caption', + 'object_video_param_duration_type_int' => 'Duration', + 'object_video_param_mime_type_type_string' => 'Mime type', + 'object_video_param_size_type_int' => 'Size', + 'object_video_param_thumb_type_PhotoSize' => 'Thumbnail', + 'object_video_param_dc_id_type_int' => 'DC ID', + 'object_video_param_w_type_int' => 'Width', + 'object_video_param_h_type_int' => 'Height', + 'object_auth.checkedPhone_param_phone_invited_type_Bool' => 'Phone invited?', + 'object_auth.sentCode_param_phone_registered_type_Bool' => 'Phone registered?', + 'object_auth.sentCode_param_send_call_timeout_type_int' => 'Send call timeout', + 'object_auth.sentCode_param_is_password_type_Bool' => 'Is password?', + 'object_auth.authorization_param_expires_type_int' => 'Expiration date', + 'object_inputPeerNotifySettings_param_show_previews_type_Bool' => 'Show previews?', + 'object_inputPeerNotifySettings_param_events_mask_type_int' => 'Events mask', + 'object_peerNotifySettings_param_show_previews_type_Bool' => 'Show previews?', + 'object_peerNotifySettings_param_events_mask_type_int' => 'Events mask', + 'object_userFull_param_blocked_type_Bool' => 'Blocked?', + 'object_userFull_param_real_first_name_type_string' => 'Real first name', + 'object_userFull_param_real_last_name_type_string' => 'Real last name', + 'object_contactSuggested' => 'Contact suggested', + 'object_contactSuggested_param_user_id_type_int' => 'User ID', + 'object_contactSuggested_param_mutual_contacts_type_int' => 'Mutual contacts', + 'object_contactStatus_param_expires_type_int' => 'Expires', + 'object_contacts.foreignLinkUnknown' => 'Foreign link unknown', + 'object_contacts.foreignLinkRequested' => 'Foreign link requested', + 'object_contacts.foreignLinkRequested_param_has_phone_type_Bool' => 'Has phone?', + 'object_contacts.foreignLinkMutual' => 'Foreign link mutual', + 'object_contacts.myLinkEmpty' => 'Empty my link', + 'object_contacts.myLinkRequested' => 'My link requested', + 'object_contacts.myLinkRequested_param_contact_type_Bool' => 'Contact?', + 'object_contacts.myLinkContact' => 'My link contact', + 'object_contacts.link_param_my_link_type_contacts.MyLink' => 'My link', + 'object_contacts.link_param_foreign_link_type_contacts.ForeignLink' => 'Foreign link', + 'object_contacts.suggested' => 'Suggested', + 'object_contacts.suggested_param_results_type_Vector t' => 'Results', + 'object_contacts.suggested_param_users_type_Vector t' => 'Users', + 'object_messages.statedMessages' => 'Stated messages', + 'object_messages.statedMessages_param_messages_type_Vector t' => 'Messages', + 'object_messages.statedMessages_param_chats_type_Vector t' => 'Chats', + 'object_messages.statedMessages_param_users_type_Vector t' => 'Users', + 'object_messages.statedMessages_param_pts_type_int' => 'Pts', + 'object_messages.statedMessages_param_seq_type_int' => 'Seq', + 'object_messages.statedMessage' => 'Stated message', + 'object_messages.statedMessage_param_message_type_Message' => 'Message', + 'object_messages.statedMessage_param_chats_type_Vector t' => 'Chats', + 'object_messages.statedMessage_param_users_type_Vector t' => 'Users', + 'object_messages.statedMessage_param_pts_type_int' => 'Pts', + 'object_messages.statedMessage_param_seq_type_int' => 'Seq', + 'object_messages.sentMessage' => 'Sent message', + 'object_messages.sentMessage_param_id_type_int' => 'ID', + 'object_messages.sentMessage_param_date_type_int' => 'Date', + 'object_messages.sentMessage_param_pts_type_int' => 'Pts', + 'object_messages.sentMessage_param_seq_type_int' => 'Seq', + 'object_messages.chats_param_users_type_Vector t' => 'Users', + 'object_messages.affectedHistory_param_seq_type_int' => 'Seq', + 'object_inputMessagesFilterPhotoVideoDocuments' => 'Messages filter photo video documents', + 'object_inputMessagesFilterAudio' => 'Messages filter audio', + 'object_inputMessagesFilterAudioDocuments' => 'Messages filter audio documents', + 'object_updateReadMessages' => 'Update read messages', + 'object_updateReadMessages_param_messages_type_Vector t' => 'Messages', + 'object_updateReadMessages_param_pts_type_int' => 'Pts', + 'object_updateUserStatus' => 'Update user status', + 'object_updateUserStatus_param_user_id_type_int' => 'User ID', + 'object_updateUserStatus_param_status_type_UserStatus' => 'Status', + 'object_updateContactLink_param_my_link_type_contacts.MyLink' => 'My link', + 'object_updateContactLink_param_foreign_link_type_contacts.ForeignLink' => 'Foreign link', + 'object_updateNewAuthorization' => 'Update new authorization', + 'object_updateNewAuthorization_param_auth_key_id_type_long' => 'Auth key ID', + 'object_updateNewAuthorization_param_date_type_int' => 'Date', + 'object_updateNewAuthorization_param_device_type_string' => 'Device', + 'object_updateNewAuthorization_param_location_type_string' => 'Location', + 'object_updateShortMessage_param_from_id_type_int' => 'From ID', + 'object_updateShortMessage_param_seq_type_int' => 'Seq', + 'object_updateShortChatMessage_param_seq_type_int' => 'Seq', + 'object_dcOption_param_hostname_type_string' => 'Hostname', + 'object_config_param_broadcast_size_max_type_int' => 'Broadcast size max', + 'object_messages.statedMessagesLinks' => 'Stated messages links', + 'object_messages.statedMessagesLinks_param_messages_type_Vector t' => 'Messages', + 'object_messages.statedMessagesLinks_param_chats_type_Vector t' => 'Chats', + 'object_messages.statedMessagesLinks_param_users_type_Vector t' => 'Users', + 'object_messages.statedMessagesLinks_param_links_type_Vector t' => 'Links', + 'object_messages.statedMessagesLinks_param_pts_type_int' => 'Pts', + 'object_messages.statedMessagesLinks_param_seq_type_int' => 'Seq', + 'object_messages.statedMessageLink' => 'Stated message link', + 'object_messages.statedMessageLink_param_message_type_Message' => 'Message', + 'object_messages.statedMessageLink_param_chats_type_Vector t' => 'Chats', + 'object_messages.statedMessageLink_param_users_type_Vector t' => 'Users', + 'object_messages.statedMessageLink_param_links_type_Vector t' => 'Links', + 'object_messages.statedMessageLink_param_pts_type_int' => 'Pts', + 'object_messages.statedMessageLink_param_seq_type_int' => 'Seq', + 'object_messages.sentMessageLink' => 'Sent message link', + 'object_messages.sentMessageLink_param_id_type_int' => 'ID', + 'object_messages.sentMessageLink_param_date_type_int' => 'Date', + 'object_messages.sentMessageLink_param_pts_type_int' => 'Pts', + 'object_messages.sentMessageLink_param_seq_type_int' => 'Seq', + 'object_messages.sentMessageLink_param_links_type_Vector t' => 'Links', + 'object_inputMediaUploadedAudio' => 'Media uploaded audio', + 'object_inputMediaUploadedAudio_param_file_type_InputFile' => 'File', + 'object_inputMediaUploadedAudio_param_duration_type_int' => 'Duration', + 'object_inputMediaUploadedAudio_param_mime_type_type_string' => 'Mime type', + 'object_inputMediaAudio' => 'Media audio', + 'object_inputMediaAudio_param_id_type_InputAudio' => 'ID', + 'object_inputMediaUploadedDocument_param_file_name_type_string' => 'File name', + 'object_inputMediaUploadedThumbDocument' => 'Media uploaded thumb document', + 'object_inputMediaUploadedThumbDocument_param_file_type_InputFile' => 'File', + 'object_inputMediaUploadedThumbDocument_param_thumb_type_InputFile' => 'Thumbnail', + 'object_inputMediaUploadedThumbDocument_param_file_name_type_string' => 'File name', + 'object_inputMediaUploadedThumbDocument_param_mime_type_type_string' => 'Mime type', + 'object_messageMediaAudio' => 'Message media audio', + 'object_messageMediaAudio_param_audio_type_Audio' => 'Audio', + 'object_inputAudioEmpty' => 'Empty input audio', + 'object_inputAudio' => 'Audio', + 'object_inputAudio_param_id_type_long' => 'ID', + 'object_inputAudio_param_access_hash_type_long' => 'Access hash', + 'object_inputAudioFileLocation' => 'Audio file location', + 'object_inputAudioFileLocation_param_id_type_long' => 'ID', + 'object_inputAudioFileLocation_param_access_hash_type_long' => 'Access hash', + 'object_audioEmpty' => 'Empty audio', + 'object_audioEmpty_param_id_type_long' => 'ID', + 'object_audio' => 'Audio', + 'object_audio_param_id_type_long' => 'ID', + 'object_audio_param_access_hash_type_long' => 'Access hash', + 'object_audio_param_user_id_type_int' => 'User ID', + 'object_audio_param_date_type_int' => 'Date', + 'object_audio_param_duration_type_int' => 'Duration', + 'object_audio_param_mime_type_type_string' => 'Mime type', + 'object_audio_param_size_type_int' => 'Size', + 'object_audio_param_dc_id_type_int' => 'DC ID', + 'object_document_param_user_id_type_int' => 'User ID', + 'object_document_param_file_name_type_string' => 'File name', + 'object_auth.sentAppCode' => 'Sent app code', + 'object_auth.sentAppCode_param_phone_registered_type_Bool' => 'Phone registered?', + 'object_auth.sentAppCode_param_phone_code_hash_type_string' => 'Phone code hash', + 'object_auth.sentAppCode_param_send_call_timeout_type_int' => 'Send call timeout', + 'object_auth.sentAppCode_param_is_password_type_Bool' => 'Is password?', + 'object_contactFound' => 'Contact found', + 'object_contactFound_param_user_id_type_int' => 'User ID', + 'object_updateServiceNotification_param_popup_type_Bool' => 'Popup?', + 'object_inputMediaUploadedThumbDocument_param_attributes_type_Vector t' => 'Attributes', + 'object_userStatusRecently' => 'User status recently', + 'object_userStatusLastWeek' => 'User status last week', + 'object_userStatusLastMonth' => 'User status last month', + 'object_account.sentChangePhoneCode' => 'Sent change phone code', + 'object_account.sentChangePhoneCode_param_phone_code_hash_type_string' => 'Phone code hash', + 'object_account.sentChangePhoneCode_param_send_call_timeout_type_int' => 'Send call timeout', + 'object_messages.allStickers_param_hash_type_string' => 'Hash', + 'object_messages.allStickers_param_packs_type_Vector t' => 'Packs', + 'object_messages.allStickers_param_documents_type_Vector t' => 'Documents', + 'object_message_param_fwd_from_id_type_int' => 'Forwarded from ID', + 'object_message_param_fwd_date_type_int' => 'Forwarded date', + 'object_chatLocated' => 'Chat located', + 'object_chatLocated_param_chat_id_type_int' => 'Chat ID', + 'object_chatLocated_param_distance_type_int' => 'Distance', + 'object_messages.messageEmpty' => 'Empty message', + 'object_messages.statedMessages_param_pts_count_type_int' => 'Pts count', + 'object_messages.statedMessage_param_pts_count_type_int' => 'Pts count', + 'object_messages.sentMessage_param_pts_count_type_int' => 'Pts count', + 'object_updateReadMessages_param_pts_count_type_int' => 'Pts count', + 'object_updateShortMessage_param_fwd_from_id_type_int' => 'Fwd from ID', + 'object_updateShortMessage_param_fwd_date_type_int' => 'Fwd date', + 'object_updateShortChatMessage_param_fwd_from_id_type_int' => 'Fwd from ID', + 'object_updateShortChatMessage_param_fwd_date_type_int' => 'Fwd date', + 'object_messages.statedMessagesLinks_param_pts_count_type_int' => 'Pts count', + 'object_messages.statedMessageLink_param_pts_count_type_int' => 'Pts count', + 'object_messages.sentMessageLink_param_pts_count_type_int' => 'Pts count', + 'object_inputGeoChat' => 'Geo chat', + 'object_inputGeoChat_param_chat_id_type_int' => 'Chat ID', + 'object_inputGeoChat_param_access_hash_type_long' => 'Access hash', + 'object_inputNotifyGeoChatPeer' => 'Notify geo chat peer', + 'object_inputNotifyGeoChatPeer_param_peer_type_InputGeoChat' => 'Peer', + 'object_geoChat' => 'Geo chat', + 'object_geoChat_param_id_type_int' => 'ID', + 'object_geoChat_param_access_hash_type_long' => 'Access hash', + 'object_geoChat_param_title_type_string' => 'Title', + 'object_geoChat_param_address_type_string' => 'Address', + 'object_geoChat_param_venue_type_string' => 'Venue', + 'object_geoChat_param_geo_type_GeoPoint' => 'Geo', + 'object_geoChat_param_photo_type_ChatPhoto' => 'Photo', + 'object_geoChat_param_participants_count_type_int' => 'Participants count', + 'object_geoChat_param_date_type_int' => 'Date', + 'object_geoChat_param_checked_in_type_Bool' => 'Checked in?', + 'object_geoChat_param_version_type_int' => 'Version', + 'object_geoChatMessageEmpty' => 'Empty geo chat message', + 'object_geoChatMessageEmpty_param_chat_id_type_int' => 'Chat ID', + 'object_geoChatMessageEmpty_param_id_type_int' => 'ID', + 'object_geoChatMessage' => 'Geo chat message', + 'object_geoChatMessage_param_chat_id_type_int' => 'Chat ID', + 'object_geoChatMessage_param_id_type_int' => 'ID', + 'object_geoChatMessage_param_from_id_type_int' => 'From ID', + 'object_geoChatMessage_param_date_type_int' => 'Date', + 'object_geoChatMessage_param_message_type_string' => 'Message', + 'object_geoChatMessage_param_media_type_MessageMedia' => 'Media', + 'object_geoChatMessageService' => 'Geo chat message service', + 'object_geoChatMessageService_param_chat_id_type_int' => 'Chat ID', + 'object_geoChatMessageService_param_id_type_int' => 'ID', + 'object_geoChatMessageService_param_from_id_type_int' => 'From ID', + 'object_geoChatMessageService_param_date_type_int' => 'Date', + 'object_geoChatMessageService_param_action_type_MessageAction' => 'Action', + 'object_geochats.statedMessage' => 'Stated message', + 'object_geochats.statedMessage_param_message_type_GeoChatMessage' => 'Message', + 'object_geochats.statedMessage_param_chats_type_Vector t' => 'Chats', + 'object_geochats.statedMessage_param_users_type_Vector t' => 'Users', + 'object_geochats.statedMessage_param_seq_type_int' => 'Seq', + 'object_geochats.located' => 'Located', + 'object_geochats.located_param_results_type_Vector t' => 'Results', + 'object_geochats.located_param_messages_type_Vector t' => 'Messages', + 'object_geochats.located_param_chats_type_Vector t' => 'Chats', + 'object_geochats.located_param_users_type_Vector t' => 'Users', + 'object_geochats.messages' => 'Messages', + 'object_geochats.messages_param_messages_type_Vector t' => 'Messages', + 'object_geochats.messages_param_chats_type_Vector t' => 'Chats', + 'object_geochats.messages_param_users_type_Vector t' => 'Users', + 'object_geochats.messagesSlice' => 'Messages slice', + 'object_geochats.messagesSlice_param_count_type_int' => 'Count', + 'object_geochats.messagesSlice_param_messages_type_Vector t' => 'Messages', + 'object_geochats.messagesSlice_param_chats_type_Vector t' => 'Chats', + 'object_geochats.messagesSlice_param_users_type_Vector t' => 'Users', + 'object_messageActionGeoChatCreate' => 'Message action geo chat create', + 'object_messageActionGeoChatCreate_param_title_type_string' => 'Title', + 'object_messageActionGeoChatCreate_param_address_type_string' => 'Address', + 'object_messageActionGeoChatCheckin' => 'Message action geo chat checkin', + 'object_updateNewGeoChatMessage' => 'Update new geo chat message', + 'object_updateNewGeoChatMessage_param_message_type_GeoChatMessage' => 'Message', + 'object_messages.sentMessage_param_media_type_MessageMedia' => 'Media', + 'object_messages.sentMessageLink_param_media_type_MessageMedia' => 'Media', + 'object_inputMediaUploadedPhoto_param_caption_type_string' => 'Caption', + 'object_inputMediaPhoto_param_caption_type_string' => 'Caption', + 'object_inputMediaUploadedVideo_param_caption_type_string' => 'Caption', + 'object_inputMediaUploadedThumbVideo_param_caption_type_string' => 'Caption', + 'object_inputMediaVideo_param_caption_type_string' => 'Caption', + 'object_messageMediaPhoto_param_caption_type_string' => 'Caption', + 'object_messageMediaVideo_param_caption_type_string' => 'Caption', + 'object_botCommand' => 'Bot command', + 'object_botCommand_param_command_type_string' => 'Command', + 'object_botCommand_param_description_type_string' => 'Description', + 'object_botInfoEmpty' => 'Empty bot info', + 'object_botInfo_param_version_type_int' => 'Version', + 'object_botInfo_param_share_text_type_string' => 'Share text', + 'object_help.appChangelogEmpty' => 'Empty app changelog', + 'object_help.appChangelog' => 'App changelog', + 'object_help.appChangelog_param_text_type_string' => 'Text', + 'object_message_param_fwd_from_id_type_Peer' => 'Forwarded from ID', + 'object_updateShortMessage_param_fwd_from_id_type_Peer' => 'Fwd from ID', + 'object_updateShortChatMessage_param_fwd_from_id_type_Peer' => 'Fwd from ID', + 'object_channelFull_param_unread_important_count_type_int' => 'Unread important count', + 'object_dialogChannel' => 'Dialog channel', + 'object_dialogChannel_param_peer_type_Peer' => 'Peer', + 'object_dialogChannel_param_top_message_type_int' => 'Top message', + 'object_dialogChannel_param_top_important_message_type_int' => 'Top important message', + 'object_dialogChannel_param_read_inbox_max_id_type_int' => 'Read inbox max ID', + 'object_dialogChannel_param_unread_count_type_int' => 'Unread count', + 'object_dialogChannel_param_unread_important_count_type_int' => 'Unread important count', + 'object_dialogChannel_param_notify_settings_type_PeerNotifySettings' => 'Notify settings', + 'object_dialogChannel_param_pts_type_int' => 'Pts', + 'object_messageGroup' => 'Message group', + 'object_messageGroup_param_min_id_type_int' => 'Min ID', + 'object_messageGroup_param_max_id_type_int' => 'Max ID', + 'object_messageGroup_param_count_type_int' => 'Count', + 'object_messageGroup_param_date_type_int' => 'Date', + 'object_messages.channelMessages_param_collapsed_type_Vector t' => 'Collapsed', + 'object_updateChannelGroup' => 'Update channel group', + 'object_updateChannelGroup_param_channel_id_type_int' => 'Channel ID', + 'object_updateChannelGroup_param_group_type_MessageGroup' => 'Group', + 'object_updates.channelDifferenceTooLong_param_top_important_message_type_int' => 'Top important message', + 'object_updates.channelDifferenceTooLong_param_unread_important_count_type_int' => 'Unread important count', + 'object_channelMessagesFilterCollapsed' => 'Channel messages filter collapsed', + 'object_channelParticipantModerator' => 'Channel participant moderator', + 'object_channelParticipantModerator_param_user_id_type_int' => 'User ID', + 'object_channelParticipantModerator_param_inviter_id_type_int' => 'Inviter ID', + 'object_channelParticipantModerator_param_date_type_int' => 'Date', + 'object_channelParticipantEditor' => 'Channel participant editor', + 'object_channelParticipantEditor_param_user_id_type_int' => 'User ID', + 'object_channelParticipantEditor_param_inviter_id_type_int' => 'Inviter ID', + 'object_channelParticipantEditor_param_date_type_int' => 'Date', + 'object_channelParticipantKicked' => 'Channel participant kicked', + 'object_channelParticipantKicked_param_user_id_type_int' => 'User ID', + 'object_channelParticipantKicked_param_kicked_by_type_int' => 'Kicked by', + 'object_channelParticipantKicked_param_date_type_int' => 'Date', + 'object_channelRoleEmpty' => 'Empty channel role', + 'object_channelRoleModerator' => 'Channel role moderator', + 'object_channelRoleEditor' => 'Channel role editor', + 'object_inputChatEmpty' => 'Empty input chat', + 'object_inputChat' => 'Chat', + 'object_inputChat_param_chat_id_type_int' => 'Chat ID', + 'object_updateReadChannelInbox_param_peer_type_Peer' => 'Peer', + 'object_updateDeleteChannelMessages_param_peer_type_Peer' => 'Peer', + 'object_message_param_unread_type_true' => 'Unread?', + 'object_messageService_param_unread_type_true' => 'Unread?', + 'object_updateShortMessage_param_unread_type_true' => 'Unread?', + 'object_updateShortChatMessage_param_unread_type_true' => 'Unread?', + 'object_stickerSet_param_disabled_type_true' => 'Disabled?', + 'object_updateShortSentMessage_param_unread_type_true' => 'Unread?', + 'object_channel_param_kicked_type_true' => 'Kicked?', + 'object_channel_param_moderator_type_true' => 'Moderator?', + 'object_channelMessagesFilter_param_important_only_type_true' => 'Important only?', + 'object_messageActionChatDeactivate' => 'Message action chat deactivate', + 'object_messageActionChatActivate' => 'Message action chat activate', + 'object_user_param_restiction_reason_type_string' => 'Restiction reason', + 'object_channel_param_restiction_reason_type_string' => 'Restiction reason', + 'object_webPageExternal' => 'Web page external', + 'object_webPageExternal_param_url_type_string' => 'URL', + 'object_webPageExternal_param_display_url_type_string' => 'Display URL', + 'object_webPageExternal_param_type_type_string' => 'Type', + 'object_webPageExternal_param_title_type_string' => 'Title', + 'object_webPageExternal_param_description_type_string' => 'Description', + 'object_webPageExternal_param_thumb_url_type_string' => 'Thumbnail URL', + 'object_webPageExternal_param_content_url_type_string' => 'Content URL', + 'object_webPageExternal_param_w_type_int' => 'Width', + 'object_webPageExternal_param_h_type_int' => 'Height', + 'object_webPageExternal_param_duration_type_int' => 'Duration', + 'object_foundGif_param_webpage_type_WebPage' => 'Webpage', + 'object_inputMediaUploadedDocument_param_caption_type_string' => 'Caption', + 'object_inputMediaUploadedThumbDocument_param_caption_type_string' => 'Caption', + 'object_inputMediaDocument_param_caption_type_string' => 'Caption', + 'object_messageMediaDocument_param_caption_type_string' => 'Caption', + 'object_inputBotInlineMessageMediaAuto_param_caption_type_string' => 'Caption', + 'object_botInlineMessageMediaAuto_param_caption_type_string' => 'Caption', + 'object_botInlineMediaResultDocument' => 'Bot inline media result document', + 'object_botInlineMediaResultDocument_param_id_type_string' => 'ID', + 'object_botInlineMediaResultDocument_param_type_type_string' => 'Type', + 'object_botInlineMediaResultDocument_param_document_type_Document' => 'Document', + 'object_botInlineMediaResultDocument_param_send_message_type_BotInlineMessage' => 'Send message', + 'object_botInlineMediaResultPhoto' => 'Bot inline media result photo', + 'object_botInlineMediaResultPhoto_param_id_type_string' => 'ID', + 'object_botInlineMediaResultPhoto_param_type_type_string' => 'Type', + 'object_botInlineMediaResultPhoto_param_photo_type_Photo' => 'Photo', + 'object_botInlineMediaResultPhoto_param_send_message_type_BotInlineMessage' => 'Send message', + 'object_inputMediaVideo_param_video_type_InputVideo' => 'Video', + 'object_inputMediaAudio_param_audio_type_InputAudio' => 'Audio', + 'object_inputMediaDocument_param_document_id_type_InputDocument' => 'Document ID', + 'object_inputGeoPoint_param_latitude_type_double' => 'Latitude', + 'object_inputGeoPoint_param_longitude_type_double' => 'Longitude', + 'object_geoPoint_param_longitude_type_double' => 'Longitude', + 'object_geoPoint_param_latitude_type_double' => 'Latitude', + 'object_updateNewEncryptedMessage_param_encr_message_type_EncryptedMessage' => 'Encr message', + 'object_updateEncryption_param_encr_chat_type_EncryptedChat' => 'Encr chat', + 'object_updateNotifySettings_param_notify_peer_type_NotifyPeer' => 'Notify peer', + 'object_updateServiceNotification_param_message_text_type_string' => 'Message text', + 'object_updateNewChannelMessage_param_channel_pts_type_int' => 'Channel pts', + 'object_updateNewChannelMessage_param_channel_pts_count_type_int' => 'Channel pts count', + 'object_updateDeleteChannelMessages_param_channel_pts_type_int' => 'Channel pts', + 'object_updateDeleteChannelMessages_param_channel_pts_count_type_int' => 'Channel pts count', + 'object_updates.channelDifferenceEmpty_param_channel_pts_type_int' => 'Channel pts', + 'object_updates.channelDifferenceTooLong_param_channel_pts_type_int' => 'Channel pts', + 'object_updates.channelDifference_param_channel_pts_type_int' => 'Channel pts', + 'object_privacyKeyChatInvite' => 'Privacy key chat invite', + 'object_inputMediaUploadedThumbDocument_param_stickers_type_Vector t' => 'Stickers', + 'object_inputMediaPhotoExternal_param_caption_type_string' => 'Caption', + 'object_inputMediaDocumentExternal_param_caption_type_string' => 'Caption', + 'object_destroy_auth_key_ok' => 'Destroy auth key ok', + 'object_destroy_auth_key_none' => 'Destroy auth key none', + 'object_destroy_auth_key_fail' => 'Destroy auth key fail', + 'object_help.appChangelog_param_message_type_string' => 'Message', + 'object_help.appChangelog_param_media_type_MessageMedia' => 'Media', + 'object_help.appChangelog_param_entities_type_Vector t' => 'Entities', + 'object_pageBlockParagraph' => 'Page block paragraph', + 'object_pageBlockParagraph_param_text_type_RichText' => 'Text', + 'object_pageBlockPreformatted' => 'Page block preformatted', + 'object_pageBlockPreformatted_param_text_type_RichText' => 'Text', + 'object_pageBlockPreformatted_param_language_type_string' => 'Language', + 'object_pageBlockDivider' => 'Page block divider', + 'object_pageBlockAnchor' => 'Page block anchor', + 'object_pageBlockAnchor_param_name_type_string' => 'Name', + 'object_pageBlockCover' => 'Page block cover', + 'object_pageBlockCover_param_cover_type_PageBlock' => 'Cover', + 'object_pagePart_param_videos_type_Vector t' => 'Videos', + 'object_pageFull_param_videos_type_Vector t' => 'Videos', + 'object_phoneCallRequested_param_g_a_type_bytes' => 'G a', + 'object_resPQ_param_pq_type_string' => 'Pq', + 'object_p_q_inner_data_param_pq_type_string' => 'Pq', + 'object_p_q_inner_data_param_p_type_string' => 'P', + 'object_p_q_inner_data_param_q_type_string' => 'Q', + 'object_server_DH_params_ok_param_encrypted_answer_type_string' => 'Encrypted answer', + 'object_server_DH_inner_data_param_dh_prime_type_string' => 'Dh prime', + 'object_server_DH_inner_data_param_g_a_type_string' => 'G a', + 'object_client_DH_inner_data_param_g_b_type_string' => 'G b', + 'object_msgs_state_info_param_info_type_string' => 'Info', + 'object_msgs_all_info_param_info_type_string' => 'Info', + 'object_http_wait' => 'Http wait', + 'object_http_wait_param_max_delay_type_int' => 'Max delay', + 'object_http_wait_param_wait_after_type_int' => 'Wait after', + 'object_http_wait_param_max_wait_type_int' => 'Max wait', + 'object_ipPort' => 'Ip port', + 'object_ipPort_param_ipv4_type_int' => 'Ipv4', + 'object_ipPort_param_port_type_int' => 'Port', + 'object_help.configSimple' => 'Config simple', + 'object_help.configSimple_param_date_type_int' => 'Date', + 'object_help.configSimple_param_expires_type_int' => 'Expires', + 'object_help.configSimple_param_dc_id_type_int' => 'DC ID', + 'object_help.configSimple_param_ip_port_list_type_Vector t' => 'Ip port list', + 'object_inputMessagesFilterMyMentionsUnread' => 'Messages filter my mentions unread', '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', @@ -4157,7 +4162,7 @@ class Lang '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' => 'ids of stickers you already cached', + 'method_messages.searchStickerSets_param_hash_type_int' => 'Ids of stickers you already cached', 'method_upload.getFileHashes' => 'Get file hashes', 'method_upload.getFileHashes_param_location_type_InputFileLocation' => 'The file', 'method_upload.getFileHashes_param_offset_type_int' => 'Offset', @@ -4167,210 +4172,210 @@ class Lang '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' => '', + 'object_inputSecureFileLocation' => 'Secure file location', + 'object_inputSecureFileLocation_param_id_type_long' => 'ID', + 'object_inputSecureFileLocation_param_access_hash_type_long' => 'Access hash', + 'object_messageActionBotAllowed' => 'Message action bot allowed', + 'object_messageActionBotAllowed_param_domain_type_string' => 'Domain', + 'object_messageActionSecureValuesSentMe' => 'Message action secure values sent me', + 'object_messageActionSecureValuesSentMe_param_values_type_Vector t' => 'Values', + 'object_messageActionSecureValuesSentMe_param_credentials_type_SecureCredentialsEncrypted' => 'Credentials', + 'object_messageActionSecureValuesSent' => 'Message action secure values sent', + 'object_messageActionSecureValuesSent_param_types_type_Vector t' => 'Types', + 'object_auth.sentCode_param_terms_of_service_type_help.TermsOfService' => 'Terms of service', + 'object_inputPeerNotifySettings_param_silent_type_Bool' => 'Silent?', + 'object_peerNotifySettings_param_silent_type_Bool' => 'Silent?', + 'object_updateDialogPinned_param_peer_type_DialogPeer' => 'Peer', + 'object_upload.fileCdnRedirect_param_file_hashes_type_Vector t' => 'File hashes', + 'object_dcOption_param_secret_type_bytes' => 'Secret', + 'object_config_param_preload_featured_stickers_type_true' => 'Preload featured stickers?', + 'object_config_param_ignore_phone_entities_type_true' => 'Ignore phone entities?', + 'object_config_param_revoke_pm_inbox_type_true' => 'Revoke pm inbox?', + 'object_config_param_blocked_mode_type_true' => 'Blocked mode?', + 'object_config_param_revoke_time_limit_type_int' => 'Revoke time limit', + 'object_config_param_revoke_pm_time_limit_type_int' => 'Revoke pm time limit', + 'object_config_param_autoupdate_url_prefix_type_string' => 'Autoupdate URL prefix', + 'object_messages.stickers_param_hash_type_int' => 'Hash', + 'object_account.noPassword_param_new_secure_salt_type_bytes' => 'New secure salt', + 'object_account.noPassword_param_secure_random_type_bytes' => 'Secure random', + 'object_account.password_param_has_recovery_type_true' => 'Has recovery?', + 'object_account.password_param_has_secure_values_type_true' => 'Has secure values?', + 'object_account.password_param_new_secure_salt_type_bytes' => 'New secure salt', + 'object_account.password_param_secure_random_type_bytes' => 'Secure random', + 'object_account.passwordSettings_param_secure_salt_type_bytes' => 'Secure salt', + 'object_account.passwordSettings_param_secure_secret_type_bytes' => 'Secure secret', + 'object_account.passwordSettings_param_secure_secret_id_type_long' => 'Secure secret ID', + 'object_account.passwordInputSettings_param_new_secure_salt_type_bytes' => 'New secure salt', + 'object_account.passwordInputSettings_param_new_secure_secret_type_bytes' => 'New secure secret', + 'object_account.passwordInputSettings_param_new_secure_secret_id_type_long' => 'New secure secret ID', + 'object_stickerSet_param_installed_date_type_int' => 'Installed date', + 'object_messageEntityPhone' => 'Message entity phone', + 'object_messageEntityPhone_param_offset_type_int' => 'Offset', + 'object_messageEntityPhone_param_length_type_int' => 'Length', + 'object_messageEntityCashtag' => 'Message entity cashtag', + 'object_messageEntityCashtag_param_offset_type_int' => 'Offset', + 'object_messageEntityCashtag_param_length_type_int' => 'Length', + 'object_help.termsOfService_param_popup_type_true' => 'Popup?', + 'object_help.termsOfService_param_id_type_DataJSON' => 'ID', + 'object_help.termsOfService_param_entities_type_Vector t' => 'Entities', + 'object_help.termsOfService_param_min_age_confirm_type_int' => 'Min age confirm', + 'object_inputBotInlineMessageMediaVenue_param_venue_type_type_string' => 'Venue type', + 'object_inputBotInlineResult_param_thumb_type_InputWebDocument' => 'Thumbnail', + 'object_inputBotInlineResult_param_content_type_InputWebDocument' => 'Content', + 'object_botInlineMessageMediaVenue_param_venue_type_type_string' => 'Venue type', + 'object_botInlineResult_param_thumb_type_WebDocument' => 'Thumbnailnail', + 'object_botInlineResult_param_content_type_WebDocument' => 'Content', + 'object_messages.recentStickers_param_packs_type_Vector t' => 'Packs', + 'object_messages.recentStickers_param_dates_type_Vector t' => 'Dates', + 'object_webDocumentNoProxy' => 'Web document no proxy', + 'object_webDocumentNoProxy_param_url_type_string' => 'URL', + 'object_webDocumentNoProxy_param_size_type_int' => 'Size', + 'object_webDocumentNoProxy_param_mime_type_type_string' => 'Mime type', + 'object_webDocumentNoProxy_param_attributes_type_Vector t' => 'Attributes', + 'object_inputWebFileGeoPointLocation' => 'Web file geo point location', + 'object_inputWebFileGeoPointLocation_param_geo_point_type_InputGeoPoint' => 'Geo point', + 'object_inputWebFileGeoPointLocation_param_w_type_int' => 'Width', + 'object_inputWebFileGeoPointLocation_param_h_type_int' => 'Height', + 'object_inputWebFileGeoPointLocation_param_zoom_type_int' => 'Zoom', + 'object_inputWebFileGeoPointLocation_param_scale_type_int' => 'Scale', + 'object_inputWebFileGeoMessageLocation' => 'Web file geo message location', + 'object_inputWebFileGeoMessageLocation_param_peer_type_InputPeer' => 'Peer', + 'object_inputWebFileGeoMessageLocation_param_msg_id_type_int' => 'Msg ID', + 'object_inputWebFileGeoMessageLocation_param_w_type_int' => 'Width', + 'object_inputWebFileGeoMessageLocation_param_h_type_int' => 'Height', + 'object_inputWebFileGeoMessageLocation_param_zoom_type_int' => 'Zoom', + 'object_inputWebFileGeoMessageLocation_param_scale_type_int' => 'Scale', + 'object_channelAdminRights_param_manage_call_type_true' => 'Manage group calls', + 'object_inputDialogPeer' => 'Dialog peer', + 'object_inputDialogPeer_param_peer_type_InputPeer' => 'Peer', + 'object_dialogPeer' => 'Dialog peer', + 'object_dialogPeer_param_peer_type_Peer' => 'Peer', + 'object_messages.foundStickerSetsNotModified' => 'Found sticker sets not modified', + 'object_messages.foundStickerSets' => 'Found sticker sets', + 'object_messages.foundStickerSets_param_hash_type_int' => 'Hash', + 'object_messages.foundStickerSets_param_sets_type_Vector t' => 'Sets', + 'object_fileHash' => 'File hash', + 'object_fileHash_param_offset_type_int' => 'Offset', + 'object_fileHash_param_limit_type_int' => 'Limit', + 'object_fileHash_param_hash_type_bytes' => 'Hash', + 'object_inputClientProxy' => 'Client proxy', + 'object_inputClientProxy_param_address_type_string' => 'Address', + 'object_inputClientProxy_param_port_type_int' => 'Port', + 'object_help.proxyDataEmpty' => 'Empty proxy data', + 'object_help.proxyDataEmpty_param_expires_type_int' => 'Expires', + 'object_help.proxyDataPromo' => 'Proxy data promo', + 'object_help.proxyDataPromo_param_expires_type_int' => 'Expires', + 'object_help.proxyDataPromo_param_peer_type_Peer' => 'Peer', + 'object_help.proxyDataPromo_param_chats_type_Vector t' => 'Chats', + 'object_help.proxyDataPromo_param_users_type_Vector t' => 'Users', + 'object_help.termsOfServiceUpdateEmpty' => 'Empty terms of service update', + 'object_help.termsOfServiceUpdateEmpty_param_expires_type_int' => 'Expires', + 'object_help.termsOfServiceUpdate' => 'Terms of service update', + 'object_help.termsOfServiceUpdate_param_expires_type_int' => 'Expires', + 'object_help.termsOfServiceUpdate_param_terms_of_service_type_help.TermsOfService' => 'Terms of service', + 'object_inputSecureFileUploaded' => 'Secure file uploaded', + 'object_inputSecureFileUploaded_param_id_type_long' => 'ID', + 'object_inputSecureFileUploaded_param_parts_type_int' => 'Parts', + 'object_inputSecureFileUploaded_param_md5_checksum_type_string' => 'Md5 checksum', + 'object_inputSecureFileUploaded_param_file_hash_type_bytes' => 'File hash', + 'object_inputSecureFileUploaded_param_secret_type_bytes' => 'Secret', + 'object_inputSecureFile' => 'Secure file', + 'object_inputSecureFile_param_id_type_long' => 'ID', + 'object_inputSecureFile_param_access_hash_type_long' => 'Access hash', + 'object_secureFileEmpty' => 'Empty secure file', + 'object_secureFile' => 'Secure file', + 'object_secureFile_param_id_type_long' => 'ID', + 'object_secureFile_param_access_hash_type_long' => 'Access hash', + 'object_secureFile_param_size_type_int' => 'Size', + 'object_secureFile_param_dc_id_type_int' => 'DC ID', + 'object_secureFile_param_date_type_int' => 'Date', + 'object_secureFile_param_file_hash_type_bytes' => 'File hash', + 'object_secureFile_param_secret_type_bytes' => 'Secret', + 'object_secureData' => 'Secure data', + 'object_secureData_param_data_type_bytes' => 'Data', + 'object_secureData_param_data_hash_type_bytes' => 'Data hash', + 'object_secureData_param_secret_type_bytes' => 'Secret', + 'object_securePlainPhone' => 'Secure plain phone', + 'object_securePlainPhone_param_phone_type_string' => 'Phone', + 'object_securePlainEmail' => 'Secure plain email', + 'object_securePlainEmail_param_email_type_string' => 'Email', + 'object_secureValueTypePersonalDetails' => 'Secure value type personal details', + 'object_secureValueTypePassport' => 'Secure value type passport', + 'object_secureValueTypeDriverLicense' => 'Secure value type driver license', + 'object_secureValueTypeIdentityCard' => 'Secure value type IDentity card', + 'object_secureValueTypeInternalPassport' => 'Secure value type internal passport', + 'object_secureValueTypeAddress' => 'Secure value type address', + 'object_secureValueTypeUtilityBill' => 'Secure value type utility bill', + 'object_secureValueTypeBankStatement' => 'Secure value type bank statement', + 'object_secureValueTypeRentalAgreement' => 'Secure value type rental agreement', + 'object_secureValueTypePassportRegistration' => 'Secure value type passport registration', + 'object_secureValueTypeTemporaryRegistration' => 'Secure value type temporary registration', + 'object_secureValueTypePhone' => 'Secure value type phone', + 'object_secureValueTypeEmail' => 'Secure value type email', + 'object_secureValue' => 'Secure value', + 'object_secureValue_param_type_type_SecureValueType' => 'Type', + 'object_secureValue_param_data_type_SecureData' => 'Data', + 'object_secureValue_param_front_side_type_SecureFile' => 'Front side', + 'object_secureValue_param_reverse_side_type_SecureFile' => 'Reverse side', + 'object_secureValue_param_selfie_type_SecureFile' => 'Selfie', + 'object_secureValue_param_files_type_Vector t' => 'Files', + 'object_secureValue_param_plain_data_type_SecurePlainData' => 'Plain data', + 'object_secureValue_param_hash_type_bytes' => 'Hash', + 'object_inputSecureValue' => 'Secure value', + 'object_inputSecureValue_param_type_type_SecureValueType' => 'Type', + 'object_inputSecureValue_param_data_type_SecureData' => 'Data', + 'object_inputSecureValue_param_front_side_type_InputSecureFile' => 'Front side', + 'object_inputSecureValue_param_reverse_side_type_InputSecureFile' => 'Reverse side', + 'object_inputSecureValue_param_selfie_type_InputSecureFile' => 'Selfie', + 'object_inputSecureValue_param_files_type_Vector t' => 'Files', + 'object_inputSecureValue_param_plain_data_type_SecurePlainData' => 'Plain data', + 'object_secureValueHash' => 'Secure value hash', + 'object_secureValueHash_param_type_type_SecureValueType' => 'Type', + 'object_secureValueHash_param_hash_type_bytes' => 'Hash', + 'object_secureValueErrorData' => 'Secure value error data', + 'object_secureValueErrorData_param_type_type_SecureValueType' => 'Type', + 'object_secureValueErrorData_param_data_hash_type_bytes' => 'Data hash', + 'object_secureValueErrorData_param_field_type_string' => 'Field', + 'object_secureValueErrorData_param_text_type_string' => 'Text', + 'object_secureValueErrorFrontSide' => 'Secure value error front side', + 'object_secureValueErrorFrontSide_param_type_type_SecureValueType' => 'Type', + 'object_secureValueErrorFrontSide_param_file_hash_type_bytes' => 'File hash', + 'object_secureValueErrorFrontSide_param_text_type_string' => 'Text', + 'object_secureValueErrorReverseSide' => 'Secure value error reverse side', + 'object_secureValueErrorReverseSide_param_type_type_SecureValueType' => 'Type', + 'object_secureValueErrorReverseSide_param_file_hash_type_bytes' => 'File hash', + 'object_secureValueErrorReverseSide_param_text_type_string' => 'Text', + 'object_secureValueErrorSelfie' => 'Secure value error selfie', + 'object_secureValueErrorSelfie_param_type_type_SecureValueType' => 'Type', + 'object_secureValueErrorSelfie_param_file_hash_type_bytes' => 'File hash', + 'object_secureValueErrorSelfie_param_text_type_string' => 'Text', + 'object_secureValueErrorFile' => 'Secure value error file', + 'object_secureValueErrorFile_param_type_type_SecureValueType' => 'Type', + 'object_secureValueErrorFile_param_file_hash_type_bytes' => 'File hash', + 'object_secureValueErrorFile_param_text_type_string' => 'Text', + 'object_secureValueErrorFiles' => 'Secure value error files', + 'object_secureValueErrorFiles_param_type_type_SecureValueType' => 'Type', + 'object_secureValueErrorFiles_param_file_hash_type_Vector t' => 'File hash', + 'object_secureValueErrorFiles_param_text_type_string' => 'Text', + 'object_secureCredentialsEncrypted' => 'Secure credentials encrypted', + 'object_secureCredentialsEncrypted_param_data_type_bytes' => 'Data', + 'object_secureCredentialsEncrypted_param_hash_type_bytes' => 'Hash', + 'object_secureCredentialsEncrypted_param_secret_type_bytes' => 'Secret', + 'object_account.authorizationForm' => 'Telegram passport authorization form', + 'object_account.authorizationForm_param_selfie_required_type_true' => 'Selfie required?', + 'object_account.authorizationForm_param_required_types_type_Vector t' => 'Required types', + 'object_account.authorizationForm_param_values_type_Vector t' => 'Values', + 'object_account.authorizationForm_param_errors_type_Vector t' => 'Errors', + 'object_account.authorizationForm_param_users_type_Vector t' => 'Users', + 'object_account.authorizationForm_param_privacy_policy_url_type_string' => 'Privacy policy URL', + 'object_account.sentEmailCode' => 'Sent email code', + 'object_account.sentEmailCode_param_email_pattern_type_string' => 'Email pattern', + 'object_account.sentEmailCode_param_length_type_int' => 'Length', + 'object_help.deepLinkInfoEmpty' => 'Empty deep link info', + 'object_help.deepLinkInfo' => 'Deep link info', + 'object_help.deepLinkInfo_param_update_app_type_true' => 'Update app?', + 'object_help.deepLinkInfo_param_message_type_string' => 'Message', + 'object_help.deepLinkInfo_param_entities_type_Vector t' => 'Entities', 'method_invokeWithMessagesRange' => 'Invoke with messages range', 'method_invokeWithMessagesRange_param_range_type_MessageRange' => 'The range', 'method_invokeWithMessagesRange_param_query_type_!X' => 'The query', @@ -4391,23 +4396,23 @@ class Lang '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' => '', + 'object_ipPortSecret' => 'Ip port secret', + 'object_ipPortSecret_param_ipv4_type_int' => 'Ipv4', + 'object_ipPortSecret_param_port_type_int' => 'Port', + 'object_ipPortSecret_param_secret_type_bytes' => 'Secret', + 'object_accessPointRule' => 'Access point rule', + 'object_accessPointRule_param_phone_prefix_rules_type_string' => 'Phone prefix rules', + 'object_accessPointRule_param_dc_id_type_int' => 'DC ID', + 'object_accessPointRule_param_ips_type_vector' => 'Ips', + 'object_help.configSimple_param_rules_type_vector' => 'Rules', + 'object_inputTakeoutFileLocation' => 'Takeout file location', + 'object_savedPhoneContact' => 'Saved phone contact', + 'object_savedPhoneContact_param_phone_type_string' => 'Phone', + 'object_savedPhoneContact_param_first_name_type_string' => 'First name', + 'object_savedPhoneContact_param_last_name_type_string' => 'Last name', + 'object_savedPhoneContact_param_date_type_int' => 'Date', + 'object_account.takeout' => 'Takeout', + 'object_account.takeout_param_id_type_long' => 'ID', 'method_contacts.toggleTopPeers' => 'Toggle top peers', 'method_contacts.toggleTopPeers_param_enabled_type_Bool' => 'Enable or disable top peer', 'method_messages.getDialogs_param_hash_type_int' => 'IDs of previously fetched dialogs', @@ -4415,35 +4420,35 @@ class Lang 'method_messages.markDialogUnread_param_unread_type_true' => 'Should it be marked or unmarked as read', 'method_messages.markDialogUnread_param_peer_type_InputDialogPeer' => 'The dialog to mark as unread', 'method_messages.getDialogUnreadMarks' => 'Get dialogs marked as unread manually', - 'object_inputMediaContact_param_vcard_type_string' => '', - 'object_messageMediaContact_param_vcard_type_string' => '', - 'object_dialog_param_unread_mark_type_true' => '', - 'object_geoPoint_param_access_hash_type_long' => '', - 'object_messages.dialogsNotModified' => '', - 'object_messages.dialogsNotModified_param_count_type_int' => '', - 'object_updateDialogUnreadMark' => '', - 'object_updateDialogUnreadMark_param_unread_type_true' => '', - 'object_updateDialogUnreadMark_param_peer_type_DialogPeer' => '', - 'object_config_param_dc_txt_domain_name_type_string' => '', - 'object_config_param_gif_search_username_type_string' => '', - 'object_config_param_venue_search_username_type_string' => '', - 'object_config_param_img_search_username_type_string' => '', - 'object_config_param_static_maps_provider_type_string' => '', - 'object_config_param_caption_length_max_type_int' => '', - 'object_config_param_message_length_max_type_int' => '', - 'object_config_param_webfile_dc_id_type_int' => '', - 'object_inputBotInlineMessageMediaContact_param_vcard_type_string' => '', - 'object_botInlineMessageMediaContact_param_vcard_type_string' => '', - 'object_contacts.topPeersDisabled' => '', - 'object_draftMessageEmpty_param_date_type_int' => '', - 'object_inputWebFileGeoPointLocation_param_access_hash_type_long' => '', + 'object_inputMediaContact_param_vcard_type_string' => 'Vcard', + 'object_messageMediaContact_param_vcard_type_string' => 'Vcard', + 'object_dialog_param_unread_mark_type_true' => 'Unread mark?', + 'object_geoPoint_param_access_hash_type_long' => 'Access hash', + 'object_messages.dialogsNotModified' => 'Dialogs not modified', + 'object_messages.dialogsNotModified_param_count_type_int' => 'Count', + 'object_updateDialogUnreadMark' => 'Update dialog unread mark', + 'object_updateDialogUnreadMark_param_unread_type_true' => 'Unread?', + 'object_updateDialogUnreadMark_param_peer_type_DialogPeer' => 'Peer', + 'object_config_param_dc_txt_domain_name_type_string' => 'DC txt domain name', + 'object_config_param_gif_search_username_type_string' => 'Gif search username', + 'object_config_param_venue_search_username_type_string' => 'Venue search username', + 'object_config_param_img_search_username_type_string' => 'Img search username', + 'object_config_param_static_maps_provider_type_string' => 'Static maps provider', + 'object_config_param_caption_length_max_type_int' => 'Caption length max', + 'object_config_param_message_length_max_type_int' => 'Message length max', + 'object_config_param_webfile_dc_id_type_int' => 'Webfile DC ID', + 'object_inputBotInlineMessageMediaContact_param_vcard_type_string' => 'Vcard', + 'object_botInlineMessageMediaContact_param_vcard_type_string' => 'Vcard', + 'object_contacts.topPeersDisabled' => 'Top peers disabled', + 'object_draftMessageEmpty_param_date_type_int' => 'Date', + 'object_inputWebFileGeoPointLocation_param_access_hash_type_long' => 'Access hash', 'method_contacts.getContacts_param_hash_type_Vector t' => 'User IDs of previously cached contacts', 'method_contacts.getTopPeers_param_hash_type_Vector t' => 'Peer IDs of previously cached peers', 'method_messages.getDialogs_param_hash_type_Vector t' => 'IDs of previously fetched dialogs', 'method_messages.getHistory_param_hash_type_Vector t' => 'IDs of messages you already fetched', 'method_messages.search_param_hash_type_Vector t' => 'The IDs of messages you already fetched', 'method_messages.getStickers_param_hash_type_Vector t' => ' the hash parameter of the previous result of this method', - 'method_messages.getAllStickers_param_hash_type_Vector t' => 'the hash parameter of the previous result of this method', + 'method_messages.getAllStickers_param_hash_type_Vector t' => 'The hash parameter of the previous result of this method', 'method_messages.getSavedGifs_param_hash_type_Vector t' => ' the hash parameter of the previous result of this method', 'method_messages.getFeaturedStickers_param_hash_type_Vector t' => ' the hash parameter of the previous result of this method', 'method_messages.getRecentStickers_param_hash_type_Vector t' => 'IDs the hash parameter of the previous result of this method', @@ -4453,6 +4458,299 @@ class Lang 'method_messages.getRecentLocations_param_hash_type_Vector t' => 'IDs of locations you already fetched', 'method_messages.searchStickerSets_param_hash_type_Vector t' => 'The IDs of stickersets you already fetched', 'method_channels.getParticipants_param_hash_type_Vector t' => 'IDs of previously fetched participants', + 'method_auth.checkPassword_param_password_type_InputCheckPasswordSRP' => 'You cannot use this method directly, use the complete_2fa_login method instead (see https://docs.madelineproto.xyz for more info)', + 'method_account.getPasswordSettings_param_password_type_InputCheckPasswordSRP' => 'You cannot use this method directly; use $MadelineProto->update_2fa($params), instead (see https://docs.madelineproto.xyz for more info)', + 'method_account.updatePasswordSettings_param_password_type_InputCheckPasswordSRP' => 'You cannot use this method directly; use $MadelineProto->update_2fa($params), instead (see https://docs.madelineproto.xyz for more info)', + 'method_account.getTmpPassword_param_password_type_InputCheckPasswordSRP' => 'Password', + 'method_account.confirmPasswordEmail' => 'Confirm password recovery using email', + 'method_account.confirmPasswordEmail_param_code_type_string' => 'Code', + 'method_account.resendPasswordEmail' => 'Resend password recovery email', + 'method_account.cancelPasswordEmail' => 'Cancel password recovery email', + 'method_account.getContactSignUpNotification' => 'Contact signup notification setting value', + 'method_account.setContactSignUpNotification' => 'Set contact sign up notification', + 'method_account.setContactSignUpNotification_param_silent_type_Bool' => 'Silent?', + 'method_account.getNotifyExceptions' => 'Get notification exceptions', + 'method_account.getNotifyExceptions_param_compare_sound_type_true' => 'Compare sound?', + 'method_account.getNotifyExceptions_param_peer_type_InputNotifyPeer' => 'Peer', + 'method_contacts.getContactIDs' => 'Get contacts by IDs', + 'method_contacts.getContactIDs_param_hash_type_Vector t' => 'Previously fetched IDs', + 'method_contacts.deleteByPhones' => 'Delete contacts by phones', + 'method_contacts.deleteByPhones_param_phones_type_Vector t' => 'Phones', + 'method_messages.sendInlineBotResult_param_hide_via_type_true' => 'Hide "via @bot"', + 'method_messages.clearAllDrafts' => 'Clear all drafts', + 'method_messages.updatePinnedMessage' => 'Update pinned message (private chat only)', + 'method_messages.updatePinnedMessage_param_silent_type_true' => 'Silent?', + 'method_messages.updatePinnedMessage_param_peer_type_InputPeer' => 'Peer', + 'method_messages.updatePinnedMessage_param_id_type_int' => 'Message ID', + 'method_messages.sendVote' => 'Send vote', + 'method_messages.sendVote_param_peer_type_InputPeer' => 'Peer', + 'method_messages.sendVote_param_msg_id_type_int' => 'Message ID', + 'method_messages.sendVote_param_options_type_Vector t' => 'Options', + 'method_messages.getPollResults' => 'Get poll results', + 'method_messages.getPollResults_param_peer_type_InputPeer' => 'Peer', + 'method_messages.getPollResults_param_msg_id_type_int' => 'Message ID', + 'method_messages.getOnlines' => 'Get online users', + 'method_messages.getOnlines_param_peer_type_InputPeer' => 'Peer', + 'method_messages.getStatsURL' => 'Get stats URL', + 'method_messages.getStatsURL_param_peer_type_InputPeer' => 'Peer', + 'method_help.getAppUpdate_param_source_type_string' => 'Source', + 'method_help.getAppConfig' => 'Get app config', + 'method_help.getPassportConfig' => 'Get passport config', + 'method_help.getPassportConfig_param_hash_type_Vector t' => 'Hash', + 'method_help.getSupportName' => 'Get support name', + 'method_help.getUserInfo' => 'Get user info', + 'method_help.getUserInfo_param_user_id_type_InputUser' => 'User ID', + 'method_help.editUserInfo' => 'Edit user info', + 'method_help.editUserInfo_param_user_id_type_InputUser' => 'User ID', + 'method_help.editUserInfo_param_message_type_string' => 'Message', + 'method_help.editUserInfo_param_entities_type_Vector t' => 'Entities', + 'method_langpack.getLangPack_param_lang_pack_type_string' => 'Lang pack', + 'method_langpack.getStrings_param_lang_pack_type_string' => 'Lang pack', + 'method_langpack.getDifference_param_lang_code_type_string' => 'Lang code', + 'method_langpack.getLanguages_param_lang_pack_type_string' => 'Lang pack', + 'method_langpack.getLanguage' => 'Get language', + 'method_langpack.getLanguage_param_lang_pack_type_string' => 'Lang pack', + 'method_langpack.getLanguage_param_lang_code_type_string' => 'Lang code', + 'object_inputMediaGeoLive_param_stopped_type_true' => 'Stopped?', + 'object_inputMediaPoll' => 'Media poll', + 'object_inputMediaPoll_param_poll_type_Poll' => 'Poll', + 'object_inputPhoto_param_file_reference_type_bytes' => 'File reference', + 'object_inputFileLocation_param_file_reference_type_bytes' => 'File reference', + 'object_inputDocumentFileLocation_param_file_reference_type_bytes' => 'File reference', + 'object_fileLocation_param_file_reference_type_bytes' => 'File reference', + 'object_chatFull_param_pinned_msg_id_type_int' => 'Pinned msg ID', + 'object_channelFull_param_can_view_stats_type_true' => 'Can view stats?', + 'object_channelFull_param_online_count_type_int' => 'Online count', + 'object_message_param_from_scheduled_type_true' => 'From scheduled?', + 'object_messageMediaPoll' => 'Message media poll', + 'object_messageMediaPoll_param_poll_type_Poll' => 'Poll', + 'object_messageMediaPoll_param_results_type_PollResults' => 'Results', + 'object_messageActionContactSignUp' => 'Message action contact sign up', + 'object_photo_param_file_reference_type_bytes' => 'File reference', + 'object_inputNotifyBroadcasts' => 'Notify broadcasts', + 'object_inputReportReasonChildAbuse' => 'Report reason child abuse', + 'object_inputReportReasonCopyright' => 'Report reason copyright', + 'object_userFull_param_can_pin_message_type_true' => 'Can pin message?', + 'object_userFull_param_pinned_msg_id_type_int' => 'Pinned msg ID', + 'object_messages.channelMessages_param_inexact_type_true' => 'Inexact?', + 'object_updateLangPackTooLong_param_lang_code_type_string' => 'Lang code', + 'object_updateUserPinnedMessage' => 'Update user pinned message', + 'object_updateUserPinnedMessage_param_user_id_type_int' => 'User ID', + 'object_updateUserPinnedMessage_param_id_type_int' => 'ID', + 'object_updateChatPinnedMessage' => 'Update chat pinned message', + 'object_updateChatPinnedMessage_param_chat_id_type_int' => 'Chat ID', + 'object_updateChatPinnedMessage_param_id_type_int' => 'ID', + 'object_updateMessagePoll' => 'Update message poll', + 'object_updateMessagePoll_param_poll_id_type_long' => 'Poll ID', + 'object_updateMessagePoll_param_poll_type_Poll' => 'Poll', + 'object_updateMessagePoll_param_results_type_PollResults' => 'Results', + 'object_config_param_pfs_enabled_type_true' => 'Pfs enabled?', + 'object_config_param_base_lang_pack_version_type_int' => 'Base lang pack version', + 'object_help.appUpdate_param_popup_type_true' => 'Popup?', + 'object_help.appUpdate_param_version_type_string' => 'Version', + 'object_help.appUpdate_param_entities_type_Vector t' => 'Entities', + 'object_help.appUpdate_param_document_type_Document' => 'Document', + 'object_inputDocument_param_file_reference_type_bytes' => 'File reference', + 'object_document_param_file_reference_type_bytes' => 'File reference', + 'object_notifyBroadcasts' => 'Notify broadcasts', + 'object_inputPrivacyKeyPhoneP2P' => 'Privacy key phone p2p', + 'object_privacyKeyPhoneP2P' => 'Privacy key phone p2p', + 'object_authorization_param_current_type_true' => 'Current?', + 'object_authorization_param_official_app_type_true' => 'Official app?', + 'object_authorization_param_password_pending_type_true' => 'Password pending?', + 'object_account.password_param_has_password_type_true' => 'Has password?', + 'object_account.password_param_current_algo_type_PasswordKdfAlgo' => 'Current algo', + 'object_account.password_param_srp_B_type_bytes' => 'Srp b', + 'object_account.password_param_srp_id_type_long' => 'Srp ID', + 'object_account.password_param_new_algo_type_PasswordKdfAlgo' => 'New algo', + 'object_account.password_param_new_secure_algo_type_SecurePasswordKdfAlgo' => 'New secure algo', + 'object_account.passwordSettings_param_secure_settings_type_SecureSecretSettings' => 'Secure settings', + 'object_account.passwordInputSettings_param_new_algo_type_PasswordKdfAlgo' => 'New algo', + 'object_account.passwordInputSettings_param_new_secure_settings_type_SecureSecretSettings' => 'New secure settings', + 'object_textSubscript' => 'Text subscript', + 'object_textSubscript_param_text_type_RichText' => 'Text', + 'object_textSuperscript' => 'Text superscript', + 'object_textSuperscript_param_text_type_RichText' => 'Text', + 'object_textMarked' => 'Text marked', + 'object_textMarked_param_text_type_RichText' => 'Text', + 'object_textPhone' => 'Text phone', + 'object_textPhone_param_text_type_RichText' => 'Text', + 'object_textPhone_param_phone_type_string' => 'Phone', + 'object_textImage' => 'Text image', + 'object_textImage_param_document_id_type_long' => 'Document ID', + 'object_textImage_param_w_type_int' => 'Width', + 'object_textImage_param_h_type_int' => 'Height', + 'object_textAnchor' => 'Text anchor', + 'object_textAnchor_param_text_type_RichText' => 'Text', + 'object_textAnchor_param_name_type_string' => 'Name', + 'object_pageBlockPhoto_param_caption_type_PageCaption' => 'Caption', + 'object_pageBlockPhoto_param_url_type_string' => 'URL', + 'object_pageBlockPhoto_param_webpage_id_type_long' => 'Webpage ID', + 'object_pageBlockVideo_param_caption_type_PageCaption' => 'Caption', + 'object_pageBlockEmbed_param_caption_type_PageCaption' => 'Caption', + 'object_pageBlockEmbedPost_param_caption_type_PageCaption' => 'Caption', + 'object_pageBlockCollage_param_caption_type_PageCaption' => 'Caption', + 'object_pageBlockSlideshow_param_caption_type_PageCaption' => 'Caption', + 'object_pageBlockAudio_param_caption_type_PageCaption' => 'Caption', + 'object_pageBlockKicker' => 'Page block kicker', + 'object_pageBlockKicker_param_text_type_RichText' => 'Text', + 'object_pageBlockTable' => 'Page block table', + 'object_pageBlockTable_param_bordered_type_true' => 'Bordered?', + 'object_pageBlockTable_param_striped_type_true' => 'Striped?', + 'object_pageBlockTable_param_title_type_RichText' => 'Title', + 'object_pageBlockTable_param_rows_type_Vector t' => 'Rows', + 'object_pageBlockOrderedList' => 'Page block ordered list', + 'object_pageBlockOrderedList_param_items_type_Vector t' => 'Items', + 'object_pageBlockDetails' => 'Page block details', + 'object_pageBlockDetails_param_open_type_true' => 'Open?', + 'object_pageBlockDetails_param_blocks_type_Vector t' => 'Blocks', + 'object_pageBlockDetails_param_title_type_RichText' => 'Title', + 'object_pageBlockRelatedArticles' => 'Page block related articles', + 'object_pageBlockRelatedArticles_param_title_type_RichText' => 'Title', + 'object_pageBlockRelatedArticles_param_articles_type_Vector t' => 'Articles', + 'object_pageBlockMap' => 'Page block map', + 'object_pageBlockMap_param_geo_type_GeoPoint' => 'Geo', + 'object_pageBlockMap_param_zoom_type_int' => 'Zoom', + 'object_pageBlockMap_param_w_type_int' => 'Width', + 'object_pageBlockMap_param_h_type_int' => 'Height', + 'object_pageBlockMap_param_caption_type_PageCaption' => 'Caption', + 'object_phoneCall_param_p2p_allowed_type_true' => 'P2p allowed?', + 'object_langPackLanguage_param_official_type_true' => 'Official?', + 'object_langPackLanguage_param_rtl_type_true' => 'Rtl?', + 'object_langPackLanguage_param_beta_type_true' => 'Beta?', + 'object_langPackLanguage_param_base_lang_code_type_string' => 'Base lang code', + 'object_langPackLanguage_param_plural_code_type_string' => 'Plural code', + 'object_langPackLanguage_param_strings_count_type_int' => 'Strings count', + 'object_langPackLanguage_param_translated_count_type_int' => 'Translated count', + 'object_langPackLanguage_param_translations_url_type_string' => 'Translations URL', + 'object_secureValue_param_translation_type_Vector t' => 'Translation', + 'object_inputSecureValue_param_translation_type_Vector t' => 'Translation', + 'object_secureValueError' => 'Secure value error', + 'object_secureValueError_param_type_type_SecureValueType' => 'Type', + 'object_secureValueError_param_hash_type_bytes' => 'Hash', + 'object_secureValueError_param_text_type_string' => 'Text', + 'object_secureValueErrorTranslationFile' => 'Secure value error translation file', + 'object_secureValueErrorTranslationFile_param_type_type_SecureValueType' => 'Type', + 'object_secureValueErrorTranslationFile_param_file_hash_type_bytes' => 'File hash', + 'object_secureValueErrorTranslationFile_param_text_type_string' => 'Text', + 'object_secureValueErrorTranslationFiles' => 'Secure value error translation files', + 'object_secureValueErrorTranslationFiles_param_type_type_SecureValueType' => 'Type', + 'object_secureValueErrorTranslationFiles_param_file_hash_type_Vector t' => 'File hash', + 'object_secureValueErrorTranslationFiles_param_text_type_string' => 'Text', + 'object_passwordKdfAlgoUnknown' => 'Password kdf algo unknown', + 'object_passwordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow' => 'Password kdf algo sha256sha256pbkdf2hmacsh a512iter100000 sha256 mod pow', + 'object_passwordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow_param_salt1_type_bytes' => 'Salt1', + 'object_passwordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow_param_salt2_type_bytes' => 'Salt2', + 'object_passwordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow_param_g_type_int' => 'G', + 'object_passwordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow_param_p_type_bytes' => 'P', + 'object_securePasswordKdfAlgoUnknown' => 'Secure password kdf algo unknown', + 'object_securePasswordKdfAlgoPBKDF2HMACSHA512iter100000' => 'Secure password kdf algo pbkdf2hmacsh a512iter100000', + 'object_securePasswordKdfAlgoPBKDF2HMACSHA512iter100000_param_salt_type_bytes' => 'Salt', + 'object_securePasswordKdfAlgoSHA512' => 'Secure password kdf algo sha512', + 'object_securePasswordKdfAlgoSHA512_param_salt_type_bytes' => 'Salt', + 'object_secureSecretSettings' => 'Secure secret settings', + 'object_secureSecretSettings_param_secure_algo_type_SecurePasswordKdfAlgo' => 'Secure algo', + 'object_secureSecretSettings_param_secure_secret_type_bytes' => 'Secure secret', + 'object_secureSecretSettings_param_secure_secret_id_type_long' => 'Secure secret ID', + 'object_inputCheckPasswordEmpty' => 'Empty input check password', + 'object_inputCheckPasswordSRP' => 'Check password srp', + 'object_inputCheckPasswordSRP_param_srp_id_type_long' => 'Srp ID', + 'object_inputCheckPasswordSRP_param_A_type_bytes' => 'A', + 'object_inputCheckPasswordSRP_param_M1_type_bytes' => 'M1', + 'object_secureRequiredType' => 'Secure required type', + 'object_secureRequiredType_param_native_names_type_true' => 'Native names?', + 'object_secureRequiredType_param_selfie_required_type_true' => 'Selfie required?', + 'object_secureRequiredType_param_translation_required_type_true' => 'Translation required?', + 'object_secureRequiredType_param_type_type_SecureValueType' => 'Type', + 'object_secureRequiredTypeOneOf' => 'Secure required type one of', + 'object_secureRequiredTypeOneOf_param_types_type_Vector t' => 'Types', + 'object_help.passportConfigNotModified' => 'Passport config not modified', + 'object_help.passportConfig' => 'Passport config', + 'object_help.passportConfig_param_hash_type_int' => 'Hash', + 'object_help.passportConfig_param_countries_langs_type_DataJSON' => 'Countries langs', + 'object_inputAppEvent_param_data_type_JSONValue' => 'Data', + 'object_jsonObjectValue' => 'Json object value', + 'object_jsonObjectValue_param_key_type_string' => 'Key', + 'object_jsonObjectValue_param_value_type_JSONValue' => 'Value', + 'object_jsonNull' => 'Json null', + 'object_jsonBool' => 'Json bool', + 'object_jsonBool_param_value_type_Bool' => 'Value?', + 'object_jsonNumber' => 'Json number', + 'object_jsonNumber_param_value_type_double' => 'Value', + 'object_jsonString' => 'Json string', + 'object_jsonString_param_value_type_string' => 'Value', + 'object_jsonArray' => 'Json array', + 'object_jsonArray_param_value_type_Vector t' => 'Value', + 'object_jsonObject' => 'Json object', + 'object_jsonObject_param_value_type_Vector t' => 'Value', + 'object_pageTableCell' => 'Page table cell', + 'object_pageTableCell_param_header_type_true' => 'Header?', + 'object_pageTableCell_param_align_center_type_true' => 'Align center?', + 'object_pageTableCell_param_align_right_type_true' => 'Align right?', + 'object_pageTableCell_param_valign_middle_type_true' => 'Valign middle?', + 'object_pageTableCell_param_valign_bottom_type_true' => 'Valign bottom?', + 'object_pageTableCell_param_text_type_RichText' => 'Text', + 'object_pageTableCell_param_colspan_type_int' => 'Colspan', + 'object_pageTableCell_param_rowspan_type_int' => 'Rowspan', + 'object_pageTableRow' => 'Page table row', + 'object_pageTableRow_param_cells_type_Vector t' => 'Cells', + 'object_pageCaption' => 'Page caption', + 'object_pageCaption_param_text_type_RichText' => 'Text', + 'object_pageCaption_param_credit_type_RichText' => 'Credit', + 'object_pageListItemText' => 'Page list item text', + 'object_pageListItemText_param_text_type_RichText' => 'Text', + 'object_pageListItemBlocks' => 'Page list item blocks', + 'object_pageListItemBlocks_param_blocks_type_Vector t' => 'Blocks', + 'object_pageListOrderedItemText' => 'Page list ordered item text', + 'object_pageListOrderedItemText_param_num_type_string' => 'Num', + 'object_pageListOrderedItemText_param_text_type_RichText' => 'Text', + 'object_pageListOrderedItemBlocks' => 'Page list ordered item blocks', + 'object_pageListOrderedItemBlocks_param_num_type_string' => 'Num', + 'object_pageListOrderedItemBlocks_param_blocks_type_Vector t' => 'Blocks', + 'object_pageRelatedArticle' => 'Page related article', + 'object_pageRelatedArticle_param_url_type_string' => 'URL', + 'object_pageRelatedArticle_param_webpage_id_type_long' => 'Webpage ID', + 'object_pageRelatedArticle_param_title_type_string' => 'Title', + 'object_pageRelatedArticle_param_description_type_string' => 'Description', + 'object_pageRelatedArticle_param_photo_id_type_long' => 'Photo ID', + 'object_pageRelatedArticle_param_author_type_string' => 'Author', + 'object_pageRelatedArticle_param_published_date_type_int' => 'Published date', + 'object_page' => 'Page', + 'object_page_param_part_type_true' => 'Part?', + 'object_page_param_rtl_type_true' => 'Rtl?', + 'object_page_param_v2_type_true' => 'V2?', + 'object_page_param_url_type_string' => 'URL', + 'object_page_param_blocks_type_Vector t' => 'Blocks', + 'object_page_param_photos_type_Vector t' => 'Photos', + 'object_page_param_documents_type_Vector t' => 'Documents', + 'object_help.supportName' => 'Support name', + 'object_help.supportName_param_name_type_string' => 'Name', + 'object_help.userInfoEmpty' => 'Empty user info', + 'object_help.userInfo' => 'User info', + 'object_help.userInfo_param_message_type_string' => 'Message', + 'object_help.userInfo_param_entities_type_Vector t' => 'Entities', + 'object_help.userInfo_param_author_type_string' => 'Author', + 'object_help.userInfo_param_date_type_int' => 'Date', + 'object_pollAnswer' => 'Poll answer', + 'object_pollAnswer_param_text_type_string' => 'Text', + 'object_pollAnswer_param_option_type_bytes' => 'Option', + 'object_poll' => 'Poll', + 'object_poll_param_id_type_long' => 'ID', + 'object_poll_param_closed_type_true' => 'Closed?', + 'object_poll_param_question_type_string' => 'Question', + 'object_poll_param_answers_type_Vector t' => 'Answers', + 'object_pollAnswerVoters' => 'Poll answer voters', + 'object_pollAnswerVoters_param_chosen_type_true' => 'Chosen?', + 'object_pollAnswerVoters_param_option_type_bytes' => 'Option', + 'object_pollAnswerVoters_param_voters_type_int' => 'Voters', + 'object_pollResults' => 'Poll results', + 'object_pollResults_param_min_type_true' => 'Min?', + 'object_pollResults_param_results_type_Vector t' => 'Results', + 'object_pollResults_param_total_voters_type_int' => 'Total voters', + 'object_chatOnlines' => 'Chat onlines', + 'object_chatOnlines_param_onlines_type_int' => 'Onlines', + 'object_statsURL' => 'Stats URL', + 'object_statsURL_param_url_type_string' => 'URL', ), ); @@ -4580,7 +4878,7 @@ class Lang 'type_extract_error_id' => 'Could not extract type: %s with id %s', 'vector_invalid' => 'Invalid vector constructor: ', 'constructor_not_found' => 'Constructor not found for type: ', - 'rand_bytes_too_small' => 'random_bytes is too small!', + 'rand_bytes_too_small' => 'Random_bytes is too small!', 'botapi_conversion_error' => 'Can\'t convert %s to a bot API object', 'non_text_conversion' => 'Can\'t convert non text messages yet!', 'last_byte_invalid' => 'Invalid last byte', @@ -4591,10 +4889,10 @@ class Lang 'shutting_down_handler_pool' => 'Shutting down handler pool for dc %s, %d jobs left', 'secret_chat_skipping' => 'I do not have the secret chat %s in the database, skipping message...', 'fingerprint_mismatch' => 'Key fingerprint mismatch', - 'msg_data_length_too_big' => 'message_data_length is too big', + 'msg_data_length_too_big' => 'Message_data_length is too big', 'length_not_divisible_16' => 'Length of decrypted data is not divisible by 16', - 'msg_key_mismatch' => 'msg_key mismatch', - 'rand_bytes_too_short' => 'random_bytes is too short!', + 'msg_key_mismatch' => 'Msg_key mismatch', + 'rand_bytes_too_short' => 'Random_bytes is too short!', 'resending_unsupported' => 'Resending of messages is not yet supported', 'unrecognized_dec_msg' => 'Unrecognized decrypted message received: ', 'method_req_pq' => 'Requests PQ for factorization', @@ -4616,7 +4914,7 @@ class Lang 'method_rpc_drop_answer_param_req_msg_id_type_long' => 'The message ID of the request', 'method_get_future_salts' => 'Get future salts', 'method_get_future_salts_param_num_type_int' => 'How many salts should be fetched', - 'method_ping' => 'pings the server', + 'method_ping' => 'Pings the server', 'method_ping_param_ping_id_type_long' => 'Ping ID', 'method_ping_delay_disconnect' => 'Pings the server and causes disconection if the same method is not called within ping_disconnect_delay', 'method_ping_delay_disconnect_param_ping_id_type_long' => 'Ping ID', @@ -4625,7 +4923,7 @@ class Lang 'method_destroy_session_param_session_id_type_long' => 'The session to destroy', 'method_http_wait' => 'Makes the server send messages waiting in the buffer', 'method_http_wait_param_max_delay_type_int' => 'Denotes the maximum number of milliseconds that has elapsed between the first message for this session and the transmission of an HTTP response', - 'method_http_wait_param_wait_after_type_int' => 'after the receipt of the latest message for a particular session, the server waits another wait_after milliseconds in case there are more messages. If there are no additional messages, the result is transmitted (a container with all the messages).', + 'method_http_wait_param_wait_after_type_int' => 'After the receipt of the latest message for a particular session, the server waits another wait_after milliseconds in case there are more messages. If there are no additional messages, the result is transmitted (a container with all the messages).', 'method_http_wait_param_max_wait_type_int' => 'If more messages appear, the wait_after timer is reset.', 'method_invokeAfterMsg' => 'Invokes a query after successfull completion of one of the previous queries.', 'method_invokeAfterMsg_param_msg_id_type_long' => 'Message identifier on which a current query depends', @@ -4717,7 +5015,7 @@ class Lang 'method_account.updateProfile_param_last_name_type_string' => 'The last name', 'method_account.updateProfile_param_about_type_string' => 'The bio/about field', 'method_account.updateStatus' => 'Update online status', - 'method_account.updateStatus_param_offline_type_Bool' => 'offline to set the status to offline', + 'method_account.updateStatus_param_offline_type_Bool' => 'Offline to set the status to offline', 'method_account.getWallPapers' => 'Returns a list of available wallpapers.', 'method_account.reportPeer' => 'Report for spam', 'method_account.reportPeer_param_peer_type_InputPeer' => 'The peer to report', @@ -4752,7 +5050,7 @@ class Lang 'method_account.getPassword' => 'Get the current password', 'method_account.getPasswordSettings' => 'Get the current 2FA settings', 'method_account.getPasswordSettings_param_current_password_hash_type_bytes' => 'Use only if you have set a 2FA password: `$current_salt = $MadelineProto->account->getPassword()[\'current_salt\']; $current_password_hash = hash(\'sha256\', $current_salt.$password.$current_salt, true);`', - 'method_account.updatePasswordSettings' => 'Update the 2FA password settings', + 'method_account.updatePasswordSettings' => 'You cannot use this method directly; use $MadelineProto->update_2fa($params), instead (see https://docs.madelineproto.xyz for more info)', 'method_account.updatePasswordSettings_param_current_password_hash_type_bytes' => 'Use only if you have set a 2FA password: `$current_salt = $MadelineProto->account->getPassword()[\'current_salt\']; $current_password_hash = hash(\'sha256\', $current_salt.$password.$current_salt, true);`', 'method_account.updatePasswordSettings_param_new_settings_type_account.PasswordInputSettings' => 'New 2FA settings', 'method_account.sendConfirmPhoneCode' => 'Send confirmation phone code', @@ -4760,7 +5058,7 @@ class Lang 'method_account.sendConfirmPhoneCode_param_hash_type_string' => 'The hash', 'method_account.sendConfirmPhoneCode_param_current_number_type_Bool' => 'The current phone number', 'method_account.confirmPhone' => 'Confirm this phone number is associated to this account, obtain phone_code_hash from sendConfirmPhoneCode', - 'method_account.confirmPhone_param_phone_code_hash_type_string' => 'obtain phone_code_hash from sendConfirmPhoneCode', + 'method_account.confirmPhone_param_phone_code_hash_type_string' => 'Obtain phone_code_hash from sendConfirmPhoneCode', 'method_account.confirmPhone_param_phone_code_type_string' => 'The code sent by sendConfirmPhoneCode', 'method_account.getTmpPassword' => 'Get temporary password for buying products through bots', 'method_account.getTmpPassword_param_password_hash_type_bytes' => 'The password hash', @@ -4775,7 +5073,7 @@ class Lang 'method_users.getFullUser_param_id_type_InputUser' => 'You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://docs.madelineproto.xyz for more info)', 'method_contacts.getStatuses' => 'Get online status of all users', 'method_contacts.getContacts' => 'Get all contacts', - 'method_contacts.getContacts_param_hash_type_int' => 'user ids of contacts previously fetched with this method', + 'method_contacts.getContacts_param_hash_type_int' => 'User ids of contacts previously fetched with this method', 'method_contacts.importContacts' => 'Add phone number as contact', 'method_contacts.importContacts_param_contacts_type_Vector t' => 'The numbers to import', 'method_contacts.deleteContact' => 'Delete a contact', @@ -4806,7 +5104,7 @@ class Lang 'method_contacts.getTopPeers_param_channels_type_true' => 'Fetch channels and supergroups?', 'method_contacts.getTopPeers_param_offset_type_int' => 'Initially 0, then `$offset += $contacts_TopPeers[\'categories\'][\'count\'];`', 'method_contacts.getTopPeers_param_limit_type_int' => 'How many results to fetch', - 'method_contacts.getTopPeers_param_hash_type_int' => 'peer ids previously fetched with this method', + 'method_contacts.getTopPeers_param_hash_type_int' => 'Peer ids previously fetched with this method', 'method_contacts.resetTopPeerRating' => 'Reset top peer rating for a certain category/peer', 'method_contacts.resetTopPeerRating_param_category_type_TopPeerCategory' => 'The category ', 'method_contacts.resetTopPeerRating_param_peer_type_InputPeer' => 'The peer', @@ -4815,9 +5113,9 @@ class Lang 'method_messages.getMessages_param_id_type_Vector t' => 'The IDs of messages to fetch (only for users and normal groups)', 'method_messages.getDialogs' => 'Gets list of chats: you should use $MadelineProto->get_dialogs() instead: https://docs.madelineproto.xyz/docs/DIALOGS.html', 'method_messages.getDialogs_param_exclude_pinned_type_true' => 'Do not fetch pinned chats', - 'method_messages.getDialogs_param_offset_date_type_int' => 'end($res[\'messages\'])[\'date\'];', - 'method_messages.getDialogs_param_offset_id_type_int' => 'end($res[\'messages\'])[\'id\'];', - 'method_messages.getDialogs_param_offset_peer_type_InputPeer' => 'end($res[\'dialogs\'])[\'peer\'];', + 'method_messages.getDialogs_param_offset_date_type_int' => 'End($res[\'messages\'])[\'date\'];', + 'method_messages.getDialogs_param_offset_id_type_int' => 'End($res[\'messages\'])[\'id\'];', + 'method_messages.getDialogs_param_offset_peer_type_InputPeer' => 'End($res[\'dialogs\'])[\'peer\'];', 'method_messages.getDialogs_param_limit_type_int' => 'Number of dialogs to fetch', 'method_messages.getHistory' => 'Get previous messages of a group', 'method_messages.getHistory_param_peer_type_InputPeer' => 'The chat', @@ -4827,7 +5125,7 @@ class Lang 'method_messages.getHistory_param_limit_type_int' => 'Number of messages to fetch', 'method_messages.getHistory_param_max_id_type_int' => 'Maximum message ID to fetch', 'method_messages.getHistory_param_min_id_type_int' => 'Minumum message ID to fetch', - 'method_messages.getHistory_param_hash_type_int' => 'list of IDs of already parsed messages', + 'method_messages.getHistory_param_hash_type_int' => 'List of IDs of already parsed messages', 'method_messages.search' => 'Search peers or messages', 'method_messages.search_param_peer_type_InputPeer' => 'Where to search', 'method_messages.search_param_q_type_string' => 'What to search', @@ -4945,7 +5243,7 @@ class Lang 'method_messages.readMessageContents_param_id_type_Vector t' => 'The messages to mark as read (only users and normal chats, not supergroups)', 'method_messages.getStickers' => 'Get stickers', 'method_messages.getStickers_param_emoticon_type_string' => 'Search by emoji', - 'method_messages.getStickers_param_hash_type_string' => 'previously fetched sticker IDs', + 'method_messages.getStickers_param_hash_type_string' => 'Previously fetched sticker IDs', 'method_messages.getAllStickers' => 'Get all stickerpacks', 'method_messages.getAllStickers_param_hash_type_int' => '0 or $result[\'hash\']', 'method_messages.getWebPagePreview' => 'Get webpage preview', @@ -5174,7 +5472,7 @@ class Lang 'method_updates.getChannelDifference_param_filter_type_ChannelMessagesFilter' => 'You cannot use this method directly, see https://docs.madelineproto.xyz for more info on handling updates', 'method_updates.getChannelDifference_param_pts_type_int' => 'You cannot use this method directly, see https://docs.madelineproto.xyz for more info on handling updates', 'method_updates.getChannelDifference_param_limit_type_int' => 'You cannot use this method directly, see https://docs.madelineproto.xyz for more info on handling updates', - 'method_photos.updateProfilePhoto' => 'Update the profile photo (use photos->uploadProfilePhoto to upload the photo)', + 'method_photos.updateProfilePhoto' => 'Change the profile photo', 'method_photos.updateProfilePhoto_param_id_type_InputPhoto' => 'The photo to use', 'method_photos.uploadProfilePhoto' => 'Upload profile photo', 'method_photos.uploadProfilePhoto_param_file_type_InputFile' => 'The photo', @@ -5249,7 +5547,7 @@ class Lang 'method_channels.getParticipants_param_filter_type_ChannelParticipantsFilter' => 'Member filter', 'method_channels.getParticipants_param_offset_type_int' => 'Offset', 'method_channels.getParticipants_param_limit_type_int' => 'Limit', - 'method_channels.getParticipants_param_hash_type_int' => 'sorted list of IDs of participants you already fetched', + 'method_channels.getParticipants_param_hash_type_int' => 'Sorted list of IDs of participants you already fetched', 'method_channels.getParticipant' => 'Get info about a certain channel/supergroup participant', 'method_channels.getParticipant_param_channel_type_InputChannel' => 'The channel/supergroup', 'method_channels.getParticipant_param_user_id_type_InputUser' => 'The user to fetch info about', @@ -5453,7 +5751,7 @@ class Lang 'method_geochats.getLocated_param_radius_type_int' => 'Radius', 'method_geochats.getLocated_param_limit_type_int' => 'Number of results to return', 'method_geochats.getRecents' => 'Get recent geochats', - 'method_geochats.getRecents_param_offset_type_int' => 'offset', + 'method_geochats.getRecents_param_offset_type_int' => 'Offset', 'method_geochats.getRecents_param_limit_type_int' => 'Number of results to return', 'method_geochats.checkin' => 'Join a geochat', 'method_geochats.checkin_param_peer_type_InputGeoChat' => 'The geochat', @@ -5556,8 +5854,8 @@ class Lang 'method_destroy_auth_key' => 'Destroy current authorization key', 'method_phone.requestCall_param_g_a_type_bytes' => 'You cannot use this method directly, see https://docs.madelineproto.xyz#calls for more info on handling calls', 'method_phone.acceptCall_param_key_fingerprint_type_long' => 'You cannot use this method directly, see https://docs.madelineproto.xyz#calls for more info on handling calls', - 'method_req_DH_params_param_p_type_string' => 'factorized p from pq', - 'method_req_DH_params_param_q_type_string' => 'factorized q from pq', + 'method_req_DH_params_param_p_type_string' => 'Factorized p from pq', + 'method_req_DH_params_param_q_type_string' => 'Factorized q from pq', 'method_req_DH_params_param_encrypted_data_type_string' => 'Encrypted message', 'method_set_client_DH_params_param_encrypted_data_type_string' => 'Encrypted message', 'method_contest.saveDeveloperInfo' => 'Save developer info for telegram contest', @@ -5583,2830 +5881,2830 @@ class Lang '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' => '', - 'object_p_q_inner_data_temp_param_q_type_bytes' => '', - 'object_p_q_inner_data_temp_param_nonce_type_int128' => '', - 'object_p_q_inner_data_temp_param_server_nonce_type_int128' => '', - 'object_p_q_inner_data_temp_param_new_nonce_type_int256' => '', - 'object_p_q_inner_data_temp_param_expires_in_type_int' => '', - 'object_server_DH_params_fail' => '', - 'object_server_DH_params_fail_param_nonce_type_int128' => '', - 'object_server_DH_params_fail_param_server_nonce_type_int128' => '', - 'object_server_DH_params_fail_param_new_nonce_hash_type_int128' => '', - 'object_server_DH_params_ok' => '', - 'object_server_DH_params_ok_param_nonce_type_int128' => '', - 'object_server_DH_params_ok_param_server_nonce_type_int128' => '', - 'object_server_DH_params_ok_param_encrypted_answer_type_bytes' => '', - 'object_server_DH_inner_data' => '', - 'object_server_DH_inner_data_param_nonce_type_int128' => '', - 'object_server_DH_inner_data_param_server_nonce_type_int128' => '', - 'object_server_DH_inner_data_param_g_type_int' => '', - 'object_server_DH_inner_data_param_dh_prime_type_bytes' => '', - 'object_server_DH_inner_data_param_g_a_type_bytes' => '', - 'object_server_DH_inner_data_param_server_time_type_int' => '', - 'object_client_DH_inner_data' => '', - 'object_client_DH_inner_data_param_nonce_type_int128' => '', - 'object_client_DH_inner_data_param_server_nonce_type_int128' => '', - 'object_client_DH_inner_data_param_retry_id_type_long' => '', - 'object_client_DH_inner_data_param_g_b_type_bytes' => '', - 'object_dh_gen_ok' => '', - 'object_dh_gen_ok_param_nonce_type_int128' => '', - 'object_dh_gen_ok_param_server_nonce_type_int128' => '', - 'object_dh_gen_ok_param_new_nonce_hash1_type_int128' => '', - 'object_dh_gen_retry' => '', - 'object_dh_gen_retry_param_nonce_type_int128' => '', - 'object_dh_gen_retry_param_server_nonce_type_int128' => '', - 'object_dh_gen_retry_param_new_nonce_hash2_type_int128' => '', - 'object_dh_gen_fail' => '', - 'object_dh_gen_fail_param_nonce_type_int128' => '', - 'object_dh_gen_fail_param_server_nonce_type_int128' => '', - 'object_dh_gen_fail_param_new_nonce_hash3_type_int128' => '', - 'object_rpc_result' => '', - 'object_rpc_result_param_req_msg_id_type_long' => '', - 'object_rpc_result_param_result_type_Object' => '', - 'object_rpc_error' => '', - 'object_rpc_error_param_error_code_type_int' => '', - 'object_rpc_error_param_error_message_type_string' => '', - 'object_rpc_answer_unknown' => '', - 'object_rpc_answer_dropped_running' => '', - 'object_rpc_answer_dropped' => '', - 'object_rpc_answer_dropped_param_msg_id_type_long' => '', - 'object_rpc_answer_dropped_param_seq_no_type_int' => '', - 'object_rpc_answer_dropped_param_bytes_type_int' => '', - 'object_future_salt' => '', - 'object_future_salt_param_valid_since_type_int' => '', - 'object_future_salt_param_valid_until_type_int' => '', - 'object_future_salt_param_salt_type_long' => '', - 'object_future_salts' => '', - 'object_future_salts_param_req_msg_id_type_long' => '', - 'object_future_salts_param_now_type_int' => '', - 'object_future_salts_param_salts_type_vector' => '', - 'object_pong' => '', - 'object_pong_param_msg_id_type_long' => '', - 'object_pong_param_ping_id_type_long' => '', - 'object_destroy_session_ok' => '', - 'object_destroy_session_ok_param_session_id_type_long' => '', - 'object_destroy_session_none' => '', - 'object_destroy_session_none_param_session_id_type_long' => '', - 'object_new_session_created' => '', - 'object_new_session_created_param_first_msg_id_type_long' => '', - 'object_new_session_created_param_unique_id_type_long' => '', - 'object_new_session_created_param_server_salt_type_long' => '', - 'object_msg_container' => '', - 'object_msg_container_param_messages_type_vector' => '', + 'object_p_q_inner_data_temp' => 'Inner data temp', + 'object_p_q_inner_data_temp_param_pq_type_bytes' => 'Pq', + 'object_p_q_inner_data_temp_param_p_type_bytes' => 'P', + 'object_p_q_inner_data_temp_param_q_type_bytes' => 'Q', + 'object_p_q_inner_data_temp_param_nonce_type_int128' => 'Random number for cryptographic security', + 'object_p_q_inner_data_temp_param_server_nonce_type_int128' => 'Random number for cryptographic security, given by server', + 'object_p_q_inner_data_temp_param_new_nonce_type_int256' => 'New nonce', + 'object_p_q_inner_data_temp_param_expires_in_type_int' => 'Expires in', + 'object_server_DH_params_fail' => 'Server params fail', + 'object_server_DH_params_fail_param_nonce_type_int128' => 'Random number for cryptographic security', + 'object_server_DH_params_fail_param_server_nonce_type_int128' => 'Random number for cryptographic security, given by server', + 'object_server_DH_params_fail_param_new_nonce_hash_type_int128' => 'New nonce hash', + 'object_server_DH_params_ok' => 'Server params ok', + 'object_server_DH_params_ok_param_nonce_type_int128' => 'Random number for cryptographic security', + 'object_server_DH_params_ok_param_server_nonce_type_int128' => 'Random number for cryptographic security, given by server', + 'object_server_DH_params_ok_param_encrypted_answer_type_bytes' => 'Encrypted answer', + 'object_server_DH_inner_data' => 'Server inner data', + 'object_server_DH_inner_data_param_nonce_type_int128' => 'Random number for cryptographic security', + 'object_server_DH_inner_data_param_server_nonce_type_int128' => 'Random number for cryptographic security, given by server', + 'object_server_DH_inner_data_param_g_type_int' => 'G', + 'object_server_DH_inner_data_param_dh_prime_type_bytes' => 'Dh prime', + 'object_server_DH_inner_data_param_g_a_type_bytes' => 'G a', + 'object_server_DH_inner_data_param_server_time_type_int' => 'Server time', + 'object_client_DH_inner_data' => 'Client inner data', + 'object_client_DH_inner_data_param_nonce_type_int128' => 'Random number for cryptographic security', + 'object_client_DH_inner_data_param_server_nonce_type_int128' => 'Random number for cryptographic security, given by server', + 'object_client_DH_inner_data_param_retry_id_type_long' => 'Retry ID', + 'object_client_DH_inner_data_param_g_b_type_bytes' => 'G b', + 'object_dh_gen_ok' => 'Dh gen ok', + 'object_dh_gen_ok_param_nonce_type_int128' => 'Random number for cryptographic security', + 'object_dh_gen_ok_param_server_nonce_type_int128' => 'Random number for cryptographic security, given by server', + 'object_dh_gen_ok_param_new_nonce_hash1_type_int128' => 'New nonce hash1', + 'object_dh_gen_retry' => 'Dh gen retry', + 'object_dh_gen_retry_param_nonce_type_int128' => 'Random number for cryptographic security', + 'object_dh_gen_retry_param_server_nonce_type_int128' => 'Random number for cryptographic security, given by server', + 'object_dh_gen_retry_param_new_nonce_hash2_type_int128' => 'New nonce hash2', + 'object_dh_gen_fail' => 'Dh gen fail', + 'object_dh_gen_fail_param_nonce_type_int128' => 'Random number for cryptographic security', + 'object_dh_gen_fail_param_server_nonce_type_int128' => 'Random number for cryptographic security, given by server', + 'object_dh_gen_fail_param_new_nonce_hash3_type_int128' => 'New nonce hash3', + 'object_rpc_result' => 'Rpc result', + 'object_rpc_result_param_req_msg_id_type_long' => 'Req msg ID', + 'object_rpc_result_param_result_type_Object' => 'Result', + 'object_rpc_error' => 'Rpc error', + 'object_rpc_error_param_error_code_type_int' => 'Error code', + 'object_rpc_error_param_error_message_type_string' => 'Error message', + 'object_rpc_answer_unknown' => 'Rpc answer unknown', + 'object_rpc_answer_dropped_running' => 'Rpc answer dropped running', + 'object_rpc_answer_dropped' => 'Rpc answer dropped', + 'object_rpc_answer_dropped_param_msg_id_type_long' => 'Msg ID', + 'object_rpc_answer_dropped_param_seq_no_type_int' => 'Seq no', + 'object_rpc_answer_dropped_param_bytes_type_int' => 'Bytes', + 'object_future_salt' => 'Future salt', + 'object_future_salt_param_valid_since_type_int' => 'Valid since', + 'object_future_salt_param_valid_until_type_int' => 'Valid until', + 'object_future_salt_param_salt_type_long' => 'Salt', + 'object_future_salts' => 'Future salts', + 'object_future_salts_param_req_msg_id_type_long' => 'Req msg ID', + 'object_future_salts_param_now_type_int' => 'Now', + 'object_future_salts_param_salts_type_vector' => 'Salts', + 'object_pong' => 'Pong', + 'object_pong_param_msg_id_type_long' => 'Msg ID', + 'object_pong_param_ping_id_type_long' => 'Ping ID', + 'object_destroy_session_ok' => 'Destroy session ok', + 'object_destroy_session_ok_param_session_id_type_long' => 'Session ID', + 'object_destroy_session_none' => 'Destroy session none', + 'object_destroy_session_none_param_session_id_type_long' => 'Session ID', + 'object_new_session_created' => 'New session created', + 'object_new_session_created_param_first_msg_id_type_long' => 'First msg ID', + 'object_new_session_created_param_unique_id_type_long' => 'Unique ID', + 'object_new_session_created_param_server_salt_type_long' => 'Server salt', + 'object_msg_container' => 'Msg container', + 'object_msg_container_param_messages_type_vector' => 'Messages', 'object_MTmessage' => 'MTProto message', 'object_MTmessage_param_msg_id_type_long' => 'Message ID', 'object_MTmessage_param_seqno_type_int' => 'Seqno', 'object_MTmessage_param_bytes_type_int' => 'Message body', 'object_MTmessage_param_body_type_Object' => 'Message body', - 'object_msg_copy' => '', - 'object_msg_copy_param_orig_message_type_MTMessage' => '', - 'object_gzip_packed' => '', - 'object_gzip_packed_param_packed_data_type_bytes' => '', - 'object_msgs_ack' => '', - 'object_msgs_ack_param_msg_ids_type_Vector t' => '', - 'object_bad_msg_notification' => '', - 'object_bad_msg_notification_param_bad_msg_id_type_long' => '', - 'object_bad_msg_notification_param_bad_msg_seqno_type_int' => '', - 'object_bad_msg_notification_param_error_code_type_int' => '', - 'object_bad_server_salt' => '', - 'object_bad_server_salt_param_bad_msg_id_type_long' => '', - 'object_bad_server_salt_param_bad_msg_seqno_type_int' => '', - 'object_bad_server_salt_param_error_code_type_int' => '', - 'object_bad_server_salt_param_new_server_salt_type_long' => '', - 'object_msg_resend_req' => '', - 'object_msg_resend_req_param_msg_ids_type_Vector t' => '', - 'object_msgs_state_req' => '', - 'object_msgs_state_req_param_msg_ids_type_Vector t' => '', - 'object_msgs_state_info' => '', - 'object_msgs_state_info_param_req_msg_id_type_long' => '', - 'object_msgs_state_info_param_info_type_bytes' => '', - 'object_msgs_all_info' => '', - 'object_msgs_all_info_param_msg_ids_type_Vector t' => '', - 'object_msgs_all_info_param_info_type_bytes' => '', - 'object_msg_detailed_info' => '', - 'object_msg_detailed_info_param_msg_id_type_long' => '', - 'object_msg_detailed_info_param_answer_msg_id_type_long' => '', - 'object_msg_detailed_info_param_bytes_type_int' => '', - 'object_msg_detailed_info_param_status_type_int' => '', - 'object_msg_new_detailed_info' => '', - 'object_msg_new_detailed_info_param_answer_msg_id_type_long' => '', - 'object_msg_new_detailed_info_param_bytes_type_int' => '', - 'object_msg_new_detailed_info_param_status_type_int' => '', - 'object_bind_auth_key_inner' => '', - 'object_bind_auth_key_inner_param_nonce_type_long' => '', - 'object_bind_auth_key_inner_param_temp_auth_key_id_type_long' => '', - 'object_bind_auth_key_inner_param_perm_auth_key_id_type_long' => '', - 'object_bind_auth_key_inner_param_temp_session_id_type_long' => '', - 'object_bind_auth_key_inner_param_expires_at_type_int' => '', - 'object_boolFalse' => '', - 'object_boolTrue' => '', - 'object_true' => '', - 'object_error' => '', - 'object_error_param_code_type_int' => '', - 'object_error_param_text_type_string' => '', - 'object_null' => '', - 'object_inputPeerEmpty' => '', - 'object_inputPeerSelf' => '', - 'object_inputPeerChat' => '', - 'object_inputPeerChat_param_chat_id_type_int' => '', - 'object_inputPeerUser' => '', - 'object_inputPeerUser_param_user_id_type_int' => '', - 'object_inputPeerUser_param_access_hash_type_long' => '', - 'object_inputPeerChannel' => '', - 'object_inputPeerChannel_param_channel_id_type_int' => '', - 'object_inputPeerChannel_param_access_hash_type_long' => '', - 'object_inputUserEmpty' => '', - 'object_inputUserSelf' => '', - 'object_inputUser' => '', - 'object_inputUser_param_user_id_type_int' => '', - 'object_inputUser_param_access_hash_type_long' => '', - 'object_inputPhoneContact' => '', - 'object_inputPhoneContact_param_client_id_type_long' => '', - 'object_inputPhoneContact_param_phone_type_string' => '', - 'object_inputPhoneContact_param_first_name_type_string' => '', - 'object_inputPhoneContact_param_last_name_type_string' => '', - 'object_inputFile' => '', - 'object_inputFile_param_id_type_long' => '', - 'object_inputFile_param_parts_type_int' => '', - 'object_inputFile_param_name_type_string' => '', - 'object_inputFile_param_md5_checksum_type_string' => '', - 'object_inputFileBig' => '', - 'object_inputFileBig_param_id_type_long' => '', - 'object_inputFileBig_param_parts_type_int' => '', - 'object_inputFileBig_param_name_type_string' => '', - 'object_inputMediaEmpty' => '', - 'object_inputMediaUploadedPhoto' => '', - 'object_inputMediaUploadedPhoto_param_file_type_InputFile' => '', - 'object_inputMediaUploadedPhoto_param_stickers_type_Vector t' => '', - 'object_inputMediaUploadedPhoto_param_ttl_seconds_type_int' => '', - 'object_inputMediaPhoto' => '', - 'object_inputMediaPhoto_param_id_type_InputPhoto' => '', - 'object_inputMediaPhoto_param_ttl_seconds_type_int' => '', - 'object_inputMediaGeoPoint' => '', - 'object_inputMediaGeoPoint_param_geo_point_type_InputGeoPoint' => '', - 'object_inputMediaContact' => '', - 'object_inputMediaContact_param_phone_number_type_string' => '', - 'object_inputMediaContact_param_first_name_type_string' => '', - 'object_inputMediaContact_param_last_name_type_string' => '', - 'object_inputMediaUploadedDocument' => '', - 'object_inputMediaUploadedDocument_param_nosound_video_type_true' => '', - 'object_inputMediaUploadedDocument_param_file_type_InputFile' => '', - 'object_inputMediaUploadedDocument_param_thumb_type_InputFile' => '', - 'object_inputMediaUploadedDocument_param_mime_type_type_string' => '', - 'object_inputMediaUploadedDocument_param_attributes_type_Vector t' => '', - 'object_inputMediaUploadedDocument_param_stickers_type_Vector t' => '', - 'object_inputMediaUploadedDocument_param_ttl_seconds_type_int' => '', - 'object_inputMediaDocument' => '', - 'object_inputMediaDocument_param_id_type_InputDocument' => '', - 'object_inputMediaDocument_param_ttl_seconds_type_int' => '', - 'object_inputMediaVenue' => '', - 'object_inputMediaVenue_param_geo_point_type_InputGeoPoint' => '', - 'object_inputMediaVenue_param_title_type_string' => '', - 'object_inputMediaVenue_param_address_type_string' => '', - 'object_inputMediaVenue_param_provider_type_string' => '', - 'object_inputMediaVenue_param_venue_id_type_string' => '', - 'object_inputMediaVenue_param_venue_type_type_string' => '', - 'object_inputMediaGifExternal' => '', - 'object_inputMediaGifExternal_param_url_type_string' => '', - 'object_inputMediaGifExternal_param_q_type_string' => '', - 'object_inputMediaPhotoExternal' => '', - 'object_inputMediaPhotoExternal_param_url_type_string' => '', - 'object_inputMediaPhotoExternal_param_ttl_seconds_type_int' => '', - 'object_inputMediaDocumentExternal' => '', - 'object_inputMediaDocumentExternal_param_url_type_string' => '', - 'object_inputMediaDocumentExternal_param_ttl_seconds_type_int' => '', - 'object_inputMediaGame' => '', - 'object_inputMediaGame_param_id_type_InputGame' => '', - 'object_inputMediaInvoice' => '', - 'object_inputMediaInvoice_param_title_type_string' => '', - 'object_inputMediaInvoice_param_description_type_string' => '', - 'object_inputMediaInvoice_param_photo_type_InputWebDocument' => '', - 'object_inputMediaInvoice_param_invoice_type_Invoice' => '', - 'object_inputMediaInvoice_param_payload_type_bytes' => '', - 'object_inputMediaInvoice_param_provider_type_string' => '', - 'object_inputMediaInvoice_param_provider_data_type_DataJSON' => '', - 'object_inputMediaInvoice_param_start_param_type_string' => '', - 'object_inputMediaGeoLive' => '', - 'object_inputMediaGeoLive_param_geo_point_type_InputGeoPoint' => '', - 'object_inputMediaGeoLive_param_period_type_int' => '', - 'object_inputChatPhotoEmpty' => '', - 'object_inputChatUploadedPhoto' => '', - 'object_inputChatUploadedPhoto_param_file_type_InputFile' => '', - 'object_inputChatPhoto' => '', - 'object_inputChatPhoto_param_id_type_InputPhoto' => '', - 'object_inputGeoPointEmpty' => '', - 'object_inputGeoPoint' => '', - 'object_inputGeoPoint_param_lat_type_double' => '', - 'object_inputGeoPoint_param_long_type_double' => '', - 'object_inputPhotoEmpty' => '', - 'object_inputPhoto' => '', - 'object_inputPhoto_param_id_type_long' => '', - 'object_inputPhoto_param_access_hash_type_long' => '', - 'object_inputFileLocation' => '', - 'object_inputFileLocation_param_volume_id_type_long' => '', - 'object_inputFileLocation_param_local_id_type_int' => '', - 'object_inputFileLocation_param_secret_type_long' => '', - 'object_inputEncryptedFileLocation' => '', - 'object_inputEncryptedFileLocation_param_id_type_long' => '', - 'object_inputEncryptedFileLocation_param_access_hash_type_long' => '', - 'object_inputDocumentFileLocation' => '', - 'object_inputDocumentFileLocation_param_id_type_long' => '', - 'object_inputDocumentFileLocation_param_access_hash_type_long' => '', - 'object_inputDocumentFileLocation_param_version_type_int' => '', - 'object_inputAppEvent' => '', - 'object_inputAppEvent_param_time_type_double' => '', - 'object_inputAppEvent_param_type_type_string' => '', - 'object_inputAppEvent_param_peer_type_long' => '', - 'object_inputAppEvent_param_data_type_string' => '', - 'object_peerUser' => '', - 'object_peerUser_param_user_id_type_int' => '', - 'object_peerChat' => '', - 'object_peerChat_param_chat_id_type_int' => '', - 'object_peerChannel' => '', - 'object_peerChannel_param_channel_id_type_int' => '', - 'object_storage.fileUnknown' => '', - 'object_storage.filePartial' => '', - 'object_storage.fileJpeg' => '', - 'object_storage.fileGif' => '', - 'object_storage.filePng' => '', - 'object_storage.filePdf' => '', - 'object_storage.fileMp3' => '', - 'object_storage.fileMov' => '', - 'object_storage.fileMp4' => '', - 'object_storage.fileWebp' => '', - 'object_fileLocationUnavailable' => '', - 'object_fileLocationUnavailable_param_volume_id_type_long' => '', - 'object_fileLocationUnavailable_param_local_id_type_int' => '', - 'object_fileLocationUnavailable_param_secret_type_long' => '', - 'object_fileLocation' => '', - 'object_fileLocation_param_dc_id_type_int' => '', - 'object_fileLocation_param_volume_id_type_long' => '', - 'object_fileLocation_param_local_id_type_int' => '', - 'object_fileLocation_param_secret_type_long' => '', - 'object_userEmpty' => '', - 'object_userEmpty_param_id_type_int' => '', - 'object_user' => '', - 'object_user_param_self_type_true' => '', - 'object_user_param_contact_type_true' => '', - 'object_user_param_mutual_contact_type_true' => '', - 'object_user_param_deleted_type_true' => '', - 'object_user_param_bot_type_true' => '', - 'object_user_param_bot_chat_history_type_true' => '', - 'object_user_param_bot_nochats_type_true' => '', - 'object_user_param_verified_type_true' => '', - 'object_user_param_restricted_type_true' => '', - 'object_user_param_min_type_true' => '', - 'object_user_param_bot_inline_geo_type_true' => '', - 'object_user_param_id_type_int' => '', - 'object_user_param_access_hash_type_long' => '', - 'object_user_param_first_name_type_string' => '', - 'object_user_param_last_name_type_string' => '', - 'object_user_param_username_type_string' => '', - 'object_user_param_phone_type_string' => '', - 'object_user_param_photo_type_UserProfilePhoto' => '', - 'object_user_param_status_type_UserStatus' => '', - 'object_user_param_bot_info_version_type_int' => '', - 'object_user_param_restriction_reason_type_string' => '', - 'object_user_param_bot_inline_placeholder_type_string' => '', - 'object_user_param_lang_code_type_string' => '', - 'object_userProfilePhotoEmpty' => '', - 'object_userProfilePhoto' => '', - 'object_userProfilePhoto_param_photo_id_type_long' => '', - 'object_userProfilePhoto_param_photo_small_type_FileLocation' => '', - 'object_userProfilePhoto_param_photo_big_type_FileLocation' => '', - 'object_chatEmpty' => '', - 'object_chatEmpty_param_id_type_int' => '', - 'object_chat' => '', - 'object_chat_param_creator_type_true' => '', - 'object_chat_param_kicked_type_true' => '', - 'object_chat_param_left_type_true' => '', - 'object_chat_param_admins_enabled_type_true' => '', - 'object_chat_param_admin_type_true' => '', - 'object_chat_param_deactivated_type_true' => '', - 'object_chat_param_id_type_int' => '', - 'object_chat_param_title_type_string' => '', - 'object_chat_param_photo_type_ChatPhoto' => '', - 'object_chat_param_participants_count_type_int' => '', - 'object_chat_param_date_type_int' => '', - 'object_chat_param_version_type_int' => '', - 'object_chat_param_migrated_to_type_InputChannel' => '', - 'object_chatForbidden' => '', - 'object_chatForbidden_param_id_type_int' => '', - 'object_chatForbidden_param_title_type_string' => '', - 'object_channel' => '', - 'object_channel_param_creator_type_true' => '', - 'object_channel_param_left_type_true' => '', - 'object_channel_param_editor_type_true' => '', - 'object_channel_param_broadcast_type_true' => '', - 'object_channel_param_verified_type_true' => '', - 'object_channel_param_megagroup_type_true' => '', - 'object_channel_param_restricted_type_true' => '', - 'object_channel_param_democracy_type_true' => '', - 'object_channel_param_signatures_type_true' => '', - 'object_channel_param_min_type_true' => '', - 'object_channel_param_id_type_int' => '', - 'object_channel_param_access_hash_type_long' => '', - 'object_channel_param_title_type_string' => '', - 'object_channel_param_username_type_string' => '', - 'object_channel_param_photo_type_ChatPhoto' => '', - 'object_channel_param_date_type_int' => '', - 'object_channel_param_version_type_int' => '', - 'object_channel_param_restriction_reason_type_string' => '', - 'object_channel_param_admin_rights_type_ChannelAdminRights' => '', - 'object_channel_param_banned_rights_type_ChannelBannedRights' => '', - 'object_channel_param_participants_count_type_int' => '', - 'object_channelForbidden' => '', - 'object_channelForbidden_param_broadcast_type_true' => '', - 'object_channelForbidden_param_megagroup_type_true' => '', - 'object_channelForbidden_param_id_type_int' => '', - 'object_channelForbidden_param_access_hash_type_long' => '', - 'object_channelForbidden_param_title_type_string' => '', - 'object_channelForbidden_param_until_date_type_int' => '', - 'object_chatFull' => '', - 'object_chatFull_param_id_type_int' => '', - 'object_chatFull_param_participants_type_ChatParticipants' => '', - 'object_chatFull_param_chat_photo_type_Photo' => '', - 'object_chatFull_param_notify_settings_type_PeerNotifySettings' => '', - 'object_chatFull_param_exported_invite_type_ExportedChatInvite' => '', - 'object_chatFull_param_bot_info_type_Vector t' => '', - 'object_channelFull' => '', - 'object_channelFull_param_can_view_participants_type_true' => '', - 'object_channelFull_param_can_set_username_type_true' => '', - 'object_channelFull_param_can_set_stickers_type_true' => '', - 'object_channelFull_param_hidden_prehistory_type_true' => '', - 'object_channelFull_param_id_type_int' => '', - 'object_channelFull_param_about_type_string' => '', - 'object_channelFull_param_participants_count_type_int' => '', - 'object_channelFull_param_admins_count_type_int' => '', - 'object_channelFull_param_kicked_count_type_int' => '', - 'object_channelFull_param_banned_count_type_int' => '', - 'object_channelFull_param_read_inbox_max_id_type_int' => '', - 'object_channelFull_param_read_outbox_max_id_type_int' => '', - 'object_channelFull_param_unread_count_type_int' => '', - 'object_channelFull_param_chat_photo_type_Photo' => '', - 'object_channelFull_param_notify_settings_type_PeerNotifySettings' => '', - 'object_channelFull_param_exported_invite_type_ExportedChatInvite' => '', - 'object_channelFull_param_bot_info_type_Vector t' => '', - 'object_channelFull_param_migrated_from_chat_id_type_int' => '', - 'object_channelFull_param_migrated_from_max_id_type_int' => '', - 'object_channelFull_param_pinned_msg_id_type_int' => '', - 'object_channelFull_param_stickerset_type_StickerSet' => '', - 'object_channelFull_param_available_min_id_type_int' => '', - 'object_chatParticipant' => '', - 'object_chatParticipant_param_user_id_type_int' => '', - 'object_chatParticipant_param_inviter_id_type_int' => '', - 'object_chatParticipant_param_date_type_int' => '', - 'object_chatParticipantCreator' => '', - 'object_chatParticipantCreator_param_user_id_type_int' => '', - 'object_chatParticipantAdmin' => '', - 'object_chatParticipantAdmin_param_user_id_type_int' => '', - 'object_chatParticipantAdmin_param_inviter_id_type_int' => '', - 'object_chatParticipantAdmin_param_date_type_int' => '', - 'object_chatParticipantsForbidden' => '', - 'object_chatParticipantsForbidden_param_chat_id_type_int' => '', - 'object_chatParticipantsForbidden_param_self_participant_type_ChatParticipant' => '', - 'object_chatParticipants' => '', - 'object_chatParticipants_param_chat_id_type_int' => '', - 'object_chatParticipants_param_participants_type_Vector t' => '', - 'object_chatParticipants_param_version_type_int' => '', - 'object_chatPhotoEmpty' => '', - 'object_chatPhoto' => '', - 'object_chatPhoto_param_photo_small_type_FileLocation' => '', - 'object_chatPhoto_param_photo_big_type_FileLocation' => '', - 'object_messageEmpty' => '', - 'object_messageEmpty_param_id_type_int' => '', - 'object_message' => '', - 'object_message_param_out_type_true' => '', - 'object_message_param_mentioned_type_true' => '', - 'object_message_param_media_unread_type_true' => '', - 'object_message_param_silent_type_true' => '', - 'object_message_param_post_type_true' => '', - 'object_message_param_id_type_int' => '', - 'object_message_param_from_id_type_int' => '', - 'object_message_param_to_id_type_Peer' => '', - 'object_message_param_fwd_from_type_MessageFwdHeader' => '', - 'object_message_param_via_bot_id_type_int' => '', - 'object_message_param_reply_to_msg_id_type_int' => '', - 'object_message_param_date_type_int' => '', - 'object_message_param_message_type_string' => '', - 'object_message_param_media_type_MessageMedia' => '', - 'object_message_param_reply_markup_type_ReplyMarkup' => '', - 'object_message_param_entities_type_Vector t' => '', - 'object_message_param_views_type_int' => '', - 'object_message_param_edit_date_type_int' => '', - 'object_message_param_post_author_type_string' => '', - 'object_message_param_grouped_id_type_long' => '', - 'object_messageService' => '', - 'object_messageService_param_out_type_true' => '', - 'object_messageService_param_mentioned_type_true' => '', - 'object_messageService_param_media_unread_type_true' => '', - 'object_messageService_param_silent_type_true' => '', - 'object_messageService_param_post_type_true' => '', - 'object_messageService_param_id_type_int' => '', - 'object_messageService_param_from_id_type_int' => '', - 'object_messageService_param_to_id_type_Peer' => '', - 'object_messageService_param_reply_to_msg_id_type_int' => '', - 'object_messageService_param_date_type_int' => '', - 'object_messageService_param_action_type_MessageAction' => '', - 'object_messageMediaEmpty' => '', - 'object_messageMediaPhoto' => '', - 'object_messageMediaPhoto_param_photo_type_Photo' => '', - 'object_messageMediaPhoto_param_ttl_seconds_type_int' => '', - 'object_messageMediaGeo' => '', - 'object_messageMediaGeo_param_geo_type_GeoPoint' => '', - 'object_messageMediaContact' => '', - 'object_messageMediaContact_param_phone_number_type_string' => '', - 'object_messageMediaContact_param_first_name_type_string' => '', - 'object_messageMediaContact_param_last_name_type_string' => '', - 'object_messageMediaContact_param_user_id_type_int' => '', - 'object_messageMediaUnsupported' => '', - 'object_messageMediaDocument' => '', - 'object_messageMediaDocument_param_document_type_Document' => '', - 'object_messageMediaDocument_param_ttl_seconds_type_int' => '', - 'object_messageMediaWebPage' => '', - 'object_messageMediaWebPage_param_webpage_type_WebPage' => '', - 'object_messageMediaVenue' => '', - 'object_messageMediaVenue_param_geo_type_GeoPoint' => '', - 'object_messageMediaVenue_param_title_type_string' => '', - 'object_messageMediaVenue_param_address_type_string' => '', - 'object_messageMediaVenue_param_provider_type_string' => '', - 'object_messageMediaVenue_param_venue_id_type_string' => '', - 'object_messageMediaVenue_param_venue_type_type_string' => '', - 'object_messageMediaGame' => '', - 'object_messageMediaGame_param_game_type_Game' => '', - 'object_messageMediaInvoice' => '', - 'object_messageMediaInvoice_param_shipping_address_requested_type_true' => '', - 'object_messageMediaInvoice_param_test_type_true' => '', - 'object_messageMediaInvoice_param_title_type_string' => '', - 'object_messageMediaInvoice_param_description_type_string' => '', - 'object_messageMediaInvoice_param_photo_type_WebDocument' => '', - 'object_messageMediaInvoice_param_receipt_msg_id_type_int' => '', - 'object_messageMediaInvoice_param_currency_type_string' => '', - 'object_messageMediaInvoice_param_total_amount_type_long' => '', - 'object_messageMediaInvoice_param_start_param_type_string' => '', - 'object_messageMediaGeoLive' => '', - 'object_messageMediaGeoLive_param_geo_type_GeoPoint' => '', - 'object_messageMediaGeoLive_param_period_type_int' => '', - 'object_messageActionEmpty' => '', - 'object_messageActionChatCreate' => '', - 'object_messageActionChatCreate_param_title_type_string' => '', - 'object_messageActionChatCreate_param_users_type_Vector t' => '', - 'object_messageActionChatEditTitle' => '', - 'object_messageActionChatEditTitle_param_title_type_string' => '', - 'object_messageActionChatEditPhoto' => '', - 'object_messageActionChatEditPhoto_param_photo_type_Photo' => '', - 'object_messageActionChatDeletePhoto' => '', - 'object_messageActionChatAddUser' => '', - 'object_messageActionChatAddUser_param_users_type_Vector t' => '', - 'object_messageActionChatDeleteUser' => '', - 'object_messageActionChatDeleteUser_param_user_id_type_int' => '', - 'object_messageActionChatJoinedByLink' => '', - 'object_messageActionChatJoinedByLink_param_inviter_id_type_int' => '', - 'object_messageActionChannelCreate' => '', - 'object_messageActionChannelCreate_param_title_type_string' => '', - 'object_messageActionChatMigrateTo' => '', - 'object_messageActionChatMigrateTo_param_channel_id_type_int' => '', - 'object_messageActionChannelMigrateFrom' => '', - 'object_messageActionChannelMigrateFrom_param_title_type_string' => '', - 'object_messageActionChannelMigrateFrom_param_chat_id_type_int' => '', - 'object_messageActionPinMessage' => '', - 'object_messageActionHistoryClear' => '', - 'object_messageActionGameScore' => '', - 'object_messageActionGameScore_param_game_id_type_long' => '', - 'object_messageActionGameScore_param_score_type_int' => '', - 'object_messageActionPaymentSentMe' => '', - 'object_messageActionPaymentSentMe_param_currency_type_string' => '', - 'object_messageActionPaymentSentMe_param_total_amount_type_long' => '', - 'object_messageActionPaymentSentMe_param_payload_type_bytes' => '', - 'object_messageActionPaymentSentMe_param_info_type_PaymentRequestedInfo' => '', - 'object_messageActionPaymentSentMe_param_shipping_option_id_type_string' => '', - 'object_messageActionPaymentSentMe_param_charge_type_PaymentCharge' => '', - 'object_messageActionPaymentSent' => '', - 'object_messageActionPaymentSent_param_currency_type_string' => '', - 'object_messageActionPaymentSent_param_total_amount_type_long' => '', - 'object_messageActionPhoneCall' => '', - 'object_messageActionPhoneCall_param_call_id_type_long' => '', - 'object_messageActionPhoneCall_param_reason_type_PhoneCallDiscardReason' => '', - 'object_messageActionPhoneCall_param_duration_type_int' => '', - 'object_messageActionScreenshotTaken' => '', - 'object_messageActionCustomAction' => '', - 'object_messageActionCustomAction_param_message_type_string' => '', - 'object_dialog' => '', - 'object_dialog_param_pinned_type_true' => '', - 'object_dialog_param_peer_type_Peer' => '', - 'object_dialog_param_top_message_type_int' => '', - 'object_dialog_param_read_inbox_max_id_type_int' => '', - 'object_dialog_param_read_outbox_max_id_type_int' => '', - 'object_dialog_param_unread_count_type_int' => '', - 'object_dialog_param_unread_mentions_count_type_int' => '', - 'object_dialog_param_notify_settings_type_PeerNotifySettings' => '', - 'object_dialog_param_pts_type_int' => '', - 'object_dialog_param_draft_type_DraftMessage' => '', - 'object_photoEmpty' => '', - 'object_photoEmpty_param_id_type_long' => '', - 'object_photo' => '', - 'object_photo_param_has_stickers_type_true' => '', - 'object_photo_param_id_type_long' => '', - 'object_photo_param_access_hash_type_long' => '', - 'object_photo_param_date_type_int' => '', - 'object_photo_param_sizes_type_Vector t' => '', - 'object_photoSizeEmpty' => '', - 'object_photoSizeEmpty_param_type_type_string' => '', - 'object_photoSize' => '', - 'object_photoSize_param_type_type_string' => '', - 'object_photoSize_param_location_type_FileLocation' => '', - 'object_photoSize_param_w_type_int' => '', - 'object_photoSize_param_h_type_int' => '', - 'object_photoSize_param_size_type_int' => '', - 'object_photoCachedSize' => '', - 'object_photoCachedSize_param_type_type_string' => '', - 'object_photoCachedSize_param_location_type_FileLocation' => '', - 'object_photoCachedSize_param_w_type_int' => '', - 'object_photoCachedSize_param_h_type_int' => '', - 'object_photoCachedSize_param_bytes_type_bytes' => '', - 'object_geoPointEmpty' => '', - 'object_geoPoint' => '', - 'object_geoPoint_param_long_type_double' => '', - 'object_geoPoint_param_lat_type_double' => '', - 'object_auth.checkedPhone' => '', - 'object_auth.checkedPhone_param_phone_registered_type_Bool' => '', - 'object_auth.sentCode' => '', - 'object_auth.sentCode_param_phone_registered_type_true' => '', - 'object_auth.sentCode_param_type_type_auth.SentCodeType' => '', - 'object_auth.sentCode_param_phone_code_hash_type_string' => '', - 'object_auth.sentCode_param_next_type_type_auth.CodeType' => '', - 'object_auth.sentCode_param_timeout_type_int' => '', - 'object_auth.authorization' => '', - 'object_auth.authorization_param_tmp_sessions_type_int' => '', - 'object_auth.authorization_param_user_type_User' => '', - 'object_auth.exportedAuthorization' => '', - 'object_auth.exportedAuthorization_param_id_type_int' => '', - 'object_auth.exportedAuthorization_param_bytes_type_bytes' => '', - 'object_inputNotifyPeer' => '', - 'object_inputNotifyPeer_param_peer_type_InputPeer' => '', - 'object_inputNotifyUsers' => '', - 'object_inputNotifyChats' => '', - 'object_inputNotifyAll' => '', - 'object_inputPeerNotifyEventsEmpty' => '', - 'object_inputPeerNotifyEventsAll' => '', - 'object_inputPeerNotifySettings' => '', - 'object_inputPeerNotifySettings_param_show_previews_type_true' => '', - 'object_inputPeerNotifySettings_param_silent_type_true' => '', - 'object_inputPeerNotifySettings_param_mute_until_type_int' => '', - 'object_inputPeerNotifySettings_param_sound_type_string' => '', - 'object_peerNotifyEventsEmpty' => '', - 'object_peerNotifyEventsAll' => '', - 'object_peerNotifySettingsEmpty' => '', - 'object_peerNotifySettings' => '', - 'object_peerNotifySettings_param_show_previews_type_true' => '', - 'object_peerNotifySettings_param_silent_type_true' => '', - 'object_peerNotifySettings_param_mute_until_type_int' => '', - 'object_peerNotifySettings_param_sound_type_string' => '', - 'object_peerSettings' => '', - 'object_peerSettings_param_report_spam_type_true' => '', - 'object_wallPaper' => '', - 'object_wallPaper_param_id_type_int' => '', - 'object_wallPaper_param_title_type_string' => '', - 'object_wallPaper_param_sizes_type_Vector t' => '', - 'object_wallPaper_param_color_type_int' => '', - 'object_wallPaperSolid' => '', - 'object_wallPaperSolid_param_id_type_int' => '', - 'object_wallPaperSolid_param_title_type_string' => '', - 'object_wallPaperSolid_param_bg_color_type_int' => '', - 'object_wallPaperSolid_param_color_type_int' => '', - 'object_inputReportReasonSpam' => '', - 'object_inputReportReasonViolence' => '', - 'object_inputReportReasonPornography' => '', - 'object_inputReportReasonOther' => '', - 'object_inputReportReasonOther_param_text_type_string' => '', - 'object_userFull' => '', - 'object_userFull_param_blocked_type_true' => '', - 'object_userFull_param_phone_calls_available_type_true' => '', - 'object_userFull_param_phone_calls_private_type_true' => '', - 'object_userFull_param_user_type_User' => '', - 'object_userFull_param_about_type_string' => '', - 'object_userFull_param_link_type_contacts.Link' => '', - 'object_userFull_param_profile_photo_type_Photo' => '', - 'object_userFull_param_notify_settings_type_PeerNotifySettings' => '', - 'object_userFull_param_bot_info_type_BotInfo' => '', - 'object_userFull_param_common_chats_count_type_int' => '', - 'object_contact' => '', - 'object_contact_param_user_id_type_int' => '', - 'object_contact_param_mutual_type_Bool' => '', - 'object_importedContact' => '', - 'object_importedContact_param_user_id_type_int' => '', - 'object_importedContact_param_client_id_type_long' => '', - 'object_contactBlocked' => '', - 'object_contactBlocked_param_user_id_type_int' => '', - 'object_contactBlocked_param_date_type_int' => '', - 'object_contactStatus' => '', - 'object_contactStatus_param_user_id_type_int' => '', - 'object_contactStatus_param_status_type_UserStatus' => '', - 'object_contacts.link' => '', - 'object_contacts.link_param_my_link_type_ContactLink' => '', - 'object_contacts.link_param_foreign_link_type_ContactLink' => '', - 'object_contacts.link_param_user_type_User' => '', - 'object_contacts.contactsNotModified' => '', - 'object_contacts.contacts' => '', - 'object_contacts.contacts_param_contacts_type_Vector t' => '', - 'object_contacts.contacts_param_saved_count_type_int' => '', - 'object_contacts.contacts_param_users_type_Vector t' => '', - 'object_contacts.importedContacts' => '', - 'object_contacts.importedContacts_param_imported_type_Vector t' => '', - 'object_contacts.importedContacts_param_popular_invites_type_Vector t' => '', - 'object_contacts.importedContacts_param_retry_contacts_type_Vector t' => '', - 'object_contacts.importedContacts_param_users_type_Vector t' => '', - 'object_contacts.blocked' => '', - 'object_contacts.blocked_param_blocked_type_Vector t' => '', - 'object_contacts.blocked_param_users_type_Vector t' => '', - 'object_contacts.blockedSlice' => '', - 'object_contacts.blockedSlice_param_count_type_int' => '', - 'object_contacts.blockedSlice_param_blocked_type_Vector t' => '', - 'object_contacts.blockedSlice_param_users_type_Vector t' => '', - 'object_messages.dialogs' => '', - 'object_messages.dialogs_param_dialogs_type_Vector t' => '', - 'object_messages.dialogs_param_messages_type_Vector t' => '', - 'object_messages.dialogs_param_chats_type_Vector t' => '', - 'object_messages.dialogs_param_users_type_Vector t' => '', - 'object_messages.dialogsSlice' => '', - 'object_messages.dialogsSlice_param_count_type_int' => '', - 'object_messages.dialogsSlice_param_dialogs_type_Vector t' => '', - 'object_messages.dialogsSlice_param_messages_type_Vector t' => '', - 'object_messages.dialogsSlice_param_chats_type_Vector t' => '', - 'object_messages.dialogsSlice_param_users_type_Vector t' => '', - 'object_messages.messages' => '', - 'object_messages.messages_param_messages_type_Vector t' => '', - 'object_messages.messages_param_chats_type_Vector t' => '', - 'object_messages.messages_param_users_type_Vector t' => '', - 'object_messages.messagesSlice' => '', - 'object_messages.messagesSlice_param_count_type_int' => '', - 'object_messages.messagesSlice_param_messages_type_Vector t' => '', - 'object_messages.messagesSlice_param_chats_type_Vector t' => '', - 'object_messages.messagesSlice_param_users_type_Vector t' => '', - 'object_messages.channelMessages' => '', - 'object_messages.channelMessages_param_pts_type_int' => '', - 'object_messages.channelMessages_param_count_type_int' => '', - 'object_messages.channelMessages_param_messages_type_Vector t' => '', - 'object_messages.channelMessages_param_chats_type_Vector t' => '', - 'object_messages.channelMessages_param_users_type_Vector t' => '', - 'object_messages.messagesNotModified' => '', - 'object_messages.messagesNotModified_param_count_type_int' => '', - 'object_messages.chats' => '', - 'object_messages.chats_param_chats_type_Vector t' => '', - 'object_messages.chatsSlice' => '', - 'object_messages.chatsSlice_param_count_type_int' => '', - 'object_messages.chatsSlice_param_chats_type_Vector t' => '', - 'object_messages.chatFull' => '', - 'object_messages.chatFull_param_full_chat_type_ChatFull' => '', - 'object_messages.chatFull_param_chats_type_Vector t' => '', - 'object_messages.chatFull_param_users_type_Vector t' => '', - 'object_messages.affectedHistory' => '', - 'object_messages.affectedHistory_param_pts_type_int' => '', - 'object_messages.affectedHistory_param_pts_count_type_int' => '', - 'object_messages.affectedHistory_param_offset_type_int' => '', - 'object_inputMessagesFilterEmpty' => '', - 'object_inputMessagesFilterPhotos' => '', - 'object_inputMessagesFilterVideo' => '', - 'object_inputMessagesFilterPhotoVideo' => '', - 'object_inputMessagesFilterDocument' => '', - 'object_inputMessagesFilterUrl' => '', - 'object_inputMessagesFilterGif' => '', - 'object_inputMessagesFilterVoice' => '', - 'object_inputMessagesFilterMusic' => '', - 'object_inputMessagesFilterChatPhotos' => '', - 'object_inputMessagesFilterPhoneCalls' => '', - 'object_inputMessagesFilterPhoneCalls_param_missed_type_true' => '', - 'object_inputMessagesFilterRoundVoice' => '', - 'object_inputMessagesFilterRoundVideo' => '', - 'object_inputMessagesFilterMyMentions' => '', - 'object_inputMessagesFilterGeo' => '', - 'object_inputMessagesFilterContacts' => '', - 'object_updateNewMessage' => '', - 'object_updateNewMessage_param_message_type_Message' => '', - 'object_updateNewMessage_param_pts_type_int' => '', - 'object_updateNewMessage_param_pts_count_type_int' => '', - 'object_updateMessageID' => '', - 'object_updateMessageID_param_id_type_int' => '', - 'object_updateDeleteMessages' => '', - 'object_updateDeleteMessages_param_messages_type_Vector t' => '', - 'object_updateDeleteMessages_param_pts_type_int' => '', - 'object_updateDeleteMessages_param_pts_count_type_int' => '', - 'object_updateUserTyping' => '', - 'object_updateUserTyping_param_user_id_type_int' => '', - 'object_updateUserTyping_param_action_type_SendMessageAction' => '', - 'object_updateChatUserTyping' => '', - 'object_updateChatUserTyping_param_chat_id_type_int' => '', - 'object_updateChatUserTyping_param_user_id_type_int' => '', - 'object_updateChatUserTyping_param_action_type_SendMessageAction' => '', - 'object_updateChatParticipants' => '', - 'object_updateChatParticipants_param_participants_type_ChatParticipants' => '', - 'object_updateUserName' => '', - 'object_updateUserName_param_user_id_type_int' => '', - 'object_updateUserName_param_first_name_type_string' => '', - 'object_updateUserName_param_last_name_type_string' => '', - 'object_updateUserName_param_username_type_string' => '', - 'object_updateUserPhoto' => '', - 'object_updateUserPhoto_param_user_id_type_int' => '', - 'object_updateUserPhoto_param_date_type_int' => '', - 'object_updateUserPhoto_param_photo_type_UserProfilePhoto' => '', - 'object_updateUserPhoto_param_previous_type_Bool' => '', - 'object_updateContactRegistered' => '', - 'object_updateContactRegistered_param_user_id_type_int' => '', - 'object_updateContactRegistered_param_date_type_int' => '', - 'object_updateContactLink' => '', - 'object_updateContactLink_param_user_id_type_int' => '', - 'object_updateContactLink_param_my_link_type_ContactLink' => '', - 'object_updateContactLink_param_foreign_link_type_ContactLink' => '', - 'object_updateNewEncryptedMessage' => '', - 'object_updateNewEncryptedMessage_param_message_type_EncryptedMessage' => '', - 'object_updateNewEncryptedMessage_param_qts_type_int' => '', - 'object_updateEncryptedChatTyping' => '', - 'object_updateEncryptedChatTyping_param_chat_id_type_int' => '', - 'object_updateEncryption' => '', - 'object_updateEncryption_param_chat_type_EncryptedChat' => '', - 'object_updateEncryption_param_date_type_int' => '', - 'object_updateEncryptedMessagesRead' => '', - 'object_updateEncryptedMessagesRead_param_chat_id_type_int' => '', - 'object_updateEncryptedMessagesRead_param_max_date_type_int' => '', - 'object_updateEncryptedMessagesRead_param_date_type_int' => '', - 'object_updateChatParticipantAdd' => '', - 'object_updateChatParticipantAdd_param_chat_id_type_int' => '', - 'object_updateChatParticipantAdd_param_user_id_type_int' => '', - 'object_updateChatParticipantAdd_param_inviter_id_type_int' => '', - 'object_updateChatParticipantAdd_param_date_type_int' => '', - 'object_updateChatParticipantAdd_param_version_type_int' => '', - 'object_updateChatParticipantDelete' => '', - 'object_updateChatParticipantDelete_param_chat_id_type_int' => '', - 'object_updateChatParticipantDelete_param_user_id_type_int' => '', - 'object_updateChatParticipantDelete_param_version_type_int' => '', - 'object_updateDcOptions' => '', - 'object_updateDcOptions_param_dc_options_type_Vector t' => '', - 'object_updateUserBlocked' => '', - 'object_updateUserBlocked_param_user_id_type_int' => '', - 'object_updateUserBlocked_param_blocked_type_Bool' => '', - 'object_updateNotifySettings' => '', - 'object_updateNotifySettings_param_peer_type_NotifyPeer' => '', - 'object_updateNotifySettings_param_notify_settings_type_PeerNotifySettings' => '', - 'object_updateServiceNotification' => '', - 'object_updateServiceNotification_param_popup_type_true' => '', - 'object_updateServiceNotification_param_inbox_date_type_int' => '', - 'object_updateServiceNotification_param_type_type_string' => '', - 'object_updateServiceNotification_param_message_type_string' => '', - 'object_updateServiceNotification_param_media_type_MessageMedia' => '', - 'object_updateServiceNotification_param_entities_type_Vector t' => '', - 'object_updatePrivacy' => '', - 'object_updatePrivacy_param_key_type_PrivacyKey' => '', - 'object_updatePrivacy_param_rules_type_Vector t' => '', - 'object_updateUserPhone' => '', - 'object_updateUserPhone_param_user_id_type_int' => '', - 'object_updateUserPhone_param_phone_type_string' => '', - 'object_updateReadHistoryInbox' => '', - 'object_updateReadHistoryInbox_param_peer_type_Peer' => '', - 'object_updateReadHistoryInbox_param_max_id_type_int' => '', - 'object_updateReadHistoryInbox_param_pts_type_int' => '', - 'object_updateReadHistoryInbox_param_pts_count_type_int' => '', - 'object_updateReadHistoryOutbox' => '', - 'object_updateReadHistoryOutbox_param_peer_type_Peer' => '', - 'object_updateReadHistoryOutbox_param_max_id_type_int' => '', - 'object_updateReadHistoryOutbox_param_pts_type_int' => '', - 'object_updateReadHistoryOutbox_param_pts_count_type_int' => '', - 'object_updateWebPage' => '', - 'object_updateWebPage_param_webpage_type_WebPage' => '', - 'object_updateWebPage_param_pts_type_int' => '', - 'object_updateWebPage_param_pts_count_type_int' => '', - 'object_updateReadMessagesContents' => '', - 'object_updateReadMessagesContents_param_messages_type_Vector t' => '', - 'object_updateReadMessagesContents_param_pts_type_int' => '', - 'object_updateReadMessagesContents_param_pts_count_type_int' => '', - 'object_updateChannelTooLong' => '', - 'object_updateChannelTooLong_param_channel_id_type_int' => '', - 'object_updateChannelTooLong_param_pts_type_int' => '', - 'object_updateChannel' => '', - 'object_updateChannel_param_channel_id_type_int' => '', - 'object_updateNewChannelMessage' => '', - 'object_updateNewChannelMessage_param_message_type_Message' => '', - 'object_updateNewChannelMessage_param_pts_type_int' => '', - 'object_updateNewChannelMessage_param_pts_count_type_int' => '', - 'object_updateReadChannelInbox' => '', - 'object_updateReadChannelInbox_param_channel_id_type_int' => '', - 'object_updateReadChannelInbox_param_max_id_type_int' => '', - 'object_updateDeleteChannelMessages' => '', - 'object_updateDeleteChannelMessages_param_channel_id_type_int' => '', - 'object_updateDeleteChannelMessages_param_messages_type_Vector t' => '', - 'object_updateDeleteChannelMessages_param_pts_type_int' => '', - 'object_updateDeleteChannelMessages_param_pts_count_type_int' => '', - 'object_updateChannelMessageViews' => '', - 'object_updateChannelMessageViews_param_channel_id_type_int' => '', - 'object_updateChannelMessageViews_param_id_type_int' => '', - 'object_updateChannelMessageViews_param_views_type_int' => '', - 'object_updateChatAdmins' => '', - 'object_updateChatAdmins_param_chat_id_type_int' => '', - 'object_updateChatAdmins_param_enabled_type_Bool' => '', - 'object_updateChatAdmins_param_version_type_int' => '', - 'object_updateChatParticipantAdmin' => '', - 'object_updateChatParticipantAdmin_param_chat_id_type_int' => '', - 'object_updateChatParticipantAdmin_param_user_id_type_int' => '', - 'object_updateChatParticipantAdmin_param_is_admin_type_Bool' => '', - 'object_updateChatParticipantAdmin_param_version_type_int' => '', - 'object_updateNewStickerSet' => '', - 'object_updateNewStickerSet_param_stickerset_type_messages.StickerSet' => '', - 'object_updateStickerSetsOrder' => '', - 'object_updateStickerSetsOrder_param_masks_type_true' => '', - 'object_updateStickerSetsOrder_param_order_type_Vector t' => '', - 'object_updateStickerSets' => '', - 'object_updateSavedGifs' => '', - 'object_updateBotInlineQuery' => '', - 'object_updateBotInlineQuery_param_query_id_type_long' => '', - 'object_updateBotInlineQuery_param_user_id_type_int' => '', - 'object_updateBotInlineQuery_param_query_type_string' => '', - 'object_updateBotInlineQuery_param_geo_type_GeoPoint' => '', - 'object_updateBotInlineQuery_param_offset_type_string' => '', - 'object_updateBotInlineSend' => '', - 'object_updateBotInlineSend_param_user_id_type_int' => '', - 'object_updateBotInlineSend_param_query_type_string' => '', - 'object_updateBotInlineSend_param_geo_type_GeoPoint' => '', - 'object_updateBotInlineSend_param_id_type_string' => '', - 'object_updateBotInlineSend_param_msg_id_type_InputBotInlineMessageID' => '', - 'object_updateEditChannelMessage' => '', - 'object_updateEditChannelMessage_param_message_type_Message' => '', - 'object_updateEditChannelMessage_param_pts_type_int' => '', - 'object_updateEditChannelMessage_param_pts_count_type_int' => '', - 'object_updateChannelPinnedMessage' => '', - 'object_updateChannelPinnedMessage_param_channel_id_type_int' => '', - 'object_updateChannelPinnedMessage_param_id_type_int' => '', - 'object_updateBotCallbackQuery' => '', - 'object_updateBotCallbackQuery_param_query_id_type_long' => '', - 'object_updateBotCallbackQuery_param_user_id_type_int' => '', - 'object_updateBotCallbackQuery_param_peer_type_Peer' => '', - 'object_updateBotCallbackQuery_param_msg_id_type_int' => '', - 'object_updateBotCallbackQuery_param_chat_instance_type_long' => '', - 'object_updateBotCallbackQuery_param_data_type_bytes' => '', - 'object_updateBotCallbackQuery_param_game_short_name_type_string' => '', - 'object_updateEditMessage' => '', - 'object_updateEditMessage_param_message_type_Message' => '', - 'object_updateEditMessage_param_pts_type_int' => '', - 'object_updateEditMessage_param_pts_count_type_int' => '', - 'object_updateInlineBotCallbackQuery' => '', - 'object_updateInlineBotCallbackQuery_param_query_id_type_long' => '', - 'object_updateInlineBotCallbackQuery_param_user_id_type_int' => '', - 'object_updateInlineBotCallbackQuery_param_msg_id_type_InputBotInlineMessageID' => '', - 'object_updateInlineBotCallbackQuery_param_chat_instance_type_long' => '', - 'object_updateInlineBotCallbackQuery_param_data_type_bytes' => '', - 'object_updateInlineBotCallbackQuery_param_game_short_name_type_string' => '', - 'object_updateReadChannelOutbox' => '', - 'object_updateReadChannelOutbox_param_channel_id_type_int' => '', - 'object_updateReadChannelOutbox_param_max_id_type_int' => '', - 'object_updateDraftMessage' => '', - 'object_updateDraftMessage_param_peer_type_Peer' => '', - 'object_updateDraftMessage_param_draft_type_DraftMessage' => '', - 'object_updateReadFeaturedStickers' => '', - 'object_updateRecentStickers' => '', - 'object_updateConfig' => '', - 'object_updatePtsChanged' => '', - 'object_updateChannelWebPage' => '', - 'object_updateChannelWebPage_param_channel_id_type_int' => '', - 'object_updateChannelWebPage_param_webpage_type_WebPage' => '', - 'object_updateChannelWebPage_param_pts_type_int' => '', - 'object_updateChannelWebPage_param_pts_count_type_int' => '', - 'object_updateDialogPinned' => '', - 'object_updateDialogPinned_param_pinned_type_true' => '', - 'object_updateDialogPinned_param_peer_type_Peer' => '', - 'object_updatePinnedDialogs' => '', - 'object_updatePinnedDialogs_param_order_type_Vector t' => '', - 'object_updateBotWebhookJSON' => '', - 'object_updateBotWebhookJSON_param_data_type_DataJSON' => '', - 'object_updateBotWebhookJSONQuery' => '', - 'object_updateBotWebhookJSONQuery_param_query_id_type_long' => '', - 'object_updateBotWebhookJSONQuery_param_data_type_DataJSON' => '', - 'object_updateBotWebhookJSONQuery_param_timeout_type_int' => '', - 'object_updateBotShippingQuery' => '', - 'object_updateBotShippingQuery_param_query_id_type_long' => '', - 'object_updateBotShippingQuery_param_user_id_type_int' => '', - 'object_updateBotShippingQuery_param_payload_type_bytes' => '', - 'object_updateBotShippingQuery_param_shipping_address_type_PostAddress' => '', - 'object_updateBotPrecheckoutQuery' => '', - 'object_updateBotPrecheckoutQuery_param_query_id_type_long' => '', - 'object_updateBotPrecheckoutQuery_param_user_id_type_int' => '', - 'object_updateBotPrecheckoutQuery_param_payload_type_bytes' => '', - 'object_updateBotPrecheckoutQuery_param_info_type_PaymentRequestedInfo' => '', - 'object_updateBotPrecheckoutQuery_param_shipping_option_id_type_string' => '', - 'object_updateBotPrecheckoutQuery_param_currency_type_string' => '', - 'object_updateBotPrecheckoutQuery_param_total_amount_type_long' => '', - 'object_updatePhoneCall' => '', - 'object_updatePhoneCall_param_phone_call_type_PhoneCall' => '', - 'object_updateLangPackTooLong' => '', - 'object_updateLangPack' => '', - 'object_updateLangPack_param_difference_type_LangPackDifference' => '', - 'object_updateFavedStickers' => '', - 'object_updateChannelReadMessagesContents' => '', - 'object_updateChannelReadMessagesContents_param_channel_id_type_int' => '', - 'object_updateChannelReadMessagesContents_param_messages_type_Vector t' => '', - 'object_updateContactsReset' => '', - 'object_updateChannelAvailableMessages' => '', - 'object_updateChannelAvailableMessages_param_channel_id_type_int' => '', - 'object_updateChannelAvailableMessages_param_available_min_id_type_int' => '', - 'object_updates.state' => '', - 'object_updates.state_param_pts_type_int' => '', - 'object_updates.state_param_qts_type_int' => '', - 'object_updates.state_param_date_type_int' => '', - 'object_updates.state_param_seq_type_int' => '', - 'object_updates.state_param_unread_count_type_int' => '', - 'object_updates.differenceEmpty' => '', - 'object_updates.differenceEmpty_param_date_type_int' => '', - 'object_updates.differenceEmpty_param_seq_type_int' => '', - 'object_updates.difference' => '', - 'object_updates.difference_param_new_messages_type_Vector t' => '', - 'object_updates.difference_param_new_encrypted_messages_type_Vector t' => '', - 'object_updates.difference_param_other_updates_type_Vector t' => '', - 'object_updates.difference_param_chats_type_Vector t' => '', - 'object_updates.difference_param_users_type_Vector t' => '', - 'object_updates.difference_param_state_type_updates.State' => '', - 'object_updates.differenceSlice' => '', - 'object_updates.differenceSlice_param_new_messages_type_Vector t' => '', - 'object_updates.differenceSlice_param_new_encrypted_messages_type_Vector t' => '', - 'object_updates.differenceSlice_param_other_updates_type_Vector t' => '', - 'object_updates.differenceSlice_param_chats_type_Vector t' => '', - 'object_updates.differenceSlice_param_users_type_Vector t' => '', - 'object_updates.differenceSlice_param_intermediate_state_type_updates.State' => '', - 'object_updates.differenceTooLong' => '', - 'object_updates.differenceTooLong_param_pts_type_int' => '', - 'object_updatesTooLong' => '', - 'object_updateShortMessage' => '', - 'object_updateShortMessage_param_out_type_true' => '', - 'object_updateShortMessage_param_mentioned_type_true' => '', - 'object_updateShortMessage_param_media_unread_type_true' => '', - 'object_updateShortMessage_param_silent_type_true' => '', - 'object_updateShortMessage_param_id_type_int' => '', - 'object_updateShortMessage_param_user_id_type_int' => '', - 'object_updateShortMessage_param_message_type_string' => '', - 'object_updateShortMessage_param_pts_type_int' => '', - 'object_updateShortMessage_param_pts_count_type_int' => '', - 'object_updateShortMessage_param_date_type_int' => '', - 'object_updateShortMessage_param_fwd_from_type_MessageFwdHeader' => '', - 'object_updateShortMessage_param_via_bot_id_type_int' => '', - 'object_updateShortMessage_param_reply_to_msg_id_type_int' => '', - 'object_updateShortMessage_param_entities_type_Vector t' => '', - 'object_updateShortChatMessage' => '', - 'object_updateShortChatMessage_param_out_type_true' => '', - 'object_updateShortChatMessage_param_mentioned_type_true' => '', - 'object_updateShortChatMessage_param_media_unread_type_true' => '', - 'object_updateShortChatMessage_param_silent_type_true' => '', - 'object_updateShortChatMessage_param_id_type_int' => '', - 'object_updateShortChatMessage_param_from_id_type_int' => '', - 'object_updateShortChatMessage_param_chat_id_type_int' => '', - 'object_updateShortChatMessage_param_message_type_string' => '', - 'object_updateShortChatMessage_param_pts_type_int' => '', - 'object_updateShortChatMessage_param_pts_count_type_int' => '', - 'object_updateShortChatMessage_param_date_type_int' => '', - 'object_updateShortChatMessage_param_fwd_from_type_MessageFwdHeader' => '', - 'object_updateShortChatMessage_param_via_bot_id_type_int' => '', - 'object_updateShortChatMessage_param_reply_to_msg_id_type_int' => '', - 'object_updateShortChatMessage_param_entities_type_Vector t' => '', - 'object_updateShort' => '', - 'object_updateShort_param_update_type_Update' => '', - 'object_updateShort_param_date_type_int' => '', - 'object_updatesCombined' => '', - 'object_updatesCombined_param_updates_type_Vector t' => '', - 'object_updatesCombined_param_users_type_Vector t' => '', - 'object_updatesCombined_param_chats_type_Vector t' => '', - 'object_updatesCombined_param_date_type_int' => '', - 'object_updatesCombined_param_seq_start_type_int' => '', - 'object_updatesCombined_param_seq_type_int' => '', - 'object_updates' => '', - 'object_updates_param_updates_type_Vector t' => '', - 'object_updates_param_users_type_Vector t' => '', - 'object_updates_param_chats_type_Vector t' => '', - 'object_updates_param_date_type_int' => '', - 'object_updates_param_seq_type_int' => '', - 'object_updateShortSentMessage' => '', - 'object_updateShortSentMessage_param_out_type_true' => '', - 'object_updateShortSentMessage_param_id_type_int' => '', - 'object_updateShortSentMessage_param_pts_type_int' => '', - 'object_updateShortSentMessage_param_pts_count_type_int' => '', - 'object_updateShortSentMessage_param_date_type_int' => '', - 'object_updateShortSentMessage_param_media_type_MessageMedia' => '', - 'object_updateShortSentMessage_param_entities_type_Vector t' => '', - 'object_photos.photos' => '', - 'object_photos.photos_param_photos_type_Vector t' => '', - 'object_photos.photos_param_users_type_Vector t' => '', - 'object_photos.photosSlice' => '', - 'object_photos.photosSlice_param_count_type_int' => '', - 'object_photos.photosSlice_param_photos_type_Vector t' => '', - 'object_photos.photosSlice_param_users_type_Vector t' => '', - 'object_photos.photo' => '', - 'object_photos.photo_param_photo_type_Photo' => '', - 'object_photos.photo_param_users_type_Vector t' => '', - 'object_upload.file' => '', - 'object_upload.file_param_type_type_storage.FileType' => '', - 'object_upload.file_param_mtime_type_int' => '', - 'object_upload.file_param_bytes_type_bytes' => '', - 'object_upload.fileCdnRedirect' => '', - 'object_upload.fileCdnRedirect_param_dc_id_type_int' => '', - 'object_upload.fileCdnRedirect_param_file_token_type_bytes' => '', - 'object_upload.fileCdnRedirect_param_encryption_key_type_bytes' => '', - 'object_upload.fileCdnRedirect_param_encryption_iv_type_bytes' => '', - 'object_upload.fileCdnRedirect_param_cdn_file_hashes_type_Vector t' => '', - 'object_dcOption' => '', - 'object_dcOption_param_ipv6_type_true' => '', - 'object_dcOption_param_media_only_type_true' => '', - 'object_dcOption_param_tcpo_only_type_true' => '', - 'object_dcOption_param_cdn_type_true' => '', - 'object_dcOption_param_static_type_true' => '', - 'object_dcOption_param_id_type_int' => '', - 'object_dcOption_param_ip_address_type_string' => '', - 'object_dcOption_param_port_type_int' => '', - 'object_config' => '', - 'object_config_param_phonecalls_enabled_type_true' => '', - 'object_config_param_default_p2p_contacts_type_true' => '', - 'object_config_param_date_type_int' => '', - 'object_config_param_expires_type_int' => '', - 'object_config_param_test_mode_type_Bool' => '', - 'object_config_param_this_dc_type_int' => '', - 'object_config_param_dc_options_type_Vector t' => '', - 'object_config_param_chat_size_max_type_int' => '', - 'object_config_param_megagroup_size_max_type_int' => '', - 'object_config_param_forwarded_count_max_type_int' => '', - 'object_config_param_online_update_period_ms_type_int' => '', - 'object_config_param_offline_blur_timeout_ms_type_int' => '', - 'object_config_param_offline_idle_timeout_ms_type_int' => '', - 'object_config_param_online_cloud_timeout_ms_type_int' => '', - 'object_config_param_notify_cloud_delay_ms_type_int' => '', - 'object_config_param_notify_default_delay_ms_type_int' => '', - 'object_config_param_chat_big_size_type_int' => '', - 'object_config_param_push_chat_period_ms_type_int' => '', - 'object_config_param_push_chat_limit_type_int' => '', - 'object_config_param_saved_gifs_limit_type_int' => '', - 'object_config_param_edit_time_limit_type_int' => '', - 'object_config_param_rating_e_decay_type_int' => '', - 'object_config_param_stickers_recent_limit_type_int' => '', - 'object_config_param_stickers_faved_limit_type_int' => '', - 'object_config_param_channels_read_media_period_type_int' => '', - 'object_config_param_tmp_sessions_type_int' => '', - 'object_config_param_pinned_dialogs_count_max_type_int' => '', - 'object_config_param_call_receive_timeout_ms_type_int' => '', - 'object_config_param_call_ring_timeout_ms_type_int' => '', - 'object_config_param_call_connect_timeout_ms_type_int' => '', - 'object_config_param_call_packet_timeout_ms_type_int' => '', - 'object_config_param_me_url_prefix_type_string' => '', - 'object_config_param_suggested_lang_code_type_string' => '', - 'object_config_param_lang_pack_version_type_int' => '', - 'object_config_param_disabled_features_type_Vector t' => '', - 'object_nearestDc' => '', - 'object_nearestDc_param_country_type_string' => '', - 'object_nearestDc_param_this_dc_type_int' => '', - 'object_nearestDc_param_nearest_dc_type_int' => '', - 'object_help.appUpdate' => '', - 'object_help.appUpdate_param_id_type_int' => '', - 'object_help.appUpdate_param_critical_type_Bool' => '', - 'object_help.appUpdate_param_url_type_string' => '', - 'object_help.appUpdate_param_text_type_string' => '', - 'object_help.noAppUpdate' => '', - 'object_help.inviteText' => '', - 'object_help.inviteText_param_message_type_string' => '', - 'object_encryptedChatEmpty' => '', - 'object_encryptedChatEmpty_param_id_type_int' => '', - 'object_encryptedChatWaiting' => '', - 'object_encryptedChatWaiting_param_id_type_int' => '', - 'object_encryptedChatWaiting_param_access_hash_type_long' => '', - 'object_encryptedChatWaiting_param_date_type_int' => '', - 'object_encryptedChatWaiting_param_admin_id_type_int' => '', - 'object_encryptedChatWaiting_param_participant_id_type_int' => '', - 'object_encryptedChatRequested' => '', - 'object_encryptedChatRequested_param_id_type_int' => '', - 'object_encryptedChatRequested_param_access_hash_type_long' => '', - 'object_encryptedChatRequested_param_date_type_int' => '', - 'object_encryptedChatRequested_param_admin_id_type_int' => '', - 'object_encryptedChatRequested_param_participant_id_type_int' => '', - 'object_encryptedChatRequested_param_g_a_type_bytes' => '', - 'object_encryptedChat' => '', - 'object_encryptedChat_param_id_type_int' => '', - 'object_encryptedChat_param_access_hash_type_long' => '', - 'object_encryptedChat_param_date_type_int' => '', - 'object_encryptedChat_param_admin_id_type_int' => '', - 'object_encryptedChat_param_participant_id_type_int' => '', - 'object_encryptedChat_param_g_a_or_b_type_bytes' => '', - 'object_encryptedChat_param_key_fingerprint_type_long' => '', - 'object_encryptedChatDiscarded' => '', - 'object_encryptedChatDiscarded_param_id_type_int' => '', - 'object_inputEncryptedChat' => '', - 'object_inputEncryptedChat_param_chat_id_type_int' => '', - 'object_inputEncryptedChat_param_access_hash_type_long' => '', - 'object_encryptedFileEmpty' => '', - 'object_encryptedFile' => '', - 'object_encryptedFile_param_id_type_long' => '', - 'object_encryptedFile_param_access_hash_type_long' => '', - 'object_encryptedFile_param_size_type_int' => '', - 'object_encryptedFile_param_dc_id_type_int' => '', - 'object_encryptedFile_param_key_fingerprint_type_int' => '', - 'object_inputEncryptedFileEmpty' => '', - 'object_inputEncryptedFileUploaded' => '', - 'object_inputEncryptedFileUploaded_param_id_type_long' => '', - 'object_inputEncryptedFileUploaded_param_parts_type_int' => '', - 'object_inputEncryptedFileUploaded_param_md5_checksum_type_string' => '', - 'object_inputEncryptedFileUploaded_param_key_fingerprint_type_int' => '', - 'object_inputEncryptedFile' => '', - 'object_inputEncryptedFile_param_id_type_long' => '', - 'object_inputEncryptedFile_param_access_hash_type_long' => '', - 'object_inputEncryptedFileBigUploaded' => '', - 'object_inputEncryptedFileBigUploaded_param_id_type_long' => '', - 'object_inputEncryptedFileBigUploaded_param_parts_type_int' => '', - 'object_inputEncryptedFileBigUploaded_param_key_fingerprint_type_int' => '', - 'object_encryptedMessage' => '', - 'object_encryptedMessage_param_chat_id_type_int' => '', - 'object_encryptedMessage_param_date_type_int' => '', - 'object_encryptedMessage_param_decrypted_message_type_DecryptedMessage' => '', - 'object_encryptedMessage_param_file_type_EncryptedFile' => '', - 'object_encryptedMessageService' => '', - 'object_encryptedMessageService_param_chat_id_type_int' => '', - 'object_encryptedMessageService_param_date_type_int' => '', - 'object_encryptedMessageService_param_decrypted_message_type_DecryptedMessage' => '', - 'object_messages.dhConfigNotModified' => '', - 'object_messages.dhConfigNotModified_param_random_type_bytes' => '', - 'object_messages.dhConfig' => '', - 'object_messages.dhConfig_param_g_type_int' => '', - 'object_messages.dhConfig_param_p_type_bytes' => '', - 'object_messages.dhConfig_param_version_type_int' => '', - 'object_messages.dhConfig_param_random_type_bytes' => '', - 'object_messages.sentEncryptedMessage' => '', - 'object_messages.sentEncryptedMessage_param_date_type_int' => '', - 'object_messages.sentEncryptedFile' => '', - 'object_messages.sentEncryptedFile_param_date_type_int' => '', - 'object_messages.sentEncryptedFile_param_file_type_EncryptedFile' => '', - 'object_inputDocumentEmpty' => '', - 'object_inputDocument' => '', - 'object_inputDocument_param_id_type_long' => '', - 'object_inputDocument_param_access_hash_type_long' => '', - 'object_documentEmpty' => '', - 'object_documentEmpty_param_id_type_long' => '', - 'object_document' => '', - 'object_document_param_id_type_long' => '', - 'object_document_param_access_hash_type_long' => '', - 'object_document_param_date_type_int' => '', - 'object_document_param_mime_type_type_string' => '', - 'object_document_param_size_type_int' => '', - 'object_document_param_thumb_type_PhotoSize' => '', - 'object_document_param_dc_id_type_int' => '', - 'object_document_param_version_type_int' => '', - 'object_document_param_attributes_type_Vector t' => '', - 'object_help.support' => '', - 'object_help.support_param_phone_number_type_string' => '', - 'object_help.support_param_user_type_User' => '', - 'object_notifyPeer' => '', - 'object_notifyPeer_param_peer_type_Peer' => '', - 'object_notifyUsers' => '', - 'object_notifyChats' => '', - 'object_notifyAll' => '', - 'object_sendMessageTypingAction' => '', - 'object_sendMessageCancelAction' => '', - 'object_sendMessageRecordVideoAction' => '', - 'object_sendMessageUploadVideoAction' => '', - 'object_sendMessageUploadVideoAction_param_progress_type_int' => '', - 'object_sendMessageRecordAudioAction' => '', - 'object_sendMessageUploadAudioAction' => '', - 'object_sendMessageUploadAudioAction_param_progress_type_int' => '', - 'object_sendMessageUploadPhotoAction' => '', - 'object_sendMessageUploadPhotoAction_param_progress_type_int' => '', - 'object_sendMessageUploadDocumentAction' => '', - 'object_sendMessageUploadDocumentAction_param_progress_type_int' => '', - 'object_sendMessageGeoLocationAction' => '', - 'object_sendMessageChooseContactAction' => '', - 'object_sendMessageGamePlayAction' => '', - 'object_sendMessageRecordRoundAction' => '', - 'object_sendMessageUploadRoundAction' => '', - 'object_sendMessageUploadRoundAction_param_progress_type_int' => '', - 'object_contacts.found' => '', - 'object_contacts.found_param_my_results_type_Vector t' => '', - 'object_contacts.found_param_results_type_Vector t' => '', - 'object_contacts.found_param_chats_type_Vector t' => '', - 'object_contacts.found_param_users_type_Vector t' => '', - 'object_inputPrivacyKeyStatusTimestamp' => '', - 'object_inputPrivacyKeyChatInvite' => '', - 'object_inputPrivacyKeyPhoneCall' => '', - 'object_privacyKeyStatusTimestamp' => '', - 'object_privacyKeyPhoneCall' => '', - 'object_inputPrivacyValueAllowContacts' => '', - 'object_inputPrivacyValueAllowAll' => '', - 'object_inputPrivacyValueAllowUsers' => '', - 'object_inputPrivacyValueAllowUsers_param_users_type_Vector t' => '', - 'object_inputPrivacyValueDisallowContacts' => '', - 'object_inputPrivacyValueDisallowAll' => '', - 'object_inputPrivacyValueDisallowUsers' => '', - 'object_inputPrivacyValueDisallowUsers_param_users_type_Vector t' => '', - 'object_privacyValueAllowContacts' => '', - 'object_privacyValueAllowAll' => '', - 'object_privacyValueAllowUsers' => '', - 'object_privacyValueAllowUsers_param_users_type_Vector t' => '', - 'object_privacyValueDisallowContacts' => '', - 'object_privacyValueDisallowAll' => '', - 'object_privacyValueDisallowUsers' => '', - 'object_privacyValueDisallowUsers_param_users_type_Vector t' => '', - 'object_account.privacyRules' => '', - 'object_account.privacyRules_param_rules_type_Vector t' => '', - 'object_account.privacyRules_param_users_type_Vector t' => '', - 'object_accountDaysTTL' => '', - 'object_accountDaysTTL_param_days_type_int' => '', - 'object_documentAttributeImageSize' => '', - 'object_documentAttributeImageSize_param_w_type_int' => '', - 'object_documentAttributeImageSize_param_h_type_int' => '', - 'object_documentAttributeAnimated' => '', - 'object_documentAttributeSticker' => '', - 'object_documentAttributeSticker_param_mask_type_true' => '', - 'object_documentAttributeSticker_param_alt_type_string' => '', - 'object_documentAttributeSticker_param_stickerset_type_InputStickerSet' => '', - 'object_documentAttributeSticker_param_mask_coords_type_MaskCoords' => '', - 'object_documentAttributeVideo' => '', - 'object_documentAttributeVideo_param_round_message_type_true' => '', - 'object_documentAttributeVideo_param_supports_streaming_type_true' => '', - 'object_documentAttributeVideo_param_duration_type_int' => '', - 'object_documentAttributeVideo_param_w_type_int' => '', - 'object_documentAttributeVideo_param_h_type_int' => '', - 'object_documentAttributeAudio' => '', - 'object_documentAttributeAudio_param_voice_type_true' => '', - 'object_documentAttributeAudio_param_duration_type_int' => '', - 'object_documentAttributeAudio_param_title_type_string' => '', - 'object_documentAttributeAudio_param_performer_type_string' => '', - 'object_documentAttributeAudio_param_waveform_type_bytes' => '', - 'object_documentAttributeFilename' => '', - 'object_documentAttributeFilename_param_file_name_type_string' => '', - 'object_documentAttributeHasStickers' => '', - 'object_messages.stickersNotModified' => '', - 'object_messages.stickers' => '', - 'object_messages.stickers_param_hash_type_string' => '', - 'object_messages.stickers_param_stickers_type_Vector t' => '', - 'object_stickerPack' => '', - 'object_stickerPack_param_emoticon_type_string' => '', - 'object_stickerPack_param_documents_type_Vector t' => '', - 'object_messages.allStickersNotModified' => '', - 'object_messages.allStickers' => '', - 'object_messages.allStickers_param_hash_type_int' => '', - 'object_messages.allStickers_param_sets_type_Vector t' => '', - 'object_disabledFeature' => '', - 'object_disabledFeature_param_feature_type_string' => '', - 'object_disabledFeature_param_description_type_string' => '', - 'object_messages.affectedMessages' => '', - 'object_messages.affectedMessages_param_pts_type_int' => '', - 'object_messages.affectedMessages_param_pts_count_type_int' => '', - 'object_contactLinkUnknown' => '', - 'object_contactLinkNone' => '', - 'object_contactLinkHasPhone' => '', - 'object_contactLinkContact' => '', - 'object_webPageEmpty' => '', - 'object_webPageEmpty_param_id_type_long' => '', - 'object_webPagePending' => '', - 'object_webPagePending_param_id_type_long' => '', - 'object_webPagePending_param_date_type_int' => '', - 'object_webPage' => '', - 'object_webPage_param_id_type_long' => '', - 'object_webPage_param_url_type_string' => '', - 'object_webPage_param_display_url_type_string' => '', - 'object_webPage_param_hash_type_int' => '', - 'object_webPage_param_type_type_string' => '', - 'object_webPage_param_site_name_type_string' => '', - 'object_webPage_param_title_type_string' => '', - 'object_webPage_param_description_type_string' => '', - 'object_webPage_param_photo_type_Photo' => '', - 'object_webPage_param_embed_url_type_string' => '', - 'object_webPage_param_embed_type_type_string' => '', - 'object_webPage_param_embed_width_type_int' => '', - 'object_webPage_param_embed_height_type_int' => '', - 'object_webPage_param_duration_type_int' => '', - 'object_webPage_param_author_type_string' => '', - 'object_webPage_param_document_type_Document' => '', - 'object_webPage_param_cached_page_type_Page' => '', - 'object_webPageNotModified' => '', - 'object_authorization' => '', - 'object_authorization_param_hash_type_long' => '', - 'object_authorization_param_device_model_type_string' => '', - 'object_authorization_param_platform_type_string' => '', - 'object_authorization_param_system_version_type_string' => '', - 'object_authorization_param_api_id_type_int' => '', - 'object_authorization_param_app_name_type_string' => '', - 'object_authorization_param_app_version_type_string' => '', - 'object_authorization_param_date_created_type_int' => '', - 'object_authorization_param_date_active_type_int' => '', - 'object_authorization_param_ip_type_string' => '', - 'object_authorization_param_country_type_string' => '', - 'object_authorization_param_region_type_string' => '', - 'object_account.authorizations' => '', - 'object_account.authorizations_param_authorizations_type_Vector t' => '', - 'object_account.noPassword' => '', - 'object_account.noPassword_param_new_salt_type_bytes' => '', - 'object_account.noPassword_param_email_unconfirmed_pattern_type_string' => '', - 'object_account.password' => '', - 'object_account.password_param_current_salt_type_bytes' => '', - 'object_account.password_param_new_salt_type_bytes' => '', - 'object_account.password_param_hint_type_string' => '', - 'object_account.password_param_has_recovery_type_Bool' => '', - 'object_account.password_param_email_unconfirmed_pattern_type_string' => '', - 'object_account.passwordSettings' => '', - 'object_account.passwordSettings_param_email_type_string' => '', + 'object_msg_copy' => 'Msg copy', + 'object_msg_copy_param_orig_message_type_MTMessage' => 'Orig message', + 'object_gzip_packed' => 'Gzip packed', + 'object_gzip_packed_param_packed_data_type_bytes' => 'Packed data', + 'object_msgs_ack' => 'Msgs ack', + 'object_msgs_ack_param_msg_ids_type_Vector t' => 'Msg IDs', + 'object_bad_msg_notification' => 'Bad msg notification', + 'object_bad_msg_notification_param_bad_msg_id_type_long' => 'Bad msg ID', + 'object_bad_msg_notification_param_bad_msg_seqno_type_int' => 'Bad msg seqno', + 'object_bad_msg_notification_param_error_code_type_int' => 'Error code', + 'object_bad_server_salt' => 'Bad server salt', + 'object_bad_server_salt_param_bad_msg_id_type_long' => 'Bad msg ID', + 'object_bad_server_salt_param_bad_msg_seqno_type_int' => 'Bad msg seqno', + 'object_bad_server_salt_param_error_code_type_int' => 'Error code', + 'object_bad_server_salt_param_new_server_salt_type_long' => 'New server salt', + 'object_msg_resend_req' => 'Msg resend req', + 'object_msg_resend_req_param_msg_ids_type_Vector t' => 'Msg IDs', + 'object_msgs_state_req' => 'Msgs state req', + 'object_msgs_state_req_param_msg_ids_type_Vector t' => 'Msg IDs', + 'object_msgs_state_info' => 'Msgs state info', + 'object_msgs_state_info_param_req_msg_id_type_long' => 'Req msg ID', + 'object_msgs_state_info_param_info_type_bytes' => 'Info', + 'object_msgs_all_info' => 'Msgs all info', + 'object_msgs_all_info_param_msg_ids_type_Vector t' => 'Msg IDs', + 'object_msgs_all_info_param_info_type_bytes' => 'Info', + 'object_msg_detailed_info' => 'Msg detailed info', + 'object_msg_detailed_info_param_msg_id_type_long' => 'Msg ID', + 'object_msg_detailed_info_param_answer_msg_id_type_long' => 'Answer msg ID', + 'object_msg_detailed_info_param_bytes_type_int' => 'Bytes', + 'object_msg_detailed_info_param_status_type_int' => 'Status', + 'object_msg_new_detailed_info' => 'Msg new detailed info', + 'object_msg_new_detailed_info_param_answer_msg_id_type_long' => 'Answer msg ID', + 'object_msg_new_detailed_info_param_bytes_type_int' => 'Bytes', + 'object_msg_new_detailed_info_param_status_type_int' => 'Status', + 'object_bind_auth_key_inner' => 'Bind auth key inner', + 'object_bind_auth_key_inner_param_nonce_type_long' => 'Nonce', + 'object_bind_auth_key_inner_param_temp_auth_key_id_type_long' => 'Temp auth key ID', + 'object_bind_auth_key_inner_param_perm_auth_key_id_type_long' => 'Perm auth key ID', + 'object_bind_auth_key_inner_param_temp_session_id_type_long' => 'Temp session ID', + 'object_bind_auth_key_inner_param_expires_at_type_int' => 'Expires at', + 'object_boolFalse' => 'Bool false', + 'object_boolTrue' => 'Bool true', + 'object_true' => 'True', + 'object_error' => 'Error', + 'object_error_param_code_type_int' => 'Code', + 'object_error_param_text_type_string' => 'Text', + 'object_null' => 'Null', + 'object_inputPeerEmpty' => 'Empty input peer', + 'object_inputPeerSelf' => 'Peer self', + 'object_inputPeerChat' => 'Peer chat', + 'object_inputPeerChat_param_chat_id_type_int' => 'Chat ID', + 'object_inputPeerUser' => 'Peer user', + 'object_inputPeerUser_param_user_id_type_int' => 'User ID', + 'object_inputPeerUser_param_access_hash_type_long' => 'Access hash', + 'object_inputPeerChannel' => 'Peer channel', + 'object_inputPeerChannel_param_channel_id_type_int' => 'Channel ID', + 'object_inputPeerChannel_param_access_hash_type_long' => 'Access hash', + 'object_inputUserEmpty' => 'Empty input user', + 'object_inputUserSelf' => 'User self', + 'object_inputUser' => 'User', + 'object_inputUser_param_user_id_type_int' => 'User ID', + 'object_inputUser_param_access_hash_type_long' => 'Access hash', + 'object_inputPhoneContact' => 'Phone contact', + 'object_inputPhoneContact_param_client_id_type_long' => 'Client ID', + 'object_inputPhoneContact_param_phone_type_string' => 'Phone', + 'object_inputPhoneContact_param_first_name_type_string' => 'First name', + 'object_inputPhoneContact_param_last_name_type_string' => 'Last name', + 'object_inputFile' => 'File', + 'object_inputFile_param_id_type_long' => 'ID', + 'object_inputFile_param_parts_type_int' => 'Parts', + 'object_inputFile_param_name_type_string' => 'Name', + 'object_inputFile_param_md5_checksum_type_string' => 'Md5 checksum', + 'object_inputFileBig' => 'File big', + 'object_inputFileBig_param_id_type_long' => 'ID', + 'object_inputFileBig_param_parts_type_int' => 'Parts', + 'object_inputFileBig_param_name_type_string' => 'Name', + 'object_inputMediaEmpty' => 'Empty input media', + 'object_inputMediaUploadedPhoto' => 'Media uploaded photo', + 'object_inputMediaUploadedPhoto_param_file_type_InputFile' => 'File', + 'object_inputMediaUploadedPhoto_param_stickers_type_Vector t' => 'Stickers', + 'object_inputMediaUploadedPhoto_param_ttl_seconds_type_int' => 'Ttl seconds', + 'object_inputMediaPhoto' => 'Media photo', + 'object_inputMediaPhoto_param_id_type_InputPhoto' => 'ID', + 'object_inputMediaPhoto_param_ttl_seconds_type_int' => 'Ttl seconds', + 'object_inputMediaGeoPoint' => 'Media geo point', + 'object_inputMediaGeoPoint_param_geo_point_type_InputGeoPoint' => 'Geo point', + 'object_inputMediaContact' => 'Media contact', + 'object_inputMediaContact_param_phone_number_type_string' => 'Phone number', + 'object_inputMediaContact_param_first_name_type_string' => 'First name', + 'object_inputMediaContact_param_last_name_type_string' => 'Last name', + 'object_inputMediaUploadedDocument' => 'Media uploaded document', + 'object_inputMediaUploadedDocument_param_nosound_video_type_true' => 'Nosound video?', + 'object_inputMediaUploadedDocument_param_file_type_InputFile' => 'File', + 'object_inputMediaUploadedDocument_param_thumb_type_InputFile' => 'Thumbnail', + 'object_inputMediaUploadedDocument_param_mime_type_type_string' => 'Mime type', + 'object_inputMediaUploadedDocument_param_attributes_type_Vector t' => 'Attributes', + 'object_inputMediaUploadedDocument_param_stickers_type_Vector t' => 'Stickers', + 'object_inputMediaUploadedDocument_param_ttl_seconds_type_int' => 'Ttl seconds', + 'object_inputMediaDocument' => 'Media document', + 'object_inputMediaDocument_param_id_type_InputDocument' => 'ID', + 'object_inputMediaDocument_param_ttl_seconds_type_int' => 'Ttl seconds', + 'object_inputMediaVenue' => 'Media venue', + 'object_inputMediaVenue_param_geo_point_type_InputGeoPoint' => 'Geo point', + 'object_inputMediaVenue_param_title_type_string' => 'Title', + 'object_inputMediaVenue_param_address_type_string' => 'Address', + 'object_inputMediaVenue_param_provider_type_string' => 'Provider', + 'object_inputMediaVenue_param_venue_id_type_string' => 'Venue ID', + 'object_inputMediaVenue_param_venue_type_type_string' => 'Venue type', + 'object_inputMediaGifExternal' => 'Media gif external', + 'object_inputMediaGifExternal_param_url_type_string' => 'URL', + 'object_inputMediaGifExternal_param_q_type_string' => 'Q', + 'object_inputMediaPhotoExternal' => 'Media photo external', + 'object_inputMediaPhotoExternal_param_url_type_string' => 'URL', + 'object_inputMediaPhotoExternal_param_ttl_seconds_type_int' => 'Ttl seconds', + 'object_inputMediaDocumentExternal' => 'Media document external', + 'object_inputMediaDocumentExternal_param_url_type_string' => 'URL', + 'object_inputMediaDocumentExternal_param_ttl_seconds_type_int' => 'Ttl seconds', + 'object_inputMediaGame' => 'Media game', + 'object_inputMediaGame_param_id_type_InputGame' => 'ID', + 'object_inputMediaInvoice' => 'Media invoice', + 'object_inputMediaInvoice_param_title_type_string' => 'Title', + 'object_inputMediaInvoice_param_description_type_string' => 'Description', + 'object_inputMediaInvoice_param_photo_type_InputWebDocument' => 'Photo', + 'object_inputMediaInvoice_param_invoice_type_Invoice' => 'Invoice', + 'object_inputMediaInvoice_param_payload_type_bytes' => 'Payload', + 'object_inputMediaInvoice_param_provider_type_string' => 'Provider', + 'object_inputMediaInvoice_param_provider_data_type_DataJSON' => 'Provider data', + 'object_inputMediaInvoice_param_start_param_type_string' => 'Start param', + 'object_inputMediaGeoLive' => 'Media geo live', + 'object_inputMediaGeoLive_param_geo_point_type_InputGeoPoint' => 'Geo point', + 'object_inputMediaGeoLive_param_period_type_int' => 'Period', + 'object_inputChatPhotoEmpty' => 'Empty input chat photo', + 'object_inputChatUploadedPhoto' => 'Chat uploaded photo', + 'object_inputChatUploadedPhoto_param_file_type_InputFile' => 'File', + 'object_inputChatPhoto' => 'Chat photo', + 'object_inputChatPhoto_param_id_type_InputPhoto' => 'ID', + 'object_inputGeoPointEmpty' => 'Empty input geo point', + 'object_inputGeoPoint' => 'Geo point', + 'object_inputGeoPoint_param_lat_type_double' => 'Lat', + 'object_inputGeoPoint_param_long_type_double' => 'Long', + 'object_inputPhotoEmpty' => 'Empty input photo', + 'object_inputPhoto' => 'Photo', + 'object_inputPhoto_param_id_type_long' => 'ID', + 'object_inputPhoto_param_access_hash_type_long' => 'Access hash', + 'object_inputFileLocation' => 'File location', + 'object_inputFileLocation_param_volume_id_type_long' => 'Volume ID', + 'object_inputFileLocation_param_local_id_type_int' => 'Local ID', + 'object_inputFileLocation_param_secret_type_long' => 'Secret', + 'object_inputEncryptedFileLocation' => 'Encrypted file location', + 'object_inputEncryptedFileLocation_param_id_type_long' => 'ID', + 'object_inputEncryptedFileLocation_param_access_hash_type_long' => 'Access hash', + 'object_inputDocumentFileLocation' => 'Document file location', + 'object_inputDocumentFileLocation_param_id_type_long' => 'ID', + 'object_inputDocumentFileLocation_param_access_hash_type_long' => 'Access hash', + 'object_inputDocumentFileLocation_param_version_type_int' => 'Version', + 'object_inputAppEvent' => 'App event', + 'object_inputAppEvent_param_time_type_double' => 'Time', + 'object_inputAppEvent_param_type_type_string' => 'Type', + 'object_inputAppEvent_param_peer_type_long' => 'Peer', + 'object_inputAppEvent_param_data_type_string' => 'Data', + 'object_peerUser' => 'Peer user', + 'object_peerUser_param_user_id_type_int' => 'User ID', + 'object_peerChat' => 'Peer chat', + 'object_peerChat_param_chat_id_type_int' => 'Chat ID', + 'object_peerChannel' => 'Peer channel', + 'object_peerChannel_param_channel_id_type_int' => 'Channel ID', + 'object_storage.fileUnknown' => 'File unknown', + 'object_storage.filePartial' => 'File partial', + 'object_storage.fileJpeg' => 'File jpeg', + 'object_storage.fileGif' => 'File gif', + 'object_storage.filePng' => 'File png', + 'object_storage.filePdf' => 'File pdf', + 'object_storage.fileMp3' => 'File mp3', + 'object_storage.fileMov' => 'File mov', + 'object_storage.fileMp4' => 'File mp4', + 'object_storage.fileWebp' => 'File webp', + 'object_fileLocationUnavailable' => 'File location unavailable', + 'object_fileLocationUnavailable_param_volume_id_type_long' => 'Volume ID', + 'object_fileLocationUnavailable_param_local_id_type_int' => 'Local ID', + 'object_fileLocationUnavailable_param_secret_type_long' => 'Secret', + 'object_fileLocation' => 'File location', + 'object_fileLocation_param_dc_id_type_int' => 'DC ID', + 'object_fileLocation_param_volume_id_type_long' => 'Volume ID', + 'object_fileLocation_param_local_id_type_int' => 'Local ID', + 'object_fileLocation_param_secret_type_long' => 'Secret', + 'object_userEmpty' => 'Empty user', + 'object_userEmpty_param_id_type_int' => 'ID', + 'object_user' => 'User', + 'object_user_param_self_type_true' => 'Self?', + 'object_user_param_contact_type_true' => 'Contact?', + 'object_user_param_mutual_contact_type_true' => 'Mutual contact?', + 'object_user_param_deleted_type_true' => 'Deleted?', + 'object_user_param_bot_type_true' => 'Bot?', + 'object_user_param_bot_chat_history_type_true' => 'Bot chat history?', + 'object_user_param_bot_nochats_type_true' => 'Bot nochats?', + 'object_user_param_verified_type_true' => 'Verified?', + 'object_user_param_restricted_type_true' => 'Restricted?', + 'object_user_param_min_type_true' => 'Min?', + 'object_user_param_bot_inline_geo_type_true' => 'Bot inline geo?', + 'object_user_param_id_type_int' => 'ID', + 'object_user_param_access_hash_type_long' => 'Access hash', + 'object_user_param_first_name_type_string' => 'First name', + 'object_user_param_last_name_type_string' => 'Last name', + 'object_user_param_username_type_string' => 'Username', + 'object_user_param_phone_type_string' => 'Phone', + 'object_user_param_photo_type_UserProfilePhoto' => 'Photo', + 'object_user_param_status_type_UserStatus' => 'Status', + 'object_user_param_bot_info_version_type_int' => 'Bot info version', + 'object_user_param_restriction_reason_type_string' => 'Restriction reason', + 'object_user_param_bot_inline_placeholder_type_string' => 'Bot inline placeholder', + 'object_user_param_lang_code_type_string' => 'Lang code', + 'object_userProfilePhotoEmpty' => 'Empty user profile photo', + 'object_userProfilePhoto' => 'User profile photo', + 'object_userProfilePhoto_param_photo_id_type_long' => 'Photo ID', + 'object_userProfilePhoto_param_photo_small_type_FileLocation' => 'Photo small', + 'object_userProfilePhoto_param_photo_big_type_FileLocation' => 'Photo big', + 'object_chatEmpty' => 'Empty chat', + 'object_chatEmpty_param_id_type_int' => 'ID', + 'object_chat' => 'Chat', + 'object_chat_param_creator_type_true' => 'Creator?', + 'object_chat_param_kicked_type_true' => 'Kicked?', + 'object_chat_param_left_type_true' => 'Left?', + 'object_chat_param_admins_enabled_type_true' => 'Admins enabled?', + 'object_chat_param_admin_type_true' => 'Admin?', + 'object_chat_param_deactivated_type_true' => 'Deactivated?', + 'object_chat_param_id_type_int' => 'ID', + 'object_chat_param_title_type_string' => 'Title', + 'object_chat_param_photo_type_ChatPhoto' => 'Photo', + 'object_chat_param_participants_count_type_int' => 'Participants count', + 'object_chat_param_date_type_int' => 'Date', + 'object_chat_param_version_type_int' => 'Version', + 'object_chat_param_migrated_to_type_InputChannel' => 'Migrated to', + 'object_chatForbidden' => 'Chat forbidden', + 'object_chatForbidden_param_id_type_int' => 'ID', + 'object_chatForbidden_param_title_type_string' => 'Title', + 'object_channel' => 'Channel', + 'object_channel_param_creator_type_true' => 'Creator?', + 'object_channel_param_left_type_true' => 'Left?', + 'object_channel_param_editor_type_true' => 'Editor?', + 'object_channel_param_broadcast_type_true' => 'Broadcast?', + 'object_channel_param_verified_type_true' => 'Verified?', + 'object_channel_param_megagroup_type_true' => 'Megagroup?', + 'object_channel_param_restricted_type_true' => 'Restricted?', + 'object_channel_param_democracy_type_true' => 'Democracy?', + 'object_channel_param_signatures_type_true' => 'Signatures?', + 'object_channel_param_min_type_true' => 'Min?', + 'object_channel_param_id_type_int' => 'ID', + 'object_channel_param_access_hash_type_long' => 'Access hash', + 'object_channel_param_title_type_string' => 'Title', + 'object_channel_param_username_type_string' => 'Username', + 'object_channel_param_photo_type_ChatPhoto' => 'Photo', + 'object_channel_param_date_type_int' => 'Date', + 'object_channel_param_version_type_int' => 'Version', + 'object_channel_param_restriction_reason_type_string' => 'Restriction reason', + 'object_channel_param_admin_rights_type_ChannelAdminRights' => 'Admin rights', + 'object_channel_param_banned_rights_type_ChannelBannedRights' => 'Banned rights', + 'object_channel_param_participants_count_type_int' => 'Participants count', + 'object_channelForbidden' => 'Forbidden channel', + 'object_channelForbidden_param_broadcast_type_true' => 'Broadcast?', + 'object_channelForbidden_param_megagroup_type_true' => 'Megagroup?', + 'object_channelForbidden_param_id_type_int' => 'ID', + 'object_channelForbidden_param_access_hash_type_long' => 'Access hash', + 'object_channelForbidden_param_title_type_string' => 'Title', + 'object_channelForbidden_param_until_date_type_int' => 'Until date', + 'object_chatFull' => 'Chat full', + 'object_chatFull_param_id_type_int' => 'ID', + 'object_chatFull_param_participants_type_ChatParticipants' => 'Participants', + 'object_chatFull_param_chat_photo_type_Photo' => 'Chat photo', + 'object_chatFull_param_notify_settings_type_PeerNotifySettings' => 'Notify settings', + 'object_chatFull_param_exported_invite_type_ExportedChatInvite' => 'Exported invite', + 'object_chatFull_param_bot_info_type_Vector t' => 'Bot info', + 'object_channelFull' => 'Full channel', + 'object_channelFull_param_can_view_participants_type_true' => 'Can view participants?', + 'object_channelFull_param_can_set_username_type_true' => 'Can set username?', + 'object_channelFull_param_can_set_stickers_type_true' => 'Can set group stickerset?', + 'object_channelFull_param_hidden_prehistory_type_true' => 'Hidden prehistory?', + 'object_channelFull_param_id_type_int' => 'ID', + 'object_channelFull_param_about_type_string' => 'About', + 'object_channelFull_param_participants_count_type_int' => 'Participants count', + 'object_channelFull_param_admins_count_type_int' => 'Admins count', + 'object_channelFull_param_kicked_count_type_int' => 'Kicked count', + 'object_channelFull_param_banned_count_type_int' => 'Banned count', + 'object_channelFull_param_read_inbox_max_id_type_int' => 'Read inbox max ID', + 'object_channelFull_param_read_outbox_max_id_type_int' => 'Read outbox max ID', + 'object_channelFull_param_unread_count_type_int' => 'Unread count', + 'object_channelFull_param_chat_photo_type_Photo' => 'Chat photo', + 'object_channelFull_param_notify_settings_type_PeerNotifySettings' => 'Notify settings', + 'object_channelFull_param_exported_invite_type_ExportedChatInvite' => 'Exported invite', + 'object_channelFull_param_bot_info_type_Vector t' => 'Bot info', + 'object_channelFull_param_migrated_from_chat_id_type_int' => 'Migrated from chat ID', + 'object_channelFull_param_migrated_from_max_id_type_int' => 'Migrated from max ID', + 'object_channelFull_param_pinned_msg_id_type_int' => 'Pinned msg ID', + 'object_channelFull_param_stickerset_type_StickerSet' => 'Stickerset', + 'object_channelFull_param_available_min_id_type_int' => 'Available min ID', + 'object_chatParticipant' => 'Chat participant', + 'object_chatParticipant_param_user_id_type_int' => 'User ID', + 'object_chatParticipant_param_inviter_id_type_int' => 'Inviter ID', + 'object_chatParticipant_param_date_type_int' => 'Date', + 'object_chatParticipantCreator' => 'Chat participant creator', + 'object_chatParticipantCreator_param_user_id_type_int' => 'User ID', + 'object_chatParticipantAdmin' => 'Chat participant admin', + 'object_chatParticipantAdmin_param_user_id_type_int' => 'User ID', + 'object_chatParticipantAdmin_param_inviter_id_type_int' => 'Inviter ID', + 'object_chatParticipantAdmin_param_date_type_int' => 'Date', + 'object_chatParticipantsForbidden' => 'Chat participants forbidden', + 'object_chatParticipantsForbidden_param_chat_id_type_int' => 'Chat ID', + 'object_chatParticipantsForbidden_param_self_participant_type_ChatParticipant' => 'Self participant', + 'object_chatParticipants' => 'Chat participants', + 'object_chatParticipants_param_chat_id_type_int' => 'Chat ID', + 'object_chatParticipants_param_participants_type_Vector t' => 'Participants', + 'object_chatParticipants_param_version_type_int' => 'Version', + 'object_chatPhotoEmpty' => 'Empty chat photo', + 'object_chatPhoto' => 'Chat photo', + 'object_chatPhoto_param_photo_small_type_FileLocation' => 'Photo small', + 'object_chatPhoto_param_photo_big_type_FileLocation' => 'Photo big', + 'object_messageEmpty' => 'Empty message', + 'object_messageEmpty_param_id_type_int' => 'ID', + 'object_message' => 'Message', + 'object_message_param_out_type_true' => 'Out?', + 'object_message_param_mentioned_type_true' => 'Mentioned?', + 'object_message_param_media_unread_type_true' => 'Media unread?', + 'object_message_param_silent_type_true' => 'Silent?', + 'object_message_param_post_type_true' => 'Post?', + 'object_message_param_id_type_int' => 'ID', + 'object_message_param_from_id_type_int' => 'From ID', + 'object_message_param_to_id_type_Peer' => 'To ID', + 'object_message_param_fwd_from_type_MessageFwdHeader' => 'Forwarded from', + 'object_message_param_via_bot_id_type_int' => 'Via bot ID', + 'object_message_param_reply_to_msg_id_type_int' => 'Reply to msg ID', + 'object_message_param_date_type_int' => 'Date', + 'object_message_param_message_type_string' => 'Message', + 'object_message_param_media_type_MessageMedia' => 'Media', + 'object_message_param_reply_markup_type_ReplyMarkup' => 'Reply markup', + 'object_message_param_entities_type_Vector t' => 'Entities', + 'object_message_param_views_type_int' => 'Views', + 'object_message_param_edit_date_type_int' => 'Edit date', + 'object_message_param_post_author_type_string' => 'Post author', + 'object_message_param_grouped_id_type_long' => 'Grouped ID', + 'object_messageService' => 'Message service', + 'object_messageService_param_out_type_true' => 'Out?', + 'object_messageService_param_mentioned_type_true' => 'Mentioned?', + 'object_messageService_param_media_unread_type_true' => 'Media unread?', + 'object_messageService_param_silent_type_true' => 'Silent?', + 'object_messageService_param_post_type_true' => 'Post?', + 'object_messageService_param_id_type_int' => 'ID', + 'object_messageService_param_from_id_type_int' => 'From ID', + 'object_messageService_param_to_id_type_Peer' => 'To ID', + 'object_messageService_param_reply_to_msg_id_type_int' => 'Reply to msg ID', + 'object_messageService_param_date_type_int' => 'Date', + 'object_messageService_param_action_type_MessageAction' => 'Action', + 'object_messageMediaEmpty' => 'Empty message media', + 'object_messageMediaPhoto' => 'Message media photo', + 'object_messageMediaPhoto_param_photo_type_Photo' => 'Photo', + 'object_messageMediaPhoto_param_ttl_seconds_type_int' => 'Ttl seconds', + 'object_messageMediaGeo' => 'Message media geo', + 'object_messageMediaGeo_param_geo_type_GeoPoint' => 'Geo', + 'object_messageMediaContact' => 'Message media contact', + 'object_messageMediaContact_param_phone_number_type_string' => 'Phone number', + 'object_messageMediaContact_param_first_name_type_string' => 'First name', + 'object_messageMediaContact_param_last_name_type_string' => 'Last name', + 'object_messageMediaContact_param_user_id_type_int' => 'User ID', + 'object_messageMediaUnsupported' => 'Message media unsupported', + 'object_messageMediaDocument' => 'Message media document', + 'object_messageMediaDocument_param_document_type_Document' => 'Document', + 'object_messageMediaDocument_param_ttl_seconds_type_int' => 'Ttl seconds', + 'object_messageMediaWebPage' => 'Message media web page', + 'object_messageMediaWebPage_param_webpage_type_WebPage' => 'Webpage', + 'object_messageMediaVenue' => 'Message media venue', + 'object_messageMediaVenue_param_geo_type_GeoPoint' => 'Geo', + 'object_messageMediaVenue_param_title_type_string' => 'Title', + 'object_messageMediaVenue_param_address_type_string' => 'Address', + 'object_messageMediaVenue_param_provider_type_string' => 'Provider', + 'object_messageMediaVenue_param_venue_id_type_string' => 'Venue ID', + 'object_messageMediaVenue_param_venue_type_type_string' => 'Venue type', + 'object_messageMediaGame' => 'Message media game', + 'object_messageMediaGame_param_game_type_Game' => 'Game', + 'object_messageMediaInvoice' => 'Message media invoice', + 'object_messageMediaInvoice_param_shipping_address_requested_type_true' => 'Shipping address requested?', + 'object_messageMediaInvoice_param_test_type_true' => 'Test?', + 'object_messageMediaInvoice_param_title_type_string' => 'Title', + 'object_messageMediaInvoice_param_description_type_string' => 'Description', + 'object_messageMediaInvoice_param_photo_type_WebDocument' => 'Photo', + 'object_messageMediaInvoice_param_receipt_msg_id_type_int' => 'Receipt msg ID', + 'object_messageMediaInvoice_param_currency_type_string' => 'Currency', + 'object_messageMediaInvoice_param_total_amount_type_long' => 'Total amount', + 'object_messageMediaInvoice_param_start_param_type_string' => 'Start param', + 'object_messageMediaGeoLive' => 'Message media geo live', + 'object_messageMediaGeoLive_param_geo_type_GeoPoint' => 'Geo', + 'object_messageMediaGeoLive_param_period_type_int' => 'Period', + 'object_messageActionEmpty' => 'Empty message action', + 'object_messageActionChatCreate' => 'Message action chat create', + 'object_messageActionChatCreate_param_title_type_string' => 'Title', + 'object_messageActionChatCreate_param_users_type_Vector t' => 'Users', + 'object_messageActionChatEditTitle' => 'Message action chat edit title', + 'object_messageActionChatEditTitle_param_title_type_string' => 'Title', + 'object_messageActionChatEditPhoto' => 'Message action chat edit photo', + 'object_messageActionChatEditPhoto_param_photo_type_Photo' => 'Photo', + 'object_messageActionChatDeletePhoto' => 'Message action chat delete photo', + 'object_messageActionChatAddUser' => 'Message action chat add user', + 'object_messageActionChatAddUser_param_users_type_Vector t' => 'Users', + 'object_messageActionChatDeleteUser' => 'Message action chat delete user', + 'object_messageActionChatDeleteUser_param_user_id_type_int' => 'User ID', + 'object_messageActionChatJoinedByLink' => 'Message action chat joined by link', + 'object_messageActionChatJoinedByLink_param_inviter_id_type_int' => 'Inviter ID', + 'object_messageActionChannelCreate' => 'Message action channel create', + 'object_messageActionChannelCreate_param_title_type_string' => 'Title', + 'object_messageActionChatMigrateTo' => 'Message action chat migrate to', + 'object_messageActionChatMigrateTo_param_channel_id_type_int' => 'Channel ID', + 'object_messageActionChannelMigrateFrom' => 'Message action channel migrate from', + 'object_messageActionChannelMigrateFrom_param_title_type_string' => 'Title', + 'object_messageActionChannelMigrateFrom_param_chat_id_type_int' => 'Chat ID', + 'object_messageActionPinMessage' => 'Message action pin message', + 'object_messageActionHistoryClear' => 'Message action history clear', + 'object_messageActionGameScore' => 'Message action game score', + 'object_messageActionGameScore_param_game_id_type_long' => 'Game ID', + 'object_messageActionGameScore_param_score_type_int' => 'Score', + 'object_messageActionPaymentSentMe' => 'Message action payment sent me', + 'object_messageActionPaymentSentMe_param_currency_type_string' => 'Currency', + 'object_messageActionPaymentSentMe_param_total_amount_type_long' => 'Total amount', + 'object_messageActionPaymentSentMe_param_payload_type_bytes' => 'Payload', + 'object_messageActionPaymentSentMe_param_info_type_PaymentRequestedInfo' => 'Info', + 'object_messageActionPaymentSentMe_param_shipping_option_id_type_string' => 'Shipping option ID', + 'object_messageActionPaymentSentMe_param_charge_type_PaymentCharge' => 'Charge', + 'object_messageActionPaymentSent' => 'Message action payment sent', + 'object_messageActionPaymentSent_param_currency_type_string' => 'Currency', + 'object_messageActionPaymentSent_param_total_amount_type_long' => 'Total amount', + 'object_messageActionPhoneCall' => 'Message action phone call', + 'object_messageActionPhoneCall_param_call_id_type_long' => 'Call ID', + 'object_messageActionPhoneCall_param_reason_type_PhoneCallDiscardReason' => 'Reason', + 'object_messageActionPhoneCall_param_duration_type_int' => 'Duration', + 'object_messageActionScreenshotTaken' => 'Message action screenshot taken', + 'object_messageActionCustomAction' => 'Message action custom action', + 'object_messageActionCustomAction_param_message_type_string' => 'Message', + 'object_dialog' => 'Dialog', + 'object_dialog_param_pinned_type_true' => 'Pinned?', + 'object_dialog_param_peer_type_Peer' => 'Peer', + 'object_dialog_param_top_message_type_int' => 'Top message', + 'object_dialog_param_read_inbox_max_id_type_int' => 'Read inbox max ID', + 'object_dialog_param_read_outbox_max_id_type_int' => 'Read outbox max ID', + 'object_dialog_param_unread_count_type_int' => 'Unread count', + 'object_dialog_param_unread_mentions_count_type_int' => 'Unread mentions count', + 'object_dialog_param_notify_settings_type_PeerNotifySettings' => 'Notify settings', + 'object_dialog_param_pts_type_int' => 'Pts', + 'object_dialog_param_draft_type_DraftMessage' => 'Draft', + 'object_photoEmpty' => 'Empty photo', + 'object_photoEmpty_param_id_type_long' => 'ID', + 'object_photo' => 'Photo', + 'object_photo_param_has_stickers_type_true' => 'Has stickers?', + 'object_photo_param_id_type_long' => 'ID', + 'object_photo_param_access_hash_type_long' => 'Access hash', + 'object_photo_param_date_type_int' => 'Date', + 'object_photo_param_sizes_type_Vector t' => 'Sizes', + 'object_photoSizeEmpty' => 'Empty photo size', + 'object_photoSizeEmpty_param_type_type_string' => 'Type', + 'object_photoSize' => 'Photo size', + 'object_photoSize_param_type_type_string' => 'Type', + 'object_photoSize_param_location_type_FileLocation' => 'Location', + 'object_photoSize_param_w_type_int' => 'Width', + 'object_photoSize_param_h_type_int' => 'Height', + 'object_photoSize_param_size_type_int' => 'Size', + 'object_photoCachedSize' => 'Photo cached size', + 'object_photoCachedSize_param_type_type_string' => 'Type', + 'object_photoCachedSize_param_location_type_FileLocation' => 'Location', + 'object_photoCachedSize_param_w_type_int' => 'Width', + 'object_photoCachedSize_param_h_type_int' => 'Height', + 'object_photoCachedSize_param_bytes_type_bytes' => 'Bytes', + 'object_geoPointEmpty' => 'Empty geo point', + 'object_geoPoint' => 'Geo point', + 'object_geoPoint_param_long_type_double' => 'Long', + 'object_geoPoint_param_lat_type_double' => 'Lat', + 'object_auth.checkedPhone' => 'Checked phone', + 'object_auth.checkedPhone_param_phone_registered_type_Bool' => 'Phone registered?', + 'object_auth.sentCode' => 'Sent code', + 'object_auth.sentCode_param_phone_registered_type_true' => 'Phone registered?', + 'object_auth.sentCode_param_type_type_auth.SentCodeType' => 'Type', + 'object_auth.sentCode_param_phone_code_hash_type_string' => 'Phone code hash', + 'object_auth.sentCode_param_next_type_type_auth.CodeType' => 'Next type', + 'object_auth.sentCode_param_timeout_type_int' => 'Timeout', + 'object_auth.authorization' => 'Authorization', + 'object_auth.authorization_param_tmp_sessions_type_int' => 'Temporary sessions', + 'object_auth.authorization_param_user_type_User' => 'User', + 'object_auth.exportedAuthorization' => 'Exported authorization', + 'object_auth.exportedAuthorization_param_id_type_int' => 'ID', + 'object_auth.exportedAuthorization_param_bytes_type_bytes' => 'Bytes', + 'object_inputNotifyPeer' => 'Notify peer', + 'object_inputNotifyPeer_param_peer_type_InputPeer' => 'Peer', + 'object_inputNotifyUsers' => 'Notify users', + 'object_inputNotifyChats' => 'Notify chats', + 'object_inputNotifyAll' => 'Notify all', + 'object_inputPeerNotifyEventsEmpty' => 'Empty input peer notify events', + 'object_inputPeerNotifyEventsAll' => 'Peer notify events all', + 'object_inputPeerNotifySettings' => 'Peer notify settings', + 'object_inputPeerNotifySettings_param_show_previews_type_true' => 'Show previews?', + 'object_inputPeerNotifySettings_param_silent_type_true' => 'Silent?', + 'object_inputPeerNotifySettings_param_mute_until_type_int' => 'Mute until', + 'object_inputPeerNotifySettings_param_sound_type_string' => 'Sound', + 'object_peerNotifyEventsEmpty' => 'Empty peer notify events', + 'object_peerNotifyEventsAll' => 'Peer notify events all', + 'object_peerNotifySettingsEmpty' => 'Empty peer notify settings', + 'object_peerNotifySettings' => 'Peer notify settings', + 'object_peerNotifySettings_param_show_previews_type_true' => 'Show previews?', + 'object_peerNotifySettings_param_silent_type_true' => 'Silent?', + 'object_peerNotifySettings_param_mute_until_type_int' => 'Mute until', + 'object_peerNotifySettings_param_sound_type_string' => 'Sound', + 'object_peerSettings' => 'Peer settings', + 'object_peerSettings_param_report_spam_type_true' => 'Report spam?', + 'object_wallPaper' => 'Wall paper', + 'object_wallPaper_param_id_type_int' => 'ID', + 'object_wallPaper_param_title_type_string' => 'Title', + 'object_wallPaper_param_sizes_type_Vector t' => 'Sizes', + 'object_wallPaper_param_color_type_int' => 'Color', + 'object_wallPaperSolid' => 'Wall paper solid', + 'object_wallPaperSolid_param_id_type_int' => 'ID', + 'object_wallPaperSolid_param_title_type_string' => 'Title', + 'object_wallPaperSolid_param_bg_color_type_int' => 'Bg color', + 'object_wallPaperSolid_param_color_type_int' => 'Color', + 'object_inputReportReasonSpam' => 'Report reason spam', + 'object_inputReportReasonViolence' => 'Report reason violence', + 'object_inputReportReasonPornography' => 'Report reason pornography', + 'object_inputReportReasonOther' => 'Report reason other', + 'object_inputReportReasonOther_param_text_type_string' => 'Text', + 'object_userFull' => 'User full', + 'object_userFull_param_blocked_type_true' => 'Blocked?', + 'object_userFull_param_phone_calls_available_type_true' => 'Phone calls available?', + 'object_userFull_param_phone_calls_private_type_true' => 'Phone calls private?', + 'object_userFull_param_user_type_User' => 'User', + 'object_userFull_param_about_type_string' => 'About', + 'object_userFull_param_link_type_contacts.Link' => 'Link', + 'object_userFull_param_profile_photo_type_Photo' => 'Profile photo', + 'object_userFull_param_notify_settings_type_PeerNotifySettings' => 'Notify settings', + 'object_userFull_param_bot_info_type_BotInfo' => 'Bot info', + 'object_userFull_param_common_chats_count_type_int' => 'Common chats count', + 'object_contact' => 'Contact', + 'object_contact_param_user_id_type_int' => 'User ID', + 'object_contact_param_mutual_type_Bool' => 'Mutual?', + 'object_importedContact' => 'Imported contact', + 'object_importedContact_param_user_id_type_int' => 'User ID', + 'object_importedContact_param_client_id_type_long' => 'Client ID', + 'object_contactBlocked' => 'Contact blocked', + 'object_contactBlocked_param_user_id_type_int' => 'User ID', + 'object_contactBlocked_param_date_type_int' => 'Date', + 'object_contactStatus' => 'Contact status', + 'object_contactStatus_param_user_id_type_int' => 'User ID', + 'object_contactStatus_param_status_type_UserStatus' => 'Status', + 'object_contacts.link' => 'Link', + 'object_contacts.link_param_my_link_type_ContactLink' => 'My link', + 'object_contacts.link_param_foreign_link_type_ContactLink' => 'Foreign link', + 'object_contacts.link_param_user_type_User' => 'User', + 'object_contacts.contactsNotModified' => 'Contacts not modified', + 'object_contacts.contacts' => 'Contacts', + 'object_contacts.contacts_param_contacts_type_Vector t' => 'Contacts', + 'object_contacts.contacts_param_saved_count_type_int' => 'Saved count', + 'object_contacts.contacts_param_users_type_Vector t' => 'Users', + 'object_contacts.importedContacts' => 'Imported contacts', + 'object_contacts.importedContacts_param_imported_type_Vector t' => 'Imported', + 'object_contacts.importedContacts_param_popular_invites_type_Vector t' => 'Popular invites', + 'object_contacts.importedContacts_param_retry_contacts_type_Vector t' => 'Retry importing contacts whose client IDs appear here', + 'object_contacts.importedContacts_param_users_type_Vector t' => 'Users', + 'object_contacts.blocked' => 'Blocked', + 'object_contacts.blocked_param_blocked_type_Vector t' => 'Blocked', + 'object_contacts.blocked_param_users_type_Vector t' => 'Users', + 'object_contacts.blockedSlice' => 'Blocked slice', + 'object_contacts.blockedSlice_param_count_type_int' => 'Count', + 'object_contacts.blockedSlice_param_blocked_type_Vector t' => 'Blocked', + 'object_contacts.blockedSlice_param_users_type_Vector t' => 'Users', + 'object_messages.dialogs' => 'Dialogs', + 'object_messages.dialogs_param_dialogs_type_Vector t' => 'Dialogs', + 'object_messages.dialogs_param_messages_type_Vector t' => 'Messages', + 'object_messages.dialogs_param_chats_type_Vector t' => 'Chats', + 'object_messages.dialogs_param_users_type_Vector t' => 'Users', + 'object_messages.dialogsSlice' => 'Dialogs slice', + 'object_messages.dialogsSlice_param_count_type_int' => 'Count', + 'object_messages.dialogsSlice_param_dialogs_type_Vector t' => 'Dialogs', + 'object_messages.dialogsSlice_param_messages_type_Vector t' => 'Messages', + 'object_messages.dialogsSlice_param_chats_type_Vector t' => 'Chats', + 'object_messages.dialogsSlice_param_users_type_Vector t' => 'Users', + 'object_messages.messages' => 'Messages', + 'object_messages.messages_param_messages_type_Vector t' => 'Messages', + 'object_messages.messages_param_chats_type_Vector t' => 'Chats', + 'object_messages.messages_param_users_type_Vector t' => 'Users', + 'object_messages.messagesSlice' => 'Messages slice', + 'object_messages.messagesSlice_param_count_type_int' => 'Count', + 'object_messages.messagesSlice_param_messages_type_Vector t' => 'Messages', + 'object_messages.messagesSlice_param_chats_type_Vector t' => 'Chats', + 'object_messages.messagesSlice_param_users_type_Vector t' => 'Users', + 'object_messages.channelMessages' => 'Channel messages', + 'object_messages.channelMessages_param_pts_type_int' => 'Pts', + 'object_messages.channelMessages_param_count_type_int' => 'Count', + 'object_messages.channelMessages_param_messages_type_Vector t' => 'Messages', + 'object_messages.channelMessages_param_chats_type_Vector t' => 'Chats', + 'object_messages.channelMessages_param_users_type_Vector t' => 'Users', + 'object_messages.messagesNotModified' => 'Messages not modified', + 'object_messages.messagesNotModified_param_count_type_int' => 'Count', + 'object_messages.chats' => 'Chats', + 'object_messages.chats_param_chats_type_Vector t' => 'Chats', + 'object_messages.chatsSlice' => 'Chats slice', + 'object_messages.chatsSlice_param_count_type_int' => 'Count', + 'object_messages.chatsSlice_param_chats_type_Vector t' => 'Chats', + 'object_messages.chatFull' => 'Chat full', + 'object_messages.chatFull_param_full_chat_type_ChatFull' => 'Full chat', + 'object_messages.chatFull_param_chats_type_Vector t' => 'Chats', + 'object_messages.chatFull_param_users_type_Vector t' => 'Users', + 'object_messages.affectedHistory' => 'Affected history', + 'object_messages.affectedHistory_param_pts_type_int' => 'Pts', + 'object_messages.affectedHistory_param_pts_count_type_int' => 'Pts count', + 'object_messages.affectedHistory_param_offset_type_int' => 'Offset', + 'object_inputMessagesFilterEmpty' => 'Empty input messages filter', + 'object_inputMessagesFilterPhotos' => 'Messages filter photos', + 'object_inputMessagesFilterVideo' => 'Messages filter video', + 'object_inputMessagesFilterPhotoVideo' => 'Messages filter photo video', + 'object_inputMessagesFilterDocument' => 'Messages filter document', + 'object_inputMessagesFilterUrl' => 'Messages filter URL', + 'object_inputMessagesFilterGif' => 'Messages filter gif', + 'object_inputMessagesFilterVoice' => 'Messages filter voice', + 'object_inputMessagesFilterMusic' => 'Messages filter music', + 'object_inputMessagesFilterChatPhotos' => 'Messages filter chat photos', + 'object_inputMessagesFilterPhoneCalls' => 'Messages filter phone calls', + 'object_inputMessagesFilterPhoneCalls_param_missed_type_true' => 'Missed?', + 'object_inputMessagesFilterRoundVoice' => 'Messages filter round voice', + 'object_inputMessagesFilterRoundVideo' => 'Messages filter round video', + 'object_inputMessagesFilterMyMentions' => 'Messages filter my mentions', + 'object_inputMessagesFilterGeo' => 'Messages filter geo', + 'object_inputMessagesFilterContacts' => 'Messages filter contacts', + 'object_updateNewMessage' => 'Update new message', + 'object_updateNewMessage_param_message_type_Message' => 'Message', + 'object_updateNewMessage_param_pts_type_int' => 'Pts', + 'object_updateNewMessage_param_pts_count_type_int' => 'Pts count', + 'object_updateMessageID' => 'Update message ID', + 'object_updateMessageID_param_id_type_int' => 'ID', + 'object_updateDeleteMessages' => 'Update delete messages', + 'object_updateDeleteMessages_param_messages_type_Vector t' => 'Messages', + 'object_updateDeleteMessages_param_pts_type_int' => 'Pts', + 'object_updateDeleteMessages_param_pts_count_type_int' => 'Pts count', + 'object_updateUserTyping' => 'Update user typing', + 'object_updateUserTyping_param_user_id_type_int' => 'User ID', + 'object_updateUserTyping_param_action_type_SendMessageAction' => 'Action', + 'object_updateChatUserTyping' => 'Update chat user typing', + 'object_updateChatUserTyping_param_chat_id_type_int' => 'Chat ID', + 'object_updateChatUserTyping_param_user_id_type_int' => 'User ID', + 'object_updateChatUserTyping_param_action_type_SendMessageAction' => 'Action', + 'object_updateChatParticipants' => 'Update chat participants', + 'object_updateChatParticipants_param_participants_type_ChatParticipants' => 'Participants', + 'object_updateUserName' => 'Update user name', + 'object_updateUserName_param_user_id_type_int' => 'User ID', + 'object_updateUserName_param_first_name_type_string' => 'First name', + 'object_updateUserName_param_last_name_type_string' => 'Last name', + 'object_updateUserName_param_username_type_string' => 'Username', + 'object_updateUserPhoto' => 'Update user photo', + 'object_updateUserPhoto_param_user_id_type_int' => 'User ID', + 'object_updateUserPhoto_param_date_type_int' => 'Date', + 'object_updateUserPhoto_param_photo_type_UserProfilePhoto' => 'Photo', + 'object_updateUserPhoto_param_previous_type_Bool' => 'Previous?', + 'object_updateContactRegistered' => 'Update contact registered', + 'object_updateContactRegistered_param_user_id_type_int' => 'User ID', + 'object_updateContactRegistered_param_date_type_int' => 'Date', + 'object_updateContactLink' => 'Update contact link', + 'object_updateContactLink_param_user_id_type_int' => 'User ID', + 'object_updateContactLink_param_my_link_type_ContactLink' => 'My link', + 'object_updateContactLink_param_foreign_link_type_ContactLink' => 'Foreign link', + 'object_updateNewEncryptedMessage' => 'Update new encrypted message', + 'object_updateNewEncryptedMessage_param_message_type_EncryptedMessage' => 'Message', + 'object_updateNewEncryptedMessage_param_qts_type_int' => 'Qts', + 'object_updateEncryptedChatTyping' => 'Update encrypted chat typing', + 'object_updateEncryptedChatTyping_param_chat_id_type_int' => 'Chat ID', + 'object_updateEncryption' => 'Update encryption', + 'object_updateEncryption_param_chat_type_EncryptedChat' => 'Chat', + 'object_updateEncryption_param_date_type_int' => 'Date', + 'object_updateEncryptedMessagesRead' => 'Update encrypted messages read', + 'object_updateEncryptedMessagesRead_param_chat_id_type_int' => 'Chat ID', + 'object_updateEncryptedMessagesRead_param_max_date_type_int' => 'Max date', + 'object_updateEncryptedMessagesRead_param_date_type_int' => 'Date', + 'object_updateChatParticipantAdd' => 'Update chat participant add', + 'object_updateChatParticipantAdd_param_chat_id_type_int' => 'Chat ID', + 'object_updateChatParticipantAdd_param_user_id_type_int' => 'User ID', + 'object_updateChatParticipantAdd_param_inviter_id_type_int' => 'Inviter ID', + 'object_updateChatParticipantAdd_param_date_type_int' => 'Date', + 'object_updateChatParticipantAdd_param_version_type_int' => 'Version', + 'object_updateChatParticipantDelete' => 'Update chat participant delete', + 'object_updateChatParticipantDelete_param_chat_id_type_int' => 'Chat ID', + 'object_updateChatParticipantDelete_param_user_id_type_int' => 'User ID', + 'object_updateChatParticipantDelete_param_version_type_int' => 'Version', + 'object_updateDcOptions' => 'Update DC options', + 'object_updateDcOptions_param_dc_options_type_Vector t' => 'DC options', + 'object_updateUserBlocked' => 'Update user blocked', + 'object_updateUserBlocked_param_user_id_type_int' => 'User ID', + 'object_updateUserBlocked_param_blocked_type_Bool' => 'Blocked?', + 'object_updateNotifySettings' => 'Update notify settings', + 'object_updateNotifySettings_param_peer_type_NotifyPeer' => 'Peer', + 'object_updateNotifySettings_param_notify_settings_type_PeerNotifySettings' => 'Notify settings', + 'object_updateServiceNotification' => 'Update service notification', + 'object_updateServiceNotification_param_popup_type_true' => 'Popup?', + 'object_updateServiceNotification_param_inbox_date_type_int' => 'Inbox date', + 'object_updateServiceNotification_param_type_type_string' => 'Type', + 'object_updateServiceNotification_param_message_type_string' => 'Message', + 'object_updateServiceNotification_param_media_type_MessageMedia' => 'Media', + 'object_updateServiceNotification_param_entities_type_Vector t' => 'Entities', + 'object_updatePrivacy' => 'Update privacy', + 'object_updatePrivacy_param_key_type_PrivacyKey' => 'Key', + 'object_updatePrivacy_param_rules_type_Vector t' => 'Rules', + 'object_updateUserPhone' => 'Update user phone', + 'object_updateUserPhone_param_user_id_type_int' => 'User ID', + 'object_updateUserPhone_param_phone_type_string' => 'Phone', + 'object_updateReadHistoryInbox' => 'Update read history inbox', + 'object_updateReadHistoryInbox_param_peer_type_Peer' => 'Peer', + 'object_updateReadHistoryInbox_param_max_id_type_int' => 'Max ID', + 'object_updateReadHistoryInbox_param_pts_type_int' => 'Pts', + 'object_updateReadHistoryInbox_param_pts_count_type_int' => 'Pts count', + 'object_updateReadHistoryOutbox' => 'Update read history outbox', + 'object_updateReadHistoryOutbox_param_peer_type_Peer' => 'Peer', + 'object_updateReadHistoryOutbox_param_max_id_type_int' => 'Max ID', + 'object_updateReadHistoryOutbox_param_pts_type_int' => 'Pts', + 'object_updateReadHistoryOutbox_param_pts_count_type_int' => 'Pts count', + 'object_updateWebPage' => 'Update web page', + 'object_updateWebPage_param_webpage_type_WebPage' => 'Webpage', + 'object_updateWebPage_param_pts_type_int' => 'Pts', + 'object_updateWebPage_param_pts_count_type_int' => 'Pts count', + 'object_updateReadMessagesContents' => 'Update read messages contents', + 'object_updateReadMessagesContents_param_messages_type_Vector t' => 'Messages', + 'object_updateReadMessagesContents_param_pts_type_int' => 'Pts', + 'object_updateReadMessagesContents_param_pts_count_type_int' => 'Pts count', + 'object_updateChannelTooLong' => 'Update channel too long', + 'object_updateChannelTooLong_param_channel_id_type_int' => 'Channel ID', + 'object_updateChannelTooLong_param_pts_type_int' => 'Pts', + 'object_updateChannel' => 'Update channel', + 'object_updateChannel_param_channel_id_type_int' => 'Channel ID', + 'object_updateNewChannelMessage' => 'Update new channel message', + 'object_updateNewChannelMessage_param_message_type_Message' => 'Message', + 'object_updateNewChannelMessage_param_pts_type_int' => 'Pts', + 'object_updateNewChannelMessage_param_pts_count_type_int' => 'Pts count', + 'object_updateReadChannelInbox' => 'Update read channel inbox', + 'object_updateReadChannelInbox_param_channel_id_type_int' => 'Channel ID', + 'object_updateReadChannelInbox_param_max_id_type_int' => 'Max ID', + 'object_updateDeleteChannelMessages' => 'Update delete channel messages', + 'object_updateDeleteChannelMessages_param_channel_id_type_int' => 'Channel ID', + 'object_updateDeleteChannelMessages_param_messages_type_Vector t' => 'Messages', + 'object_updateDeleteChannelMessages_param_pts_type_int' => 'Pts', + 'object_updateDeleteChannelMessages_param_pts_count_type_int' => 'Pts count', + 'object_updateChannelMessageViews' => 'Update channel message views', + 'object_updateChannelMessageViews_param_channel_id_type_int' => 'Channel ID', + 'object_updateChannelMessageViews_param_id_type_int' => 'ID', + 'object_updateChannelMessageViews_param_views_type_int' => 'Views', + 'object_updateChatAdmins' => 'Update chat admins', + 'object_updateChatAdmins_param_chat_id_type_int' => 'Chat ID', + 'object_updateChatAdmins_param_enabled_type_Bool' => 'Enabled?', + 'object_updateChatAdmins_param_version_type_int' => 'Version', + 'object_updateChatParticipantAdmin' => 'Update chat participant admin', + 'object_updateChatParticipantAdmin_param_chat_id_type_int' => 'Chat ID', + 'object_updateChatParticipantAdmin_param_user_id_type_int' => 'User ID', + 'object_updateChatParticipantAdmin_param_is_admin_type_Bool' => 'Is admin?', + 'object_updateChatParticipantAdmin_param_version_type_int' => 'Version', + 'object_updateNewStickerSet' => 'Update new sticker set', + 'object_updateNewStickerSet_param_stickerset_type_messages.StickerSet' => 'Stickerset', + 'object_updateStickerSetsOrder' => 'Update sticker sets order', + 'object_updateStickerSetsOrder_param_masks_type_true' => 'Masks?', + 'object_updateStickerSetsOrder_param_order_type_Vector t' => 'Order', + 'object_updateStickerSets' => 'Update sticker sets', + 'object_updateSavedGifs' => 'Update saved gifs', + 'object_updateBotInlineQuery' => 'Update bot inline query', + 'object_updateBotInlineQuery_param_query_id_type_long' => 'Query ID', + 'object_updateBotInlineQuery_param_user_id_type_int' => 'User ID', + 'object_updateBotInlineQuery_param_query_type_string' => 'Query', + 'object_updateBotInlineQuery_param_geo_type_GeoPoint' => 'Geo', + 'object_updateBotInlineQuery_param_offset_type_string' => 'Offset', + 'object_updateBotInlineSend' => 'Update bot inline send', + 'object_updateBotInlineSend_param_user_id_type_int' => 'User ID', + 'object_updateBotInlineSend_param_query_type_string' => 'Query', + 'object_updateBotInlineSend_param_geo_type_GeoPoint' => 'Geo', + 'object_updateBotInlineSend_param_id_type_string' => 'ID', + 'object_updateBotInlineSend_param_msg_id_type_InputBotInlineMessageID' => 'Msg ID', + 'object_updateEditChannelMessage' => 'Update edit channel message', + 'object_updateEditChannelMessage_param_message_type_Message' => 'Message', + 'object_updateEditChannelMessage_param_pts_type_int' => 'Pts', + 'object_updateEditChannelMessage_param_pts_count_type_int' => 'Pts count', + 'object_updateChannelPinnedMessage' => 'Update channel pinned message', + 'object_updateChannelPinnedMessage_param_channel_id_type_int' => 'Channel ID', + 'object_updateChannelPinnedMessage_param_id_type_int' => 'ID', + 'object_updateBotCallbackQuery' => 'Update bot callback query', + 'object_updateBotCallbackQuery_param_query_id_type_long' => 'Query ID', + 'object_updateBotCallbackQuery_param_user_id_type_int' => 'User ID', + 'object_updateBotCallbackQuery_param_peer_type_Peer' => 'Peer', + 'object_updateBotCallbackQuery_param_msg_id_type_int' => 'Msg ID', + 'object_updateBotCallbackQuery_param_chat_instance_type_long' => 'Chat instance', + 'object_updateBotCallbackQuery_param_data_type_bytes' => 'Data', + 'object_updateBotCallbackQuery_param_game_short_name_type_string' => 'Game short name', + 'object_updateEditMessage' => 'Update edit message', + 'object_updateEditMessage_param_message_type_Message' => 'Message', + 'object_updateEditMessage_param_pts_type_int' => 'Pts', + 'object_updateEditMessage_param_pts_count_type_int' => 'Pts count', + 'object_updateInlineBotCallbackQuery' => 'Update inline bot callback query', + 'object_updateInlineBotCallbackQuery_param_query_id_type_long' => 'Query ID', + 'object_updateInlineBotCallbackQuery_param_user_id_type_int' => 'User ID', + 'object_updateInlineBotCallbackQuery_param_msg_id_type_InputBotInlineMessageID' => 'Msg ID', + 'object_updateInlineBotCallbackQuery_param_chat_instance_type_long' => 'Chat instance', + 'object_updateInlineBotCallbackQuery_param_data_type_bytes' => 'Data', + 'object_updateInlineBotCallbackQuery_param_game_short_name_type_string' => 'Game short name', + 'object_updateReadChannelOutbox' => 'Update read channel outbox', + 'object_updateReadChannelOutbox_param_channel_id_type_int' => 'Channel ID', + 'object_updateReadChannelOutbox_param_max_id_type_int' => 'Max ID', + 'object_updateDraftMessage' => 'Update draft message', + 'object_updateDraftMessage_param_peer_type_Peer' => 'Peer', + 'object_updateDraftMessage_param_draft_type_DraftMessage' => 'Draft', + 'object_updateReadFeaturedStickers' => 'Update read featured stickers', + 'object_updateRecentStickers' => 'Update recent stickers', + 'object_updateConfig' => 'Update config', + 'object_updatePtsChanged' => 'Update pts changed', + 'object_updateChannelWebPage' => 'Update channel web page', + 'object_updateChannelWebPage_param_channel_id_type_int' => 'Channel ID', + 'object_updateChannelWebPage_param_webpage_type_WebPage' => 'Webpage', + 'object_updateChannelWebPage_param_pts_type_int' => 'Pts', + 'object_updateChannelWebPage_param_pts_count_type_int' => 'Pts count', + 'object_updateDialogPinned' => 'Update dialog pinned', + 'object_updateDialogPinned_param_pinned_type_true' => 'Pinned?', + 'object_updateDialogPinned_param_peer_type_Peer' => 'Peer', + 'object_updatePinnedDialogs' => 'Update pinned dialogs', + 'object_updatePinnedDialogs_param_order_type_Vector t' => 'Order', + 'object_updateBotWebhookJSON' => 'Update bot webhook json', + 'object_updateBotWebhookJSON_param_data_type_DataJSON' => 'Data', + 'object_updateBotWebhookJSONQuery' => 'Update bot webhook json query', + 'object_updateBotWebhookJSONQuery_param_query_id_type_long' => 'Query ID', + 'object_updateBotWebhookJSONQuery_param_data_type_DataJSON' => 'Data', + 'object_updateBotWebhookJSONQuery_param_timeout_type_int' => 'Timeout', + 'object_updateBotShippingQuery' => 'Update bot shipping query', + 'object_updateBotShippingQuery_param_query_id_type_long' => 'Query ID', + 'object_updateBotShippingQuery_param_user_id_type_int' => 'User ID', + 'object_updateBotShippingQuery_param_payload_type_bytes' => 'Payload', + 'object_updateBotShippingQuery_param_shipping_address_type_PostAddress' => 'Shipping address', + 'object_updateBotPrecheckoutQuery' => 'Update bot precheckout query', + 'object_updateBotPrecheckoutQuery_param_query_id_type_long' => 'Query ID', + 'object_updateBotPrecheckoutQuery_param_user_id_type_int' => 'User ID', + 'object_updateBotPrecheckoutQuery_param_payload_type_bytes' => 'Payload', + 'object_updateBotPrecheckoutQuery_param_info_type_PaymentRequestedInfo' => 'Info', + 'object_updateBotPrecheckoutQuery_param_shipping_option_id_type_string' => 'Shipping option ID', + 'object_updateBotPrecheckoutQuery_param_currency_type_string' => 'Currency', + 'object_updateBotPrecheckoutQuery_param_total_amount_type_long' => 'Total amount', + 'object_updatePhoneCall' => 'Update phone call', + 'object_updatePhoneCall_param_phone_call_type_PhoneCall' => 'Phone call', + 'object_updateLangPackTooLong' => 'Update lang pack too long', + 'object_updateLangPack' => 'Update lang pack', + 'object_updateLangPack_param_difference_type_LangPackDifference' => 'Difference', + 'object_updateFavedStickers' => 'Update faved stickers', + 'object_updateChannelReadMessagesContents' => 'Update channel read messages contents', + 'object_updateChannelReadMessagesContents_param_channel_id_type_int' => 'Channel ID', + 'object_updateChannelReadMessagesContents_param_messages_type_Vector t' => 'Messages', + 'object_updateContactsReset' => 'Update contacts reset', + 'object_updateChannelAvailableMessages' => 'Update channel available messages', + 'object_updateChannelAvailableMessages_param_channel_id_type_int' => 'Channel ID', + 'object_updateChannelAvailableMessages_param_available_min_id_type_int' => 'Available min ID', + 'object_updates.state' => 'State', + 'object_updates.state_param_pts_type_int' => 'Pts', + 'object_updates.state_param_qts_type_int' => 'Qts', + 'object_updates.state_param_date_type_int' => 'Date', + 'object_updates.state_param_seq_type_int' => 'Seq', + 'object_updates.state_param_unread_count_type_int' => 'Unread count', + 'object_updates.differenceEmpty' => 'Empty difference', + 'object_updates.differenceEmpty_param_date_type_int' => 'Date', + 'object_updates.differenceEmpty_param_seq_type_int' => 'Seq', + 'object_updates.difference' => 'Difference', + 'object_updates.difference_param_new_messages_type_Vector t' => 'New messages', + 'object_updates.difference_param_new_encrypted_messages_type_Vector t' => 'New encrypted messages', + 'object_updates.difference_param_other_updates_type_Vector t' => 'Other updates', + 'object_updates.difference_param_chats_type_Vector t' => 'Chats', + 'object_updates.difference_param_users_type_Vector t' => 'Users', + 'object_updates.difference_param_state_type_updates.State' => 'State', + 'object_updates.differenceSlice' => 'Difference slice', + 'object_updates.differenceSlice_param_new_messages_type_Vector t' => 'New messages', + 'object_updates.differenceSlice_param_new_encrypted_messages_type_Vector t' => 'New encrypted messages', + 'object_updates.differenceSlice_param_other_updates_type_Vector t' => 'Other updates', + 'object_updates.differenceSlice_param_chats_type_Vector t' => 'Chats', + 'object_updates.differenceSlice_param_users_type_Vector t' => 'Users', + 'object_updates.differenceSlice_param_intermediate_state_type_updates.State' => 'Intermediate state', + 'object_updates.differenceTooLong' => 'Difference too long', + 'object_updates.differenceTooLong_param_pts_type_int' => 'Pts', + 'object_updatesTooLong' => 'Updates too long', + 'object_updateShortMessage' => 'Update short message', + 'object_updateShortMessage_param_out_type_true' => 'Out?', + 'object_updateShortMessage_param_mentioned_type_true' => 'Mentioned?', + 'object_updateShortMessage_param_media_unread_type_true' => 'Media unread?', + 'object_updateShortMessage_param_silent_type_true' => 'Silent?', + 'object_updateShortMessage_param_id_type_int' => 'ID', + 'object_updateShortMessage_param_user_id_type_int' => 'User ID', + 'object_updateShortMessage_param_message_type_string' => 'Message', + 'object_updateShortMessage_param_pts_type_int' => 'Pts', + 'object_updateShortMessage_param_pts_count_type_int' => 'Pts count', + 'object_updateShortMessage_param_date_type_int' => 'Date', + 'object_updateShortMessage_param_fwd_from_type_MessageFwdHeader' => 'Fwd from', + 'object_updateShortMessage_param_via_bot_id_type_int' => 'Via bot ID', + 'object_updateShortMessage_param_reply_to_msg_id_type_int' => 'Reply to msg ID', + 'object_updateShortMessage_param_entities_type_Vector t' => 'Entities', + 'object_updateShortChatMessage' => 'Update short chat message', + 'object_updateShortChatMessage_param_out_type_true' => 'Out?', + 'object_updateShortChatMessage_param_mentioned_type_true' => 'Mentioned?', + 'object_updateShortChatMessage_param_media_unread_type_true' => 'Media unread?', + 'object_updateShortChatMessage_param_silent_type_true' => 'Silent?', + 'object_updateShortChatMessage_param_id_type_int' => 'ID', + 'object_updateShortChatMessage_param_from_id_type_int' => 'From ID', + 'object_updateShortChatMessage_param_chat_id_type_int' => 'Chat ID', + 'object_updateShortChatMessage_param_message_type_string' => 'Message', + 'object_updateShortChatMessage_param_pts_type_int' => 'Pts', + 'object_updateShortChatMessage_param_pts_count_type_int' => 'Pts count', + 'object_updateShortChatMessage_param_date_type_int' => 'Date', + 'object_updateShortChatMessage_param_fwd_from_type_MessageFwdHeader' => 'Fwd from', + 'object_updateShortChatMessage_param_via_bot_id_type_int' => 'Via bot ID', + 'object_updateShortChatMessage_param_reply_to_msg_id_type_int' => 'Reply to msg ID', + 'object_updateShortChatMessage_param_entities_type_Vector t' => 'Entities', + 'object_updateShort' => 'Update short', + 'object_updateShort_param_update_type_Update' => 'Update', + 'object_updateShort_param_date_type_int' => 'Date', + 'object_updatesCombined' => 'Updates combined', + 'object_updatesCombined_param_updates_type_Vector t' => 'Updates', + 'object_updatesCombined_param_users_type_Vector t' => 'Users', + 'object_updatesCombined_param_chats_type_Vector t' => 'Chats', + 'object_updatesCombined_param_date_type_int' => 'Date', + 'object_updatesCombined_param_seq_start_type_int' => 'Seq start', + 'object_updatesCombined_param_seq_type_int' => 'Seq', + 'object_updates' => 'Updates', + 'object_updates_param_updates_type_Vector t' => 'Updates', + 'object_updates_param_users_type_Vector t' => 'Users', + 'object_updates_param_chats_type_Vector t' => 'Chats', + 'object_updates_param_date_type_int' => 'Date', + 'object_updates_param_seq_type_int' => 'Seq', + 'object_updateShortSentMessage' => 'Update short sent message', + 'object_updateShortSentMessage_param_out_type_true' => 'Out?', + 'object_updateShortSentMessage_param_id_type_int' => 'ID', + 'object_updateShortSentMessage_param_pts_type_int' => 'Pts', + 'object_updateShortSentMessage_param_pts_count_type_int' => 'Pts count', + 'object_updateShortSentMessage_param_date_type_int' => 'Date', + 'object_updateShortSentMessage_param_media_type_MessageMedia' => 'Media', + 'object_updateShortSentMessage_param_entities_type_Vector t' => 'Entities', + 'object_photos.photos' => 'Photos', + 'object_photos.photos_param_photos_type_Vector t' => 'Photos', + 'object_photos.photos_param_users_type_Vector t' => 'Users', + 'object_photos.photosSlice' => 'Photos slice', + 'object_photos.photosSlice_param_count_type_int' => 'Count', + 'object_photos.photosSlice_param_photos_type_Vector t' => 'Photos', + 'object_photos.photosSlice_param_users_type_Vector t' => 'Users', + 'object_photos.photo' => 'Photo', + 'object_photos.photo_param_photo_type_Photo' => 'Photo', + 'object_photos.photo_param_users_type_Vector t' => 'Users', + 'object_upload.file' => 'File', + 'object_upload.file_param_type_type_storage.FileType' => 'Type', + 'object_upload.file_param_mtime_type_int' => 'Mtime', + 'object_upload.file_param_bytes_type_bytes' => 'Bytes', + 'object_upload.fileCdnRedirect' => 'File cdn redirect', + 'object_upload.fileCdnRedirect_param_dc_id_type_int' => 'DC ID', + 'object_upload.fileCdnRedirect_param_file_token_type_bytes' => 'File token', + 'object_upload.fileCdnRedirect_param_encryption_key_type_bytes' => 'Encryption key', + 'object_upload.fileCdnRedirect_param_encryption_iv_type_bytes' => 'Encryption iv', + 'object_upload.fileCdnRedirect_param_cdn_file_hashes_type_Vector t' => 'Cdn file hashes', + 'object_dcOption' => 'DC option', + 'object_dcOption_param_ipv6_type_true' => 'Ipv6?', + 'object_dcOption_param_media_only_type_true' => 'Media only?', + 'object_dcOption_param_tcpo_only_type_true' => 'Tcpo only?', + 'object_dcOption_param_cdn_type_true' => 'Cdn?', + 'object_dcOption_param_static_type_true' => 'Static?', + 'object_dcOption_param_id_type_int' => 'ID', + 'object_dcOption_param_ip_address_type_string' => 'Ip address', + 'object_dcOption_param_port_type_int' => 'Port', + 'object_config' => 'Config', + 'object_config_param_phonecalls_enabled_type_true' => 'Phonecalls enabled?', + 'object_config_param_default_p2p_contacts_type_true' => 'Default p2p contacts?', + 'object_config_param_date_type_int' => 'Date', + 'object_config_param_expires_type_int' => 'Expires', + 'object_config_param_test_mode_type_Bool' => 'Test mode?', + 'object_config_param_this_dc_type_int' => 'This DC', + 'object_config_param_dc_options_type_Vector t' => 'DC options', + 'object_config_param_chat_size_max_type_int' => 'Chat size max', + 'object_config_param_megagroup_size_max_type_int' => 'Megagroup size max', + 'object_config_param_forwarded_count_max_type_int' => 'Forwarded count max', + 'object_config_param_online_update_period_ms_type_int' => 'Online update period ms', + 'object_config_param_offline_blur_timeout_ms_type_int' => 'Offline blur timeout ms', + 'object_config_param_offline_idle_timeout_ms_type_int' => 'Offline IDle timeout ms', + 'object_config_param_online_cloud_timeout_ms_type_int' => 'Online cloud timeout ms', + 'object_config_param_notify_cloud_delay_ms_type_int' => 'Notify cloud delay ms', + 'object_config_param_notify_default_delay_ms_type_int' => 'Notify default delay ms', + 'object_config_param_chat_big_size_type_int' => 'Chat big size', + 'object_config_param_push_chat_period_ms_type_int' => 'Push chat period ms', + 'object_config_param_push_chat_limit_type_int' => 'Push chat limit', + 'object_config_param_saved_gifs_limit_type_int' => 'Saved gifs limit', + 'object_config_param_edit_time_limit_type_int' => 'Edit time limit', + 'object_config_param_rating_e_decay_type_int' => 'Rating e decay', + 'object_config_param_stickers_recent_limit_type_int' => 'Stickers recent limit', + 'object_config_param_stickers_faved_limit_type_int' => 'Stickers faved limit', + 'object_config_param_channels_read_media_period_type_int' => 'Channels read media period', + 'object_config_param_tmp_sessions_type_int' => 'Tmp sessions', + 'object_config_param_pinned_dialogs_count_max_type_int' => 'Pinned dialogs count max', + 'object_config_param_call_receive_timeout_ms_type_int' => 'Call receive timeout ms', + 'object_config_param_call_ring_timeout_ms_type_int' => 'Call ring timeout ms', + 'object_config_param_call_connect_timeout_ms_type_int' => 'Call connect timeout ms', + 'object_config_param_call_packet_timeout_ms_type_int' => 'Call packet timeout ms', + 'object_config_param_me_url_prefix_type_string' => 'Me URL prefix', + 'object_config_param_suggested_lang_code_type_string' => 'Suggested lang code', + 'object_config_param_lang_pack_version_type_int' => 'Lang pack version', + 'object_config_param_disabled_features_type_Vector t' => 'Disabled features', + 'object_nearestDc' => 'Nearest DC', + 'object_nearestDc_param_country_type_string' => 'Country', + 'object_nearestDc_param_this_dc_type_int' => 'This DC', + 'object_nearestDc_param_nearest_dc_type_int' => 'Nearest DC', + 'object_help.appUpdate' => 'App update', + 'object_help.appUpdate_param_id_type_int' => 'ID', + 'object_help.appUpdate_param_critical_type_Bool' => 'Critical?', + 'object_help.appUpdate_param_url_type_string' => 'URL', + 'object_help.appUpdate_param_text_type_string' => 'Text', + 'object_help.noAppUpdate' => 'No app update', + 'object_help.inviteText' => 'Invite text', + 'object_help.inviteText_param_message_type_string' => 'Message', + 'object_encryptedChatEmpty' => 'Empty encrypted chat', + 'object_encryptedChatEmpty_param_id_type_int' => 'ID', + 'object_encryptedChatWaiting' => 'Encrypted chat waiting', + 'object_encryptedChatWaiting_param_id_type_int' => 'ID', + 'object_encryptedChatWaiting_param_access_hash_type_long' => 'Access hash', + 'object_encryptedChatWaiting_param_date_type_int' => 'Date', + 'object_encryptedChatWaiting_param_admin_id_type_int' => 'Admin ID', + 'object_encryptedChatWaiting_param_participant_id_type_int' => 'Participant ID', + 'object_encryptedChatRequested' => 'Encrypted chat requested', + 'object_encryptedChatRequested_param_id_type_int' => 'ID', + 'object_encryptedChatRequested_param_access_hash_type_long' => 'Access hash', + 'object_encryptedChatRequested_param_date_type_int' => 'Date', + 'object_encryptedChatRequested_param_admin_id_type_int' => 'Admin ID', + 'object_encryptedChatRequested_param_participant_id_type_int' => 'Participant ID', + 'object_encryptedChatRequested_param_g_a_type_bytes' => 'G a', + 'object_encryptedChat' => 'Encrypted chat', + 'object_encryptedChat_param_id_type_int' => 'ID', + 'object_encryptedChat_param_access_hash_type_long' => 'Access hash', + 'object_encryptedChat_param_date_type_int' => 'Date', + 'object_encryptedChat_param_admin_id_type_int' => 'Admin ID', + 'object_encryptedChat_param_participant_id_type_int' => 'Participant ID', + 'object_encryptedChat_param_g_a_or_b_type_bytes' => 'G a or b', + 'object_encryptedChat_param_key_fingerprint_type_long' => 'Key fingerprint', + 'object_encryptedChatDiscarded' => 'Encrypted chat discarded', + 'object_encryptedChatDiscarded_param_id_type_int' => 'ID', + 'object_inputEncryptedChat' => 'Encrypted chat', + 'object_inputEncryptedChat_param_chat_id_type_int' => 'Chat ID', + 'object_inputEncryptedChat_param_access_hash_type_long' => 'Access hash', + 'object_encryptedFileEmpty' => 'Empty encrypted file', + 'object_encryptedFile' => 'Encrypted file', + 'object_encryptedFile_param_id_type_long' => 'ID', + 'object_encryptedFile_param_access_hash_type_long' => 'Access hash', + 'object_encryptedFile_param_size_type_int' => 'Size', + 'object_encryptedFile_param_dc_id_type_int' => 'DC ID', + 'object_encryptedFile_param_key_fingerprint_type_int' => 'Key fingerprint', + 'object_inputEncryptedFileEmpty' => 'Empty input encrypted file', + 'object_inputEncryptedFileUploaded' => 'Encrypted file uploaded', + 'object_inputEncryptedFileUploaded_param_id_type_long' => 'ID', + 'object_inputEncryptedFileUploaded_param_parts_type_int' => 'Parts', + 'object_inputEncryptedFileUploaded_param_md5_checksum_type_string' => 'Md5 checksum', + 'object_inputEncryptedFileUploaded_param_key_fingerprint_type_int' => 'Key fingerprint', + 'object_inputEncryptedFile' => 'Encrypted file', + 'object_inputEncryptedFile_param_id_type_long' => 'ID', + 'object_inputEncryptedFile_param_access_hash_type_long' => 'Access hash', + 'object_inputEncryptedFileBigUploaded' => 'Encrypted file big uploaded', + 'object_inputEncryptedFileBigUploaded_param_id_type_long' => 'ID', + 'object_inputEncryptedFileBigUploaded_param_parts_type_int' => 'Parts', + 'object_inputEncryptedFileBigUploaded_param_key_fingerprint_type_int' => 'Key fingerprint', + 'object_encryptedMessage' => 'Encrypted message', + 'object_encryptedMessage_param_chat_id_type_int' => 'Chat ID', + 'object_encryptedMessage_param_date_type_int' => 'Date', + 'object_encryptedMessage_param_decrypted_message_type_DecryptedMessage' => 'Decrypted message', + 'object_encryptedMessage_param_file_type_EncryptedFile' => 'File', + 'object_encryptedMessageService' => 'Encrypted message service', + 'object_encryptedMessageService_param_chat_id_type_int' => 'Chat ID', + 'object_encryptedMessageService_param_date_type_int' => 'Date', + 'object_encryptedMessageService_param_decrypted_message_type_DecryptedMessage' => 'Decrypted message', + 'object_messages.dhConfigNotModified' => 'Dh config not modified', + 'object_messages.dhConfigNotModified_param_random_type_bytes' => 'Random', + 'object_messages.dhConfig' => 'Dh config', + 'object_messages.dhConfig_param_g_type_int' => 'G', + 'object_messages.dhConfig_param_p_type_bytes' => 'P', + 'object_messages.dhConfig_param_version_type_int' => 'Version', + 'object_messages.dhConfig_param_random_type_bytes' => 'Random', + 'object_messages.sentEncryptedMessage' => 'Sent encrypted message', + 'object_messages.sentEncryptedMessage_param_date_type_int' => 'Date', + 'object_messages.sentEncryptedFile' => 'Sent encrypted file', + 'object_messages.sentEncryptedFile_param_date_type_int' => 'Date', + 'object_messages.sentEncryptedFile_param_file_type_EncryptedFile' => 'File', + 'object_inputDocumentEmpty' => 'Empty input document', + 'object_inputDocument' => 'Document', + 'object_inputDocument_param_id_type_long' => 'ID', + 'object_inputDocument_param_access_hash_type_long' => 'Access hash', + 'object_documentEmpty' => 'Empty document', + 'object_documentEmpty_param_id_type_long' => 'ID', + 'object_document' => 'Document', + 'object_document_param_id_type_long' => 'ID', + 'object_document_param_access_hash_type_long' => 'Access hash', + 'object_document_param_date_type_int' => 'Date', + 'object_document_param_mime_type_type_string' => 'Mime type', + 'object_document_param_size_type_int' => 'Size', + 'object_document_param_thumb_type_PhotoSize' => 'Thumbnail', + 'object_document_param_dc_id_type_int' => 'DC ID', + 'object_document_param_version_type_int' => 'Version', + 'object_document_param_attributes_type_Vector t' => 'Attributes', + 'object_help.support' => 'Support', + 'object_help.support_param_phone_number_type_string' => 'Phone number', + 'object_help.support_param_user_type_User' => 'User', + 'object_notifyPeer' => 'Notify peer', + 'object_notifyPeer_param_peer_type_Peer' => 'Peer', + 'object_notifyUsers' => 'Notify users', + 'object_notifyChats' => 'Notify chats', + 'object_notifyAll' => 'Notify all', + 'object_sendMessageTypingAction' => 'Send message typing action', + 'object_sendMessageCancelAction' => 'Send message cancel action', + 'object_sendMessageRecordVideoAction' => 'Send message record video action', + 'object_sendMessageUploadVideoAction' => 'Send message upload video action', + 'object_sendMessageUploadVideoAction_param_progress_type_int' => 'Progress', + 'object_sendMessageRecordAudioAction' => 'Send message record audio action', + 'object_sendMessageUploadAudioAction' => 'Send message upload audio action', + 'object_sendMessageUploadAudioAction_param_progress_type_int' => 'Progress', + 'object_sendMessageUploadPhotoAction' => 'Send message upload photo action', + 'object_sendMessageUploadPhotoAction_param_progress_type_int' => 'Progress', + 'object_sendMessageUploadDocumentAction' => 'Send message upload document action', + 'object_sendMessageUploadDocumentAction_param_progress_type_int' => 'Progress', + 'object_sendMessageGeoLocationAction' => 'Send message geo location action', + 'object_sendMessageChooseContactAction' => 'Send message choose contact action', + 'object_sendMessageGamePlayAction' => 'Send message game play action', + 'object_sendMessageRecordRoundAction' => 'Send message record round action', + 'object_sendMessageUploadRoundAction' => 'Send message upload round action', + 'object_sendMessageUploadRoundAction_param_progress_type_int' => 'Progress', + 'object_contacts.found' => 'Found', + 'object_contacts.found_param_my_results_type_Vector t' => 'My results', + 'object_contacts.found_param_results_type_Vector t' => 'Results', + 'object_contacts.found_param_chats_type_Vector t' => 'Chats', + 'object_contacts.found_param_users_type_Vector t' => 'Users', + 'object_inputPrivacyKeyStatusTimestamp' => 'Privacy key status timestamp', + 'object_inputPrivacyKeyChatInvite' => 'Privacy key chat invite', + 'object_inputPrivacyKeyPhoneCall' => 'Privacy key phone call', + 'object_privacyKeyStatusTimestamp' => 'Privacy key status timestamp', + 'object_privacyKeyPhoneCall' => 'Privacy key phone call', + 'object_inputPrivacyValueAllowContacts' => 'Privacy value allow contacts', + 'object_inputPrivacyValueAllowAll' => 'Privacy value allow all', + 'object_inputPrivacyValueAllowUsers' => 'Privacy value allow users', + 'object_inputPrivacyValueAllowUsers_param_users_type_Vector t' => 'Users', + 'object_inputPrivacyValueDisallowContacts' => 'Privacy value disallow contacts', + 'object_inputPrivacyValueDisallowAll' => 'Privacy value disallow all', + 'object_inputPrivacyValueDisallowUsers' => 'Privacy value disallow users', + 'object_inputPrivacyValueDisallowUsers_param_users_type_Vector t' => 'Users', + 'object_privacyValueAllowContacts' => 'Privacy value allow contacts', + 'object_privacyValueAllowAll' => 'Privacy value allow all', + 'object_privacyValueAllowUsers' => 'Privacy value allow users', + 'object_privacyValueAllowUsers_param_users_type_Vector t' => 'Users', + 'object_privacyValueDisallowContacts' => 'Privacy value disallow contacts', + 'object_privacyValueDisallowAll' => 'Privacy value disallow all', + 'object_privacyValueDisallowUsers' => 'Privacy value disallow users', + 'object_privacyValueDisallowUsers_param_users_type_Vector t' => 'Users', + 'object_account.privacyRules' => 'Privacy rules', + 'object_account.privacyRules_param_rules_type_Vector t' => 'Rules', + 'object_account.privacyRules_param_users_type_Vector t' => 'Users', + 'object_accountDaysTTL' => 'Account TTL in days', + 'object_accountDaysTTL_param_days_type_int' => 'Days', + 'object_documentAttributeImageSize' => 'Document attribute image size', + 'object_documentAttributeImageSize_param_w_type_int' => 'Width', + 'object_documentAttributeImageSize_param_h_type_int' => 'Height', + 'object_documentAttributeAnimated' => 'Document attribute animated', + 'object_documentAttributeSticker' => 'Document attribute sticker', + 'object_documentAttributeSticker_param_mask_type_true' => 'Mask?', + 'object_documentAttributeSticker_param_alt_type_string' => 'Alt', + 'object_documentAttributeSticker_param_stickerset_type_InputStickerSet' => 'Stickerset', + 'object_documentAttributeSticker_param_mask_coords_type_MaskCoords' => 'Mask coords', + 'object_documentAttributeVideo' => 'Document attribute video', + 'object_documentAttributeVideo_param_round_message_type_true' => 'Round message?', + 'object_documentAttributeVideo_param_supports_streaming_type_true' => 'Supports streaming?', + 'object_documentAttributeVideo_param_duration_type_int' => 'Duration', + 'object_documentAttributeVideo_param_w_type_int' => 'Width', + 'object_documentAttributeVideo_param_h_type_int' => 'Height', + 'object_documentAttributeAudio' => 'Document attribute audio', + 'object_documentAttributeAudio_param_voice_type_true' => 'Voice?', + 'object_documentAttributeAudio_param_duration_type_int' => 'Duration', + 'object_documentAttributeAudio_param_title_type_string' => 'Title', + 'object_documentAttributeAudio_param_performer_type_string' => 'Performer', + 'object_documentAttributeAudio_param_waveform_type_bytes' => 'Waveform', + 'object_documentAttributeFilename' => 'Document attribute filename', + 'object_documentAttributeFilename_param_file_name_type_string' => 'File name', + 'object_documentAttributeHasStickers' => 'Document attribute has stickers', + 'object_messages.stickersNotModified' => 'Stickers not modified', + 'object_messages.stickers' => 'Stickers', + 'object_messages.stickers_param_hash_type_string' => 'Hash', + 'object_messages.stickers_param_stickers_type_Vector t' => 'Stickers', + 'object_stickerPack' => 'Sticker pack', + 'object_stickerPack_param_emoticon_type_string' => 'Emoticon', + 'object_stickerPack_param_documents_type_Vector t' => 'Documents', + 'object_messages.allStickersNotModified' => 'All stickers not modified', + 'object_messages.allStickers' => 'All stickers', + 'object_messages.allStickers_param_hash_type_int' => 'Hash', + 'object_messages.allStickers_param_sets_type_Vector t' => 'Sets', + 'object_disabledFeature' => 'Disabled feature', + 'object_disabledFeature_param_feature_type_string' => 'Feature', + 'object_disabledFeature_param_description_type_string' => 'Description', + 'object_messages.affectedMessages' => 'Affected messages', + 'object_messages.affectedMessages_param_pts_type_int' => 'Pts', + 'object_messages.affectedMessages_param_pts_count_type_int' => 'Pts count', + 'object_contactLinkUnknown' => 'Contact link unknown', + 'object_contactLinkNone' => 'Contact link none', + 'object_contactLinkHasPhone' => 'Contact link has phone', + 'object_contactLinkContact' => 'Contact link contact', + 'object_webPageEmpty' => 'Empty web page', + 'object_webPageEmpty_param_id_type_long' => 'ID', + 'object_webPagePending' => 'Web page pending', + 'object_webPagePending_param_id_type_long' => 'ID', + 'object_webPagePending_param_date_type_int' => 'Date', + 'object_webPage' => 'Web page', + 'object_webPage_param_id_type_long' => 'ID', + 'object_webPage_param_url_type_string' => 'URL', + 'object_webPage_param_display_url_type_string' => 'Display URL', + 'object_webPage_param_hash_type_int' => 'Hash', + 'object_webPage_param_type_type_string' => 'Type', + 'object_webPage_param_site_name_type_string' => 'Site name', + 'object_webPage_param_title_type_string' => 'Title', + 'object_webPage_param_description_type_string' => 'Description', + 'object_webPage_param_photo_type_Photo' => 'Photo', + 'object_webPage_param_embed_url_type_string' => 'Embed URL', + 'object_webPage_param_embed_type_type_string' => 'Embed type', + 'object_webPage_param_embed_width_type_int' => 'Embed width', + 'object_webPage_param_embed_height_type_int' => 'Embed height', + 'object_webPage_param_duration_type_int' => 'Duration', + 'object_webPage_param_author_type_string' => 'Author', + 'object_webPage_param_document_type_Document' => 'Document', + 'object_webPage_param_cached_page_type_Page' => 'Cached page', + 'object_webPageNotModified' => 'Web page not modified', + 'object_authorization' => 'Authorization', + 'object_authorization_param_hash_type_long' => 'Hash', + 'object_authorization_param_device_model_type_string' => 'Device model', + 'object_authorization_param_platform_type_string' => 'Platform', + 'object_authorization_param_system_version_type_string' => 'System version', + 'object_authorization_param_api_id_type_int' => 'Api ID', + 'object_authorization_param_app_name_type_string' => 'App name', + 'object_authorization_param_app_version_type_string' => 'App version', + 'object_authorization_param_date_created_type_int' => 'Date created', + 'object_authorization_param_date_active_type_int' => 'Date active', + 'object_authorization_param_ip_type_string' => 'Ip', + 'object_authorization_param_country_type_string' => 'Country', + 'object_authorization_param_region_type_string' => 'Region', + 'object_account.authorizations' => 'Authorized clients for this account', + 'object_account.authorizations_param_authorizations_type_Vector t' => 'Authorizations', + 'object_account.noPassword' => 'No password', + 'object_account.noPassword_param_new_salt_type_bytes' => 'New salt', + 'object_account.noPassword_param_email_unconfirmed_pattern_type_string' => 'Email unconfirmed pattern', + 'object_account.password' => 'Password', + 'object_account.password_param_current_salt_type_bytes' => 'Current salt', + 'object_account.password_param_new_salt_type_bytes' => 'New salt', + 'object_account.password_param_hint_type_string' => 'Hint', + 'object_account.password_param_has_recovery_type_Bool' => 'Has recovery?', + 'object_account.password_param_email_unconfirmed_pattern_type_string' => 'Email unconfirmed pattern', + 'object_account.passwordSettings' => 'Password settings', + 'object_account.passwordSettings_param_email_type_string' => 'Email', 'object_account.passwordInputSettings' => '2FA password settings', 'object_account.passwordInputSettings_param_new_salt_type_bytes' => '`$new_salt = $MadelineProto->account->getPassword()[\'new_salt\'].$MadelineProto->random(8);`', 'object_account.passwordInputSettings_param_new_password_hash_type_bytes' => '`hash(\'sha256\', $new_salt.$new_password.$new_salt, true)`', - 'object_account.passwordInputSettings_param_hint_type_string' => '', - 'object_account.passwordInputSettings_param_email_type_string' => '', - 'object_auth.passwordRecovery' => '', - 'object_auth.passwordRecovery_param_email_pattern_type_string' => '', - 'object_receivedNotifyMessage' => '', - 'object_receivedNotifyMessage_param_id_type_int' => '', - 'object_chatInviteEmpty' => '', - 'object_chatInviteExported' => '', - 'object_chatInviteExported_param_link_type_string' => '', - 'object_chatInviteAlready' => '', - 'object_chatInviteAlready_param_chat_type_Chat' => '', - 'object_chatInvite' => '', - 'object_chatInvite_param_channel_type_true' => '', - 'object_chatInvite_param_broadcast_type_true' => '', - 'object_chatInvite_param_public_type_true' => '', - 'object_chatInvite_param_megagroup_type_true' => '', - 'object_chatInvite_param_title_type_string' => '', - 'object_chatInvite_param_photo_type_ChatPhoto' => '', - 'object_chatInvite_param_participants_count_type_int' => '', - 'object_chatInvite_param_participants_type_Vector t' => '', - 'object_inputStickerSetEmpty' => '', - 'object_inputStickerSetID' => '', - 'object_inputStickerSetID_param_id_type_long' => '', - 'object_inputStickerSetID_param_access_hash_type_long' => '', - 'object_inputStickerSetShortName' => '', - 'object_inputStickerSetShortName_param_short_name_type_string' => '', - 'object_stickerSet' => '', - 'object_stickerSet_param_installed_type_true' => '', - 'object_stickerSet_param_archived_type_true' => '', - 'object_stickerSet_param_official_type_true' => '', - 'object_stickerSet_param_masks_type_true' => '', - 'object_stickerSet_param_id_type_long' => '', - 'object_stickerSet_param_access_hash_type_long' => '', - 'object_stickerSet_param_title_type_string' => '', - 'object_stickerSet_param_short_name_type_string' => '', - 'object_stickerSet_param_count_type_int' => '', - 'object_stickerSet_param_hash_type_int' => '', - 'object_messages.stickerSet' => '', - 'object_messages.stickerSet_param_set_type_StickerSet' => '', - 'object_messages.stickerSet_param_packs_type_Vector t' => '', - 'object_messages.stickerSet_param_documents_type_Vector t' => '', - 'object_botInfo' => '', - 'object_botInfo_param_user_id_type_int' => '', - 'object_botInfo_param_description_type_string' => '', - 'object_botInfo_param_commands_type_Vector t' => '', - 'object_keyboardButton' => '', - 'object_keyboardButton_param_text_type_string' => '', - 'object_keyboardButtonUrl' => '', - 'object_keyboardButtonUrl_param_text_type_string' => '', - 'object_keyboardButtonUrl_param_url_type_string' => '', - 'object_keyboardButtonCallback' => '', - 'object_keyboardButtonCallback_param_text_type_string' => '', - 'object_keyboardButtonCallback_param_data_type_bytes' => '', - 'object_keyboardButtonRequestPhone' => '', - 'object_keyboardButtonRequestPhone_param_text_type_string' => '', - 'object_keyboardButtonRequestGeoLocation' => '', - 'object_keyboardButtonRequestGeoLocation_param_text_type_string' => '', - 'object_keyboardButtonSwitchInline' => '', - 'object_keyboardButtonSwitchInline_param_same_peer_type_true' => '', - 'object_keyboardButtonSwitchInline_param_text_type_string' => '', - 'object_keyboardButtonSwitchInline_param_query_type_string' => '', - 'object_keyboardButtonGame' => '', - 'object_keyboardButtonGame_param_text_type_string' => '', - 'object_keyboardButtonBuy' => '', - 'object_keyboardButtonBuy_param_text_type_string' => '', - 'object_keyboardButtonRow' => '', - 'object_keyboardButtonRow_param_buttons_type_Vector t' => '', - 'object_replyKeyboardHide' => '', - 'object_replyKeyboardHide_param_selective_type_true' => '', - 'object_replyKeyboardForceReply' => '', - 'object_replyKeyboardForceReply_param_single_use_type_true' => '', - 'object_replyKeyboardForceReply_param_selective_type_true' => '', - 'object_replyKeyboardMarkup' => '', - 'object_replyKeyboardMarkup_param_resize_type_true' => '', - 'object_replyKeyboardMarkup_param_single_use_type_true' => '', - 'object_replyKeyboardMarkup_param_selective_type_true' => '', - 'object_replyKeyboardMarkup_param_rows_type_Vector t' => '', - 'object_replyInlineMarkup' => '', - 'object_replyInlineMarkup_param_rows_type_Vector t' => '', - 'object_messageEntityUnknown' => '', - 'object_messageEntityUnknown_param_offset_type_int' => '', - 'object_messageEntityUnknown_param_length_type_int' => '', - 'object_messageEntityMention' => '', - 'object_messageEntityMention_param_offset_type_int' => '', - 'object_messageEntityMention_param_length_type_int' => '', - 'object_messageEntityHashtag' => '', - 'object_messageEntityHashtag_param_offset_type_int' => '', - 'object_messageEntityHashtag_param_length_type_int' => '', - 'object_messageEntityBotCommand' => '', - 'object_messageEntityBotCommand_param_offset_type_int' => '', - 'object_messageEntityBotCommand_param_length_type_int' => '', - 'object_messageEntityUrl' => '', - 'object_messageEntityUrl_param_offset_type_int' => '', - 'object_messageEntityUrl_param_length_type_int' => '', - 'object_messageEntityEmail' => '', - 'object_messageEntityEmail_param_offset_type_int' => '', - 'object_messageEntityEmail_param_length_type_int' => '', - 'object_messageEntityBold' => '', - 'object_messageEntityBold_param_offset_type_int' => '', - 'object_messageEntityBold_param_length_type_int' => '', - 'object_messageEntityItalic' => '', - 'object_messageEntityItalic_param_offset_type_int' => '', - 'object_messageEntityItalic_param_length_type_int' => '', - 'object_messageEntityCode' => '', - 'object_messageEntityCode_param_offset_type_int' => '', - 'object_messageEntityCode_param_length_type_int' => '', - 'object_messageEntityPre' => '', - 'object_messageEntityPre_param_offset_type_int' => '', - 'object_messageEntityPre_param_length_type_int' => '', - 'object_messageEntityPre_param_language_type_string' => '', - 'object_messageEntityTextUrl' => '', - 'object_messageEntityTextUrl_param_offset_type_int' => '', - 'object_messageEntityTextUrl_param_length_type_int' => '', - 'object_messageEntityTextUrl_param_url_type_string' => '', - 'object_messageEntityMentionName' => '', - 'object_messageEntityMentionName_param_offset_type_int' => '', - 'object_messageEntityMentionName_param_length_type_int' => '', - 'object_messageEntityMentionName_param_user_id_type_int' => '', - 'object_inputMessageEntityMentionName' => '', - 'object_inputMessageEntityMentionName_param_offset_type_int' => '', - 'object_inputMessageEntityMentionName_param_length_type_int' => '', - 'object_inputMessageEntityMentionName_param_user_id_type_InputUser' => '', - 'object_inputChannelEmpty' => '', - 'object_inputChannel' => '', - 'object_inputChannel_param_channel_id_type_int' => '', - 'object_inputChannel_param_access_hash_type_long' => '', - 'object_contacts.resolvedPeer' => '', - 'object_contacts.resolvedPeer_param_peer_type_Peer' => '', - 'object_contacts.resolvedPeer_param_chats_type_Vector t' => '', - 'object_contacts.resolvedPeer_param_users_type_Vector t' => '', - 'object_messageRange' => '', - 'object_messageRange_param_min_id_type_int' => '', - 'object_messageRange_param_max_id_type_int' => '', - 'object_updates.channelDifferenceEmpty' => '', - 'object_updates.channelDifferenceEmpty_param_final_type_true' => '', - 'object_updates.channelDifferenceEmpty_param_pts_type_int' => '', - 'object_updates.channelDifferenceEmpty_param_timeout_type_int' => '', - 'object_updates.channelDifferenceTooLong' => '', - 'object_updates.channelDifferenceTooLong_param_final_type_true' => '', - 'object_updates.channelDifferenceTooLong_param_pts_type_int' => '', - 'object_updates.channelDifferenceTooLong_param_timeout_type_int' => '', - 'object_updates.channelDifferenceTooLong_param_top_message_type_int' => '', - 'object_updates.channelDifferenceTooLong_param_read_inbox_max_id_type_int' => '', - 'object_updates.channelDifferenceTooLong_param_read_outbox_max_id_type_int' => '', - 'object_updates.channelDifferenceTooLong_param_unread_count_type_int' => '', - 'object_updates.channelDifferenceTooLong_param_unread_mentions_count_type_int' => '', - 'object_updates.channelDifferenceTooLong_param_messages_type_Vector t' => '', - 'object_updates.channelDifferenceTooLong_param_chats_type_Vector t' => '', - 'object_updates.channelDifferenceTooLong_param_users_type_Vector t' => '', - 'object_updates.channelDifference' => '', - 'object_updates.channelDifference_param_final_type_true' => '', - 'object_updates.channelDifference_param_pts_type_int' => '', - 'object_updates.channelDifference_param_timeout_type_int' => '', - 'object_updates.channelDifference_param_new_messages_type_Vector t' => '', - 'object_updates.channelDifference_param_other_updates_type_Vector t' => '', - 'object_updates.channelDifference_param_chats_type_Vector t' => '', - 'object_updates.channelDifference_param_users_type_Vector t' => '', - 'object_channelMessagesFilterEmpty' => '', - 'object_channelMessagesFilter' => '', - 'object_channelMessagesFilter_param_exclude_new_messages_type_true' => '', - 'object_channelMessagesFilter_param_ranges_type_Vector t' => '', - 'object_channelParticipant' => '', - 'object_channelParticipant_param_user_id_type_int' => '', - 'object_channelParticipant_param_date_type_int' => '', - 'object_channelParticipantSelf' => '', - 'object_channelParticipantSelf_param_user_id_type_int' => '', - 'object_channelParticipantSelf_param_inviter_id_type_int' => '', - 'object_channelParticipantSelf_param_date_type_int' => '', - 'object_channelParticipantCreator' => '', - 'object_channelParticipantCreator_param_user_id_type_int' => '', - 'object_channelParticipantAdmin' => '', - 'object_channelParticipantAdmin_param_can_edit_type_true' => '', - 'object_channelParticipantAdmin_param_user_id_type_int' => '', - 'object_channelParticipantAdmin_param_inviter_id_type_int' => '', - 'object_channelParticipantAdmin_param_promoted_by_type_int' => '', - 'object_channelParticipantAdmin_param_date_type_int' => '', - 'object_channelParticipantAdmin_param_admin_rights_type_ChannelAdminRights' => '', - 'object_channelParticipantBanned' => '', - 'object_channelParticipantBanned_param_left_type_true' => '', - 'object_channelParticipantBanned_param_user_id_type_int' => '', - 'object_channelParticipantBanned_param_kicked_by_type_int' => '', - 'object_channelParticipantBanned_param_date_type_int' => '', - 'object_channelParticipantBanned_param_banned_rights_type_ChannelBannedRights' => '', - 'object_channelParticipantsRecent' => '', - 'object_channelParticipantsAdmins' => '', - 'object_channelParticipantsKicked' => '', - 'object_channelParticipantsKicked_param_q_type_string' => '', - 'object_channelParticipantsBots' => '', - 'object_channelParticipantsBanned' => '', - 'object_channelParticipantsBanned_param_q_type_string' => '', - 'object_channelParticipantsSearch' => '', - 'object_channelParticipantsSearch_param_q_type_string' => '', - 'object_channels.channelParticipants' => '', - 'object_channels.channelParticipants_param_count_type_int' => '', - 'object_channels.channelParticipants_param_participants_type_Vector t' => '', - 'object_channels.channelParticipants_param_users_type_Vector t' => '', - 'object_channels.channelParticipantsNotModified' => '', - 'object_channels.channelParticipant' => '', - 'object_channels.channelParticipant_param_participant_type_ChannelParticipant' => '', - 'object_channels.channelParticipant_param_users_type_Vector t' => '', - 'object_help.termsOfService' => '', - 'object_help.termsOfService_param_text_type_string' => '', - 'object_foundGif' => '', - 'object_foundGif_param_url_type_string' => '', - 'object_foundGif_param_thumb_url_type_string' => '', - 'object_foundGif_param_content_url_type_string' => '', - 'object_foundGif_param_content_type_type_string' => '', - 'object_foundGif_param_w_type_int' => '', - 'object_foundGif_param_h_type_int' => '', - 'object_foundGifCached' => '', - 'object_foundGifCached_param_url_type_string' => '', - 'object_foundGifCached_param_photo_type_Photo' => '', - 'object_foundGifCached_param_document_type_Document' => '', - 'object_messages.foundGifs' => '', - 'object_messages.foundGifs_param_next_offset_type_int' => '', - 'object_messages.foundGifs_param_results_type_Vector t' => '', - 'object_messages.savedGifsNotModified' => '', - 'object_messages.savedGifs' => '', - 'object_messages.savedGifs_param_hash_type_int' => '', - 'object_messages.savedGifs_param_gifs_type_Vector t' => '', - 'object_inputBotInlineMessageMediaAuto' => '', - 'object_inputBotInlineMessageMediaAuto_param_message_type_string' => '', - 'object_inputBotInlineMessageMediaAuto_param_entities_type_Vector t' => '', - 'object_inputBotInlineMessageMediaAuto_param_reply_markup_type_ReplyMarkup' => '', - 'object_inputBotInlineMessageText' => '', - 'object_inputBotInlineMessageText_param_no_webpage_type_true' => '', - 'object_inputBotInlineMessageText_param_message_type_string' => '', - 'object_inputBotInlineMessageText_param_entities_type_Vector t' => '', - 'object_inputBotInlineMessageText_param_reply_markup_type_ReplyMarkup' => '', - 'object_inputBotInlineMessageMediaGeo' => '', - 'object_inputBotInlineMessageMediaGeo_param_geo_point_type_InputGeoPoint' => '', - 'object_inputBotInlineMessageMediaGeo_param_period_type_int' => '', - 'object_inputBotInlineMessageMediaGeo_param_reply_markup_type_ReplyMarkup' => '', - 'object_inputBotInlineMessageMediaVenue' => '', - 'object_inputBotInlineMessageMediaVenue_param_geo_point_type_InputGeoPoint' => '', - 'object_inputBotInlineMessageMediaVenue_param_title_type_string' => '', - 'object_inputBotInlineMessageMediaVenue_param_address_type_string' => '', - 'object_inputBotInlineMessageMediaVenue_param_provider_type_string' => '', - 'object_inputBotInlineMessageMediaVenue_param_venue_id_type_string' => '', - 'object_inputBotInlineMessageMediaVenue_param_reply_markup_type_ReplyMarkup' => '', - 'object_inputBotInlineMessageMediaContact' => '', - 'object_inputBotInlineMessageMediaContact_param_phone_number_type_string' => '', - 'object_inputBotInlineMessageMediaContact_param_first_name_type_string' => '', - 'object_inputBotInlineMessageMediaContact_param_last_name_type_string' => '', - 'object_inputBotInlineMessageMediaContact_param_reply_markup_type_ReplyMarkup' => '', - 'object_inputBotInlineMessageGame' => '', - 'object_inputBotInlineMessageGame_param_reply_markup_type_ReplyMarkup' => '', - 'object_inputBotInlineResult' => '', - 'object_inputBotInlineResult_param_id_type_string' => '', - 'object_inputBotInlineResult_param_type_type_string' => '', - 'object_inputBotInlineResult_param_title_type_string' => '', - 'object_inputBotInlineResult_param_description_type_string' => '', - 'object_inputBotInlineResult_param_url_type_string' => '', - 'object_inputBotInlineResult_param_thumb_url_type_string' => '', - 'object_inputBotInlineResult_param_content_url_type_string' => '', - 'object_inputBotInlineResult_param_content_type_type_string' => '', - 'object_inputBotInlineResult_param_w_type_int' => '', - 'object_inputBotInlineResult_param_h_type_int' => '', - 'object_inputBotInlineResult_param_duration_type_int' => '', - 'object_inputBotInlineResult_param_send_message_type_InputBotInlineMessage' => '', - 'object_inputBotInlineResultPhoto' => '', - 'object_inputBotInlineResultPhoto_param_id_type_string' => '', - 'object_inputBotInlineResultPhoto_param_type_type_string' => '', - 'object_inputBotInlineResultPhoto_param_photo_type_InputPhoto' => '', - 'object_inputBotInlineResultPhoto_param_send_message_type_InputBotInlineMessage' => '', - 'object_inputBotInlineResultDocument' => '', - 'object_inputBotInlineResultDocument_param_id_type_string' => '', - 'object_inputBotInlineResultDocument_param_type_type_string' => '', - 'object_inputBotInlineResultDocument_param_title_type_string' => '', - 'object_inputBotInlineResultDocument_param_description_type_string' => '', - 'object_inputBotInlineResultDocument_param_document_type_InputDocument' => '', - 'object_inputBotInlineResultDocument_param_send_message_type_InputBotInlineMessage' => '', - 'object_inputBotInlineResultGame' => '', - 'object_inputBotInlineResultGame_param_id_type_string' => '', - 'object_inputBotInlineResultGame_param_short_name_type_string' => '', - 'object_inputBotInlineResultGame_param_send_message_type_InputBotInlineMessage' => '', - 'object_botInlineMessageMediaAuto' => '', - 'object_botInlineMessageMediaAuto_param_message_type_string' => '', - 'object_botInlineMessageMediaAuto_param_entities_type_Vector t' => '', - 'object_botInlineMessageMediaAuto_param_reply_markup_type_ReplyMarkup' => '', - 'object_botInlineMessageText' => '', - 'object_botInlineMessageText_param_no_webpage_type_true' => '', - 'object_botInlineMessageText_param_message_type_string' => '', - 'object_botInlineMessageText_param_entities_type_Vector t' => '', - 'object_botInlineMessageText_param_reply_markup_type_ReplyMarkup' => '', - 'object_botInlineMessageMediaGeo' => '', - 'object_botInlineMessageMediaGeo_param_geo_type_GeoPoint' => '', - 'object_botInlineMessageMediaGeo_param_period_type_int' => '', - 'object_botInlineMessageMediaGeo_param_reply_markup_type_ReplyMarkup' => '', - 'object_botInlineMessageMediaVenue' => '', - 'object_botInlineMessageMediaVenue_param_geo_type_GeoPoint' => '', - 'object_botInlineMessageMediaVenue_param_title_type_string' => '', - 'object_botInlineMessageMediaVenue_param_address_type_string' => '', - 'object_botInlineMessageMediaVenue_param_provider_type_string' => '', - 'object_botInlineMessageMediaVenue_param_venue_id_type_string' => '', - 'object_botInlineMessageMediaVenue_param_reply_markup_type_ReplyMarkup' => '', - 'object_botInlineMessageMediaContact' => '', - 'object_botInlineMessageMediaContact_param_phone_number_type_string' => '', - 'object_botInlineMessageMediaContact_param_first_name_type_string' => '', - 'object_botInlineMessageMediaContact_param_last_name_type_string' => '', - 'object_botInlineMessageMediaContact_param_reply_markup_type_ReplyMarkup' => '', - 'object_botInlineResult' => '', - 'object_botInlineResult_param_id_type_string' => '', - 'object_botInlineResult_param_type_type_string' => '', - 'object_botInlineResult_param_title_type_string' => '', - 'object_botInlineResult_param_description_type_string' => '', - 'object_botInlineResult_param_url_type_string' => '', - 'object_botInlineResult_param_thumb_url_type_string' => '', - 'object_botInlineResult_param_content_url_type_string' => '', - 'object_botInlineResult_param_content_type_type_string' => '', - 'object_botInlineResult_param_w_type_int' => '', - 'object_botInlineResult_param_h_type_int' => '', - 'object_botInlineResult_param_duration_type_int' => '', - 'object_botInlineResult_param_send_message_type_BotInlineMessage' => '', - 'object_botInlineMediaResult' => '', - 'object_botInlineMediaResult_param_id_type_string' => '', - 'object_botInlineMediaResult_param_type_type_string' => '', - 'object_botInlineMediaResult_param_photo_type_Photo' => '', - 'object_botInlineMediaResult_param_document_type_Document' => '', - 'object_botInlineMediaResult_param_title_type_string' => '', - 'object_botInlineMediaResult_param_description_type_string' => '', - 'object_botInlineMediaResult_param_send_message_type_BotInlineMessage' => '', - 'object_messages.botResults' => '', - 'object_messages.botResults_param_gallery_type_true' => '', - 'object_messages.botResults_param_query_id_type_long' => '', - 'object_messages.botResults_param_next_offset_type_string' => '', - 'object_messages.botResults_param_switch_pm_type_InlineBotSwitchPM' => '', - 'object_messages.botResults_param_results_type_Vector t' => '', - 'object_messages.botResults_param_cache_time_type_int' => '', - 'object_messages.botResults_param_users_type_Vector t' => '', - 'object_exportedMessageLink' => '', - 'object_exportedMessageLink_param_link_type_string' => '', - 'object_exportedMessageLink_param_html_type_string' => '', - 'object_messageFwdHeader' => '', - 'object_messageFwdHeader_param_from_id_type_int' => '', - 'object_messageFwdHeader_param_date_type_int' => '', - 'object_messageFwdHeader_param_channel_id_type_int' => '', - 'object_messageFwdHeader_param_channel_post_type_int' => '', - 'object_messageFwdHeader_param_post_author_type_string' => '', - 'object_messageFwdHeader_param_saved_from_peer_type_Peer' => '', - 'object_messageFwdHeader_param_saved_from_msg_id_type_int' => '', - 'object_auth.codeTypeSms' => '', - 'object_auth.codeTypeCall' => '', - 'object_auth.codeTypeFlashCall' => '', - 'object_auth.sentCodeTypeApp' => '', - 'object_auth.sentCodeTypeApp_param_length_type_int' => '', - 'object_auth.sentCodeTypeSms' => '', - 'object_auth.sentCodeTypeSms_param_length_type_int' => '', - 'object_auth.sentCodeTypeCall' => '', - 'object_auth.sentCodeTypeCall_param_length_type_int' => '', - 'object_auth.sentCodeTypeFlashCall' => '', - 'object_auth.sentCodeTypeFlashCall_param_pattern_type_string' => '', - 'object_messages.botCallbackAnswer' => '', - 'object_messages.botCallbackAnswer_param_alert_type_true' => '', - 'object_messages.botCallbackAnswer_param_has_url_type_true' => '', - 'object_messages.botCallbackAnswer_param_native_ui_type_true' => '', - 'object_messages.botCallbackAnswer_param_message_type_string' => '', - 'object_messages.botCallbackAnswer_param_url_type_string' => '', - 'object_messages.botCallbackAnswer_param_cache_time_type_int' => '', - 'object_messages.messageEditData' => '', - 'object_messages.messageEditData_param_caption_type_true' => '', - 'object_inputBotInlineMessageID' => '', - 'object_inputBotInlineMessageID_param_dc_id_type_int' => '', - 'object_inputBotInlineMessageID_param_id_type_long' => '', - 'object_inputBotInlineMessageID_param_access_hash_type_long' => '', - 'object_inlineBotSwitchPM' => '', - 'object_inlineBotSwitchPM_param_text_type_string' => '', - 'object_inlineBotSwitchPM_param_start_param_type_string' => '', - 'object_messages.peerDialogs' => '', - 'object_messages.peerDialogs_param_dialogs_type_Vector t' => '', - 'object_messages.peerDialogs_param_messages_type_Vector t' => '', - 'object_messages.peerDialogs_param_chats_type_Vector t' => '', - 'object_messages.peerDialogs_param_users_type_Vector t' => '', - 'object_messages.peerDialogs_param_state_type_updates.State' => '', - 'object_topPeer' => '', - 'object_topPeer_param_peer_type_Peer' => '', - 'object_topPeer_param_rating_type_double' => '', - 'object_topPeerCategoryBotsPM' => '', - 'object_topPeerCategoryBotsInline' => '', - 'object_topPeerCategoryCorrespondents' => '', - 'object_topPeerCategoryGroups' => '', - 'object_topPeerCategoryChannels' => '', - 'object_topPeerCategoryPhoneCalls' => '', - 'object_topPeerCategoryPeers' => '', - 'object_topPeerCategoryPeers_param_category_type_TopPeerCategory' => '', - 'object_topPeerCategoryPeers_param_count_type_int' => '', - 'object_topPeerCategoryPeers_param_peers_type_Vector t' => '', - 'object_contacts.topPeersNotModified' => '', - 'object_contacts.topPeers' => '', - 'object_contacts.topPeers_param_categories_type_Vector t' => '', - 'object_contacts.topPeers_param_chats_type_Vector t' => '', - 'object_contacts.topPeers_param_users_type_Vector t' => '', - 'object_draftMessageEmpty' => '', - 'object_draftMessage' => '', - 'object_draftMessage_param_no_webpage_type_true' => '', - 'object_draftMessage_param_reply_to_msg_id_type_int' => '', - 'object_draftMessage_param_message_type_string' => '', - 'object_draftMessage_param_entities_type_Vector t' => '', - 'object_draftMessage_param_date_type_int' => '', - 'object_messages.featuredStickersNotModified' => '', - 'object_messages.featuredStickers' => '', - 'object_messages.featuredStickers_param_hash_type_int' => '', - 'object_messages.featuredStickers_param_sets_type_Vector t' => '', - 'object_messages.featuredStickers_param_unread_type_Vector t' => '', - 'object_messages.recentStickersNotModified' => '', - 'object_messages.recentStickers' => '', - 'object_messages.recentStickers_param_hash_type_int' => '', - 'object_messages.recentStickers_param_stickers_type_Vector t' => '', - 'object_messages.archivedStickers' => '', - 'object_messages.archivedStickers_param_count_type_int' => '', - 'object_messages.archivedStickers_param_sets_type_Vector t' => '', - 'object_messages.stickerSetInstallResultSuccess' => '', - 'object_messages.stickerSetInstallResultArchive' => '', - 'object_messages.stickerSetInstallResultArchive_param_sets_type_Vector t' => '', - 'object_stickerSetCovered' => '', - 'object_stickerSetCovered_param_set_type_StickerSet' => '', - 'object_stickerSetCovered_param_cover_type_Document' => '', - 'object_stickerSetMultiCovered' => '', - 'object_stickerSetMultiCovered_param_set_type_StickerSet' => '', - 'object_stickerSetMultiCovered_param_covers_type_Vector t' => '', - 'object_maskCoords' => '', - 'object_maskCoords_param_n_type_int' => '', - 'object_maskCoords_param_x_type_double' => '', - 'object_maskCoords_param_y_type_double' => '', - 'object_maskCoords_param_zoom_type_double' => '', - 'object_inputStickeredMediaPhoto' => '', - 'object_inputStickeredMediaPhoto_param_id_type_InputPhoto' => '', - 'object_inputStickeredMediaDocument' => '', - 'object_inputStickeredMediaDocument_param_id_type_InputDocument' => '', - 'object_game' => '', - 'object_game_param_id_type_long' => '', - 'object_game_param_access_hash_type_long' => '', - 'object_game_param_short_name_type_string' => '', - 'object_game_param_title_type_string' => '', - 'object_game_param_description_type_string' => '', - 'object_game_param_photo_type_Photo' => '', - 'object_game_param_document_type_Document' => '', - 'object_inputGameID' => '', - 'object_inputGameID_param_id_type_long' => '', - 'object_inputGameID_param_access_hash_type_long' => '', - 'object_inputGameShortName' => '', - 'object_inputGameShortName_param_bot_id_type_InputUser' => '', - 'object_inputGameShortName_param_short_name_type_string' => '', - 'object_highScore' => '', - 'object_highScore_param_pos_type_int' => '', - 'object_highScore_param_user_id_type_int' => '', - 'object_highScore_param_score_type_int' => '', - 'object_messages.highScores' => '', - 'object_messages.highScores_param_scores_type_Vector t' => '', - 'object_messages.highScores_param_users_type_Vector t' => '', - 'object_textEmpty' => '', - 'object_textPlain' => '', - 'object_textPlain_param_text_type_string' => '', - 'object_textBold' => '', - 'object_textBold_param_text_type_RichText' => '', - 'object_textItalic' => '', - 'object_textItalic_param_text_type_RichText' => '', - 'object_textUnderline' => '', - 'object_textUnderline_param_text_type_RichText' => '', - 'object_textStrike' => '', - 'object_textStrike_param_text_type_RichText' => '', - 'object_textFixed' => '', - 'object_textFixed_param_text_type_RichText' => '', - 'object_textUrl' => '', - 'object_textUrl_param_text_type_RichText' => '', - 'object_textUrl_param_url_type_string' => '', - 'object_textUrl_param_webpage_id_type_long' => '', - 'object_textEmail' => '', - 'object_textEmail_param_text_type_RichText' => '', - 'object_textEmail_param_email_type_string' => '', - 'object_textConcat' => '', - 'object_textConcat_param_texts_type_Vector t' => '', - 'object_pageBlockUnsupported' => '', - 'object_pageBlockTitle' => '', - 'object_pageBlockTitle_param_text_type_RichText' => '', - 'object_pageBlockSubtitle' => '', - 'object_pageBlockSubtitle_param_text_type_RichText' => '', - 'object_pageBlockAuthorDate' => '', - 'object_pageBlockAuthorDate_param_author_type_RichText' => '', - 'object_pageBlockAuthorDate_param_published_date_type_int' => '', - 'object_pageBlockHeader' => '', - 'object_pageBlockHeader_param_text_type_RichText' => '', - 'object_pageBlockSubheader' => '', - 'object_pageBlockSubheader_param_text_type_RichText' => '', - 'object_pageBlockFooter' => '', - 'object_pageBlockFooter_param_text_type_RichText' => '', - 'object_pageBlockList' => '', - 'object_pageBlockList_param_ordered_type_Bool' => '', - 'object_pageBlockList_param_items_type_Vector t' => '', - 'object_pageBlockBlockquote' => '', - 'object_pageBlockBlockquote_param_text_type_RichText' => '', - 'object_pageBlockBlockquote_param_caption_type_RichText' => '', - 'object_pageBlockPullquote' => '', - 'object_pageBlockPullquote_param_text_type_RichText' => '', - 'object_pageBlockPullquote_param_caption_type_RichText' => '', - 'object_pageBlockPhoto' => '', - 'object_pageBlockPhoto_param_photo_id_type_long' => '', - 'object_pageBlockPhoto_param_caption_type_RichText' => '', - 'object_pageBlockVideo' => '', - 'object_pageBlockVideo_param_autoplay_type_true' => '', - 'object_pageBlockVideo_param_loop_type_true' => '', - 'object_pageBlockVideo_param_video_id_type_long' => '', - 'object_pageBlockVideo_param_caption_type_RichText' => '', - 'object_pageBlockEmbed' => '', - 'object_pageBlockEmbed_param_full_width_type_true' => '', - 'object_pageBlockEmbed_param_allow_scrolling_type_true' => '', - 'object_pageBlockEmbed_param_url_type_string' => '', - 'object_pageBlockEmbed_param_html_type_string' => '', - 'object_pageBlockEmbed_param_poster_photo_id_type_long' => '', - 'object_pageBlockEmbed_param_w_type_int' => '', - 'object_pageBlockEmbed_param_h_type_int' => '', - 'object_pageBlockEmbed_param_caption_type_RichText' => '', - 'object_pageBlockEmbedPost' => '', - 'object_pageBlockEmbedPost_param_url_type_string' => '', - 'object_pageBlockEmbedPost_param_webpage_id_type_long' => '', - 'object_pageBlockEmbedPost_param_author_photo_id_type_long' => '', - 'object_pageBlockEmbedPost_param_author_type_string' => '', - 'object_pageBlockEmbedPost_param_date_type_int' => '', - 'object_pageBlockEmbedPost_param_blocks_type_Vector t' => '', - 'object_pageBlockEmbedPost_param_caption_type_RichText' => '', - 'object_pageBlockCollage' => '', - 'object_pageBlockCollage_param_items_type_Vector t' => '', - 'object_pageBlockCollage_param_caption_type_RichText' => '', - 'object_pageBlockSlideshow' => '', - 'object_pageBlockSlideshow_param_items_type_Vector t' => '', - 'object_pageBlockSlideshow_param_caption_type_RichText' => '', - 'object_pageBlockChannel' => '', - 'object_pageBlockChannel_param_channel_type_Chat' => '', - 'object_pageBlockAudio' => '', - 'object_pageBlockAudio_param_audio_id_type_long' => '', - 'object_pageBlockAudio_param_caption_type_RichText' => '', - 'object_pagePart' => '', - 'object_pagePart_param_blocks_type_Vector t' => '', - 'object_pagePart_param_photos_type_Vector t' => '', - 'object_pagePart_param_documents_type_Vector t' => '', - 'object_pageFull' => '', - 'object_pageFull_param_blocks_type_Vector t' => '', - 'object_pageFull_param_photos_type_Vector t' => '', - 'object_pageFull_param_documents_type_Vector t' => '', - 'object_phoneCallDiscardReasonMissed' => '', - 'object_phoneCallDiscardReasonDisconnect' => '', - 'object_phoneCallDiscardReasonHangup' => '', - 'object_phoneCallDiscardReasonBusy' => '', - 'object_dataJSON' => '', - 'object_dataJSON_param_data_type_string' => '', - 'object_labeledPrice' => '', - 'object_labeledPrice_param_label_type_string' => '', - 'object_labeledPrice_param_amount_type_long' => '', - 'object_invoice' => '', - 'object_invoice_param_test_type_true' => '', - 'object_invoice_param_name_requested_type_true' => '', - 'object_invoice_param_phone_requested_type_true' => '', - 'object_invoice_param_email_requested_type_true' => '', - 'object_invoice_param_shipping_address_requested_type_true' => '', - 'object_invoice_param_flexible_type_true' => '', - 'object_invoice_param_phone_to_provider_type_true' => '', - 'object_invoice_param_email_to_provider_type_true' => '', - 'object_invoice_param_currency_type_string' => '', - 'object_invoice_param_prices_type_Vector t' => '', - 'object_paymentCharge' => '', - 'object_paymentCharge_param_id_type_string' => '', - 'object_paymentCharge_param_provider_charge_id_type_string' => '', - 'object_postAddress' => '', - 'object_postAddress_param_street_line1_type_string' => '', - 'object_postAddress_param_street_line2_type_string' => '', - 'object_postAddress_param_city_type_string' => '', - 'object_postAddress_param_state_type_string' => '', - 'object_postAddress_param_country_iso2_type_string' => '', - 'object_postAddress_param_post_code_type_string' => '', - 'object_paymentRequestedInfo' => '', - 'object_paymentRequestedInfo_param_name_type_string' => '', - 'object_paymentRequestedInfo_param_phone_type_string' => '', - 'object_paymentRequestedInfo_param_email_type_string' => '', - 'object_paymentRequestedInfo_param_shipping_address_type_PostAddress' => '', - 'object_paymentSavedCredentialsCard' => '', - 'object_paymentSavedCredentialsCard_param_id_type_string' => '', - 'object_paymentSavedCredentialsCard_param_title_type_string' => '', - 'object_webDocument' => '', - 'object_webDocument_param_url_type_string' => '', - 'object_webDocument_param_access_hash_type_long' => '', - 'object_webDocument_param_size_type_int' => '', - 'object_webDocument_param_mime_type_type_string' => '', - 'object_webDocument_param_attributes_type_Vector t' => '', - 'object_webDocument_param_dc_id_type_int' => '', - 'object_inputWebDocument' => '', - 'object_inputWebDocument_param_url_type_string' => '', - 'object_inputWebDocument_param_size_type_int' => '', - 'object_inputWebDocument_param_mime_type_type_string' => '', - 'object_inputWebDocument_param_attributes_type_Vector t' => '', - 'object_inputWebFileLocation' => '', - 'object_inputWebFileLocation_param_url_type_string' => '', - 'object_inputWebFileLocation_param_access_hash_type_long' => '', - 'object_upload.webFile' => '', - 'object_upload.webFile_param_size_type_int' => '', - 'object_upload.webFile_param_mime_type_type_string' => '', - 'object_upload.webFile_param_file_type_type_storage.FileType' => '', - 'object_upload.webFile_param_mtime_type_int' => '', - 'object_upload.webFile_param_bytes_type_bytes' => '', - 'object_payments.paymentForm' => '', - 'object_payments.paymentForm_param_can_save_credentials_type_true' => '', - 'object_payments.paymentForm_param_password_missing_type_true' => '', - 'object_payments.paymentForm_param_bot_id_type_int' => '', - 'object_payments.paymentForm_param_invoice_type_Invoice' => '', - 'object_payments.paymentForm_param_provider_id_type_int' => '', - 'object_payments.paymentForm_param_url_type_string' => '', - 'object_payments.paymentForm_param_native_provider_type_string' => '', - 'object_payments.paymentForm_param_native_params_type_DataJSON' => '', - 'object_payments.paymentForm_param_saved_info_type_PaymentRequestedInfo' => '', - 'object_payments.paymentForm_param_saved_credentials_type_PaymentSavedCredentials' => '', - 'object_payments.paymentForm_param_users_type_Vector t' => '', - 'object_payments.validatedRequestedInfo' => '', - 'object_payments.validatedRequestedInfo_param_id_type_string' => '', - 'object_payments.validatedRequestedInfo_param_shipping_options_type_Vector t' => '', - 'object_payments.paymentResult' => '', - 'object_payments.paymentResult_param_updates_type_Updates' => '', - 'object_payments.paymentVerficationNeeded' => '', - 'object_payments.paymentVerficationNeeded_param_url_type_string' => '', - 'object_payments.paymentReceipt' => '', - 'object_payments.paymentReceipt_param_date_type_int' => '', - 'object_payments.paymentReceipt_param_bot_id_type_int' => '', - 'object_payments.paymentReceipt_param_invoice_type_Invoice' => '', - 'object_payments.paymentReceipt_param_provider_id_type_int' => '', - 'object_payments.paymentReceipt_param_info_type_PaymentRequestedInfo' => '', - 'object_payments.paymentReceipt_param_shipping_type_ShippingOption' => '', - 'object_payments.paymentReceipt_param_currency_type_string' => '', - 'object_payments.paymentReceipt_param_total_amount_type_long' => '', - 'object_payments.paymentReceipt_param_credentials_title_type_string' => '', - 'object_payments.paymentReceipt_param_users_type_Vector t' => '', - 'object_payments.savedInfo' => '', - 'object_payments.savedInfo_param_has_saved_credentials_type_true' => '', - 'object_payments.savedInfo_param_saved_info_type_PaymentRequestedInfo' => '', - 'object_inputPaymentCredentialsSaved' => '', - 'object_inputPaymentCredentialsSaved_param_id_type_string' => '', - 'object_inputPaymentCredentialsSaved_param_tmp_password_type_bytes' => '', - 'object_inputPaymentCredentials' => '', - 'object_inputPaymentCredentials_param_save_type_true' => '', - 'object_inputPaymentCredentials_param_data_type_DataJSON' => '', - 'object_inputPaymentCredentialsApplePay' => '', - 'object_inputPaymentCredentialsApplePay_param_payment_data_type_DataJSON' => '', - 'object_inputPaymentCredentialsAndroidPay' => '', - 'object_inputPaymentCredentialsAndroidPay_param_payment_token_type_DataJSON' => '', - 'object_inputPaymentCredentialsAndroidPay_param_google_transaction_id_type_string' => '', - 'object_account.tmpPassword' => '', - 'object_account.tmpPassword_param_tmp_password_type_bytes' => '', - 'object_account.tmpPassword_param_valid_until_type_int' => '', - 'object_shippingOption' => '', - 'object_shippingOption_param_id_type_string' => '', - 'object_shippingOption_param_title_type_string' => '', - 'object_shippingOption_param_prices_type_Vector t' => '', - 'object_inputStickerSetItem' => '', - 'object_inputStickerSetItem_param_document_type_InputDocument' => '', - 'object_inputStickerSetItem_param_emoji_type_string' => '', - 'object_inputStickerSetItem_param_mask_coords_type_MaskCoords' => '', - 'object_inputPhoneCall' => '', - 'object_inputPhoneCall_param_id_type_long' => '', - 'object_inputPhoneCall_param_access_hash_type_long' => '', - 'object_phoneCallEmpty' => '', - 'object_phoneCallEmpty_param_id_type_long' => '', - 'object_phoneCallWaiting' => '', - 'object_phoneCallWaiting_param_id_type_long' => '', - 'object_phoneCallWaiting_param_access_hash_type_long' => '', - 'object_phoneCallWaiting_param_date_type_int' => '', - 'object_phoneCallWaiting_param_admin_id_type_int' => '', - 'object_phoneCallWaiting_param_participant_id_type_int' => '', - 'object_phoneCallWaiting_param_protocol_type_PhoneCallProtocol' => '', - 'object_phoneCallWaiting_param_receive_date_type_int' => '', - 'object_phoneCallRequested' => '', - 'object_phoneCallRequested_param_id_type_long' => '', - 'object_phoneCallRequested_param_access_hash_type_long' => '', - 'object_phoneCallRequested_param_date_type_int' => '', - 'object_phoneCallRequested_param_admin_id_type_int' => '', - 'object_phoneCallRequested_param_participant_id_type_int' => '', - 'object_phoneCallRequested_param_g_a_hash_type_bytes' => '', - 'object_phoneCallRequested_param_protocol_type_PhoneCallProtocol' => '', - 'object_phoneCallAccepted' => '', - 'object_phoneCallAccepted_param_id_type_long' => '', - 'object_phoneCallAccepted_param_access_hash_type_long' => '', - 'object_phoneCallAccepted_param_date_type_int' => '', - 'object_phoneCallAccepted_param_admin_id_type_int' => '', - 'object_phoneCallAccepted_param_participant_id_type_int' => '', - 'object_phoneCallAccepted_param_g_b_type_bytes' => '', - 'object_phoneCallAccepted_param_protocol_type_PhoneCallProtocol' => '', - 'object_phoneCall' => '', - 'object_phoneCall_param_id_type_long' => '', - 'object_phoneCall_param_access_hash_type_long' => '', - 'object_phoneCall_param_date_type_int' => '', - 'object_phoneCall_param_admin_id_type_int' => '', - 'object_phoneCall_param_participant_id_type_int' => '', - 'object_phoneCall_param_g_a_or_b_type_bytes' => '', - 'object_phoneCall_param_key_fingerprint_type_long' => '', - 'object_phoneCall_param_protocol_type_PhoneCallProtocol' => '', - 'object_phoneCall_param_connection_type_PhoneConnection' => '', - 'object_phoneCall_param_alternative_connections_type_Vector t' => '', - 'object_phoneCall_param_start_date_type_int' => '', - 'object_phoneCallDiscarded' => '', - 'object_phoneCallDiscarded_param_need_rating_type_true' => '', - 'object_phoneCallDiscarded_param_need_debug_type_true' => '', - 'object_phoneCallDiscarded_param_id_type_long' => '', - 'object_phoneCallDiscarded_param_reason_type_PhoneCallDiscardReason' => '', - 'object_phoneCallDiscarded_param_duration_type_int' => '', - 'object_phoneConnection' => '', - 'object_phoneConnection_param_id_type_long' => '', - 'object_phoneConnection_param_ip_type_string' => '', - 'object_phoneConnection_param_ipv6_type_string' => '', - 'object_phoneConnection_param_port_type_int' => '', - 'object_phoneConnection_param_peer_tag_type_bytes' => '', - 'object_phoneCallProtocol' => '', - 'object_phoneCallProtocol_param_udp_p2p_type_true' => '', - 'object_phoneCallProtocol_param_udp_reflector_type_true' => '', - 'object_phoneCallProtocol_param_min_layer_type_int' => '', - 'object_phoneCallProtocol_param_max_layer_type_int' => '', - 'object_phone.phoneCall' => '', - 'object_phone.phoneCall_param_phone_call_type_PhoneCall' => '', - 'object_phone.phoneCall_param_users_type_Vector t' => '', - 'object_upload.cdnFileReuploadNeeded' => '', - 'object_upload.cdnFileReuploadNeeded_param_request_token_type_bytes' => '', - 'object_upload.cdnFile' => '', - 'object_upload.cdnFile_param_bytes_type_bytes' => '', - 'object_cdnPublicKey' => '', - 'object_cdnPublicKey_param_dc_id_type_int' => '', - 'object_cdnPublicKey_param_public_key_type_string' => '', - 'object_cdnConfig' => '', - 'object_cdnConfig_param_public_keys_type_Vector t' => '', - 'object_langPackString' => '', - 'object_langPackString_param_key_type_string' => '', - 'object_langPackString_param_value_type_string' => '', - 'object_langPackStringPluralized' => '', - 'object_langPackStringPluralized_param_key_type_string' => '', - 'object_langPackStringPluralized_param_zero_value_type_string' => '', - 'object_langPackStringPluralized_param_one_value_type_string' => '', - 'object_langPackStringPluralized_param_two_value_type_string' => '', - 'object_langPackStringPluralized_param_few_value_type_string' => '', - 'object_langPackStringPluralized_param_many_value_type_string' => '', - 'object_langPackStringPluralized_param_other_value_type_string' => '', - 'object_langPackStringDeleted' => '', - 'object_langPackStringDeleted_param_key_type_string' => '', - 'object_langPackDifference' => '', - 'object_langPackDifference_param_lang_code_type_string' => '', - 'object_langPackDifference_param_from_version_type_int' => '', - 'object_langPackDifference_param_version_type_int' => '', - 'object_langPackDifference_param_strings_type_Vector t' => '', - 'object_langPackLanguage' => '', - 'object_langPackLanguage_param_name_type_string' => '', - 'object_langPackLanguage_param_native_name_type_string' => '', - 'object_langPackLanguage_param_lang_code_type_string' => '', - 'object_channelAdminRights' => '', - 'object_channelAdminRights_param_change_info_type_true' => '', - 'object_channelAdminRights_param_post_messages_type_true' => '', - 'object_channelAdminRights_param_edit_messages_type_true' => '', - 'object_channelAdminRights_param_delete_messages_type_true' => '', - 'object_channelAdminRights_param_ban_users_type_true' => '', - 'object_channelAdminRights_param_invite_users_type_true' => '', - 'object_channelAdminRights_param_invite_link_type_true' => '', - 'object_channelAdminRights_param_pin_messages_type_true' => '', - 'object_channelAdminRights_param_add_admins_type_true' => '', - 'object_channelBannedRights' => '', - 'object_channelBannedRights_param_view_messages_type_true' => '', - 'object_channelBannedRights_param_send_messages_type_true' => '', - 'object_channelBannedRights_param_send_media_type_true' => '', - 'object_channelBannedRights_param_send_stickers_type_true' => '', - 'object_channelBannedRights_param_send_gifs_type_true' => '', - 'object_channelBannedRights_param_send_games_type_true' => '', - 'object_channelBannedRights_param_send_inline_type_true' => '', - 'object_channelBannedRights_param_embed_links_type_true' => '', - 'object_channelBannedRights_param_until_date_type_int' => '', - 'object_channelAdminLogEventActionChangeTitle' => '', - 'object_channelAdminLogEventActionChangeTitle_param_prev_value_type_string' => '', - 'object_channelAdminLogEventActionChangeTitle_param_new_value_type_string' => '', - 'object_channelAdminLogEventActionChangeAbout' => '', - 'object_channelAdminLogEventActionChangeAbout_param_prev_value_type_string' => '', - 'object_channelAdminLogEventActionChangeAbout_param_new_value_type_string' => '', - 'object_channelAdminLogEventActionChangeUsername' => '', - 'object_channelAdminLogEventActionChangeUsername_param_prev_value_type_string' => '', - 'object_channelAdminLogEventActionChangeUsername_param_new_value_type_string' => '', - 'object_channelAdminLogEventActionChangePhoto' => '', - 'object_channelAdminLogEventActionChangePhoto_param_prev_photo_type_ChatPhoto' => '', - 'object_channelAdminLogEventActionChangePhoto_param_new_photo_type_ChatPhoto' => '', - 'object_channelAdminLogEventActionToggleInvites' => '', - 'object_channelAdminLogEventActionToggleInvites_param_new_value_type_Bool' => '', - 'object_channelAdminLogEventActionToggleSignatures' => '', - 'object_channelAdminLogEventActionToggleSignatures_param_new_value_type_Bool' => '', - 'object_channelAdminLogEventActionUpdatePinned' => '', - 'object_channelAdminLogEventActionUpdatePinned_param_message_type_Message' => '', - 'object_channelAdminLogEventActionEditMessage' => '', - 'object_channelAdminLogEventActionEditMessage_param_prev_message_type_Message' => '', - 'object_channelAdminLogEventActionEditMessage_param_new_message_type_Message' => '', - 'object_channelAdminLogEventActionDeleteMessage' => '', - 'object_channelAdminLogEventActionDeleteMessage_param_message_type_Message' => '', - 'object_channelAdminLogEventActionParticipantJoin' => '', - 'object_channelAdminLogEventActionParticipantLeave' => '', - 'object_channelAdminLogEventActionParticipantInvite' => '', - 'object_channelAdminLogEventActionParticipantInvite_param_participant_type_ChannelParticipant' => '', - 'object_channelAdminLogEventActionParticipantToggleBan' => '', - 'object_channelAdminLogEventActionParticipantToggleBan_param_prev_participant_type_ChannelParticipant' => '', - 'object_channelAdminLogEventActionParticipantToggleBan_param_new_participant_type_ChannelParticipant' => '', - 'object_channelAdminLogEventActionParticipantToggleAdmin' => '', - 'object_channelAdminLogEventActionParticipantToggleAdmin_param_prev_participant_type_ChannelParticipant' => '', - 'object_channelAdminLogEventActionParticipantToggleAdmin_param_new_participant_type_ChannelParticipant' => '', - 'object_channelAdminLogEventActionChangeStickerSet' => '', - 'object_channelAdminLogEventActionChangeStickerSet_param_prev_stickerset_type_InputStickerSet' => '', - 'object_channelAdminLogEventActionChangeStickerSet_param_new_stickerset_type_InputStickerSet' => '', - 'object_channelAdminLogEventActionTogglePreHistoryHidden' => '', - 'object_channelAdminLogEventActionTogglePreHistoryHidden_param_new_value_type_Bool' => '', - 'object_channelAdminLogEvent' => '', - 'object_channelAdminLogEvent_param_id_type_long' => '', - 'object_channelAdminLogEvent_param_date_type_int' => '', - 'object_channelAdminLogEvent_param_user_id_type_int' => '', - 'object_channelAdminLogEvent_param_action_type_ChannelAdminLogEventAction' => '', - 'object_channels.adminLogResults' => '', - 'object_channels.adminLogResults_param_events_type_Vector t' => '', - 'object_channels.adminLogResults_param_chats_type_Vector t' => '', - 'object_channels.adminLogResults_param_users_type_Vector t' => '', - 'object_channelAdminLogEventsFilter' => '', - 'object_channelAdminLogEventsFilter_param_join_type_true' => '', - 'object_channelAdminLogEventsFilter_param_leave_type_true' => '', - 'object_channelAdminLogEventsFilter_param_invite_type_true' => '', - 'object_channelAdminLogEventsFilter_param_ban_type_true' => '', - 'object_channelAdminLogEventsFilter_param_unban_type_true' => '', - 'object_channelAdminLogEventsFilter_param_kick_type_true' => '', - 'object_channelAdminLogEventsFilter_param_unkick_type_true' => '', - 'object_channelAdminLogEventsFilter_param_promote_type_true' => '', - 'object_channelAdminLogEventsFilter_param_demote_type_true' => '', - 'object_channelAdminLogEventsFilter_param_info_type_true' => '', - 'object_channelAdminLogEventsFilter_param_settings_type_true' => '', - 'object_channelAdminLogEventsFilter_param_pinned_type_true' => '', - 'object_channelAdminLogEventsFilter_param_edit_type_true' => '', - 'object_channelAdminLogEventsFilter_param_delete_type_true' => '', - 'object_popularContact' => '', - 'object_popularContact_param_client_id_type_long' => '', - 'object_popularContact_param_importers_type_int' => '', - 'object_cdnFileHash' => '', - 'object_cdnFileHash_param_offset_type_int' => '', - 'object_cdnFileHash_param_limit_type_int' => '', - 'object_cdnFileHash_param_hash_type_bytes' => '', - 'object_messages.favedStickersNotModified' => '', - 'object_messages.favedStickers' => '', - 'object_messages.favedStickers_param_hash_type_int' => '', - 'object_messages.favedStickers_param_packs_type_Vector t' => '', - 'object_messages.favedStickers_param_stickers_type_Vector t' => '', - 'object_recentMeUrlUnknown' => '', - 'object_recentMeUrlUnknown_param_url_type_string' => '', - 'object_recentMeUrlUser' => '', - 'object_recentMeUrlUser_param_url_type_string' => '', - 'object_recentMeUrlUser_param_user_id_type_int' => '', - 'object_recentMeUrlChat' => '', - 'object_recentMeUrlChat_param_url_type_string' => '', - 'object_recentMeUrlChat_param_chat_id_type_int' => '', - 'object_recentMeUrlChatInvite' => '', - 'object_recentMeUrlChatInvite_param_url_type_string' => '', - 'object_recentMeUrlChatInvite_param_chat_invite_type_ChatInvite' => '', - 'object_recentMeUrlStickerSet' => '', - 'object_recentMeUrlStickerSet_param_url_type_string' => '', - 'object_recentMeUrlStickerSet_param_set_type_StickerSetCovered' => '', - 'object_help.recentMeUrls' => '', - 'object_help.recentMeUrls_param_urls_type_Vector t' => '', - 'object_help.recentMeUrls_param_chats_type_Vector t' => '', - 'object_help.recentMeUrls_param_users_type_Vector t' => '', - 'object_inputSingleMedia' => '', - 'object_inputSingleMedia_param_media_type_InputMedia' => '', - 'object_inputSingleMedia_param_message_type_string' => '', - 'object_inputSingleMedia_param_entities_type_Vector t' => '', - 'object_webAuthorization' => '', - 'object_webAuthorization_param_hash_type_long' => '', - 'object_webAuthorization_param_bot_id_type_int' => '', - 'object_webAuthorization_param_domain_type_string' => '', - 'object_webAuthorization_param_browser_type_string' => '', - 'object_webAuthorization_param_platform_type_string' => '', - 'object_webAuthorization_param_date_created_type_int' => '', - 'object_webAuthorization_param_date_active_type_int' => '', - 'object_webAuthorization_param_ip_type_string' => '', - 'object_webAuthorization_param_region_type_string' => '', - 'object_account.webAuthorizations' => '', - 'object_account.webAuthorizations_param_authorizations_type_Vector t' => '', - 'object_account.webAuthorizations_param_users_type_Vector t' => '', - 'object_inputMessageID' => '', - 'object_inputMessageID_param_id_type_int' => '', - 'object_inputMessageReplyTo' => '', - 'object_inputMessageReplyTo_param_id_type_int' => '', - 'object_inputMessagePinned' => '', - 'object_decryptedDataBlock' => '', - 'object_decryptedDataBlock_param_voice_call_id_type_int128' => '', - 'object_decryptedDataBlock_param_in_seq_no_type_int' => '', - 'object_decryptedDataBlock_param_out_seq_no_type_int' => '', - 'object_decryptedDataBlock_param_recent_received_mask_type_int' => '', - 'object_decryptedDataBlock_param_proto_type_int' => '', - 'object_decryptedDataBlock_param_extra_type_string' => '', - 'object_decryptedDataBlock_param_raw_data_type_string' => '', - 'object_simpleDataBlock' => '', - 'object_simpleDataBlock_param_raw_data_type_string' => '', - 'object_decryptedMessage' => '', - 'object_decryptedMessage_param_message_type_string' => '', - 'object_decryptedMessage_param_media_type_DecryptedMessageMedia' => '', - 'object_decryptedMessageService' => '', - 'object_decryptedMessageService_param_action_type_DecryptedMessageAction' => '', - 'object_decryptedMessageMediaEmpty' => '', - 'object_decryptedMessageMediaPhoto' => '', - 'object_decryptedMessageMediaPhoto_param_thumb_type_bytes' => '', - 'object_decryptedMessageMediaPhoto_param_thumb_w_type_int' => '', - 'object_decryptedMessageMediaPhoto_param_thumb_h_type_int' => '', - 'object_decryptedMessageMediaPhoto_param_w_type_int' => '', - 'object_decryptedMessageMediaPhoto_param_h_type_int' => '', - 'object_decryptedMessageMediaPhoto_param_size_type_int' => '', - 'object_decryptedMessageMediaPhoto_param_key_type_bytes' => '', - 'object_decryptedMessageMediaPhoto_param_iv_type_bytes' => '', - 'object_decryptedMessageMediaVideo' => '', - 'object_decryptedMessageMediaVideo_param_thumb_type_bytes' => '', - 'object_decryptedMessageMediaVideo_param_thumb_w_type_int' => '', - 'object_decryptedMessageMediaVideo_param_thumb_h_type_int' => '', - 'object_decryptedMessageMediaVideo_param_duration_type_int' => '', - 'object_decryptedMessageMediaVideo_param_w_type_int' => '', - 'object_decryptedMessageMediaVideo_param_h_type_int' => '', - 'object_decryptedMessageMediaVideo_param_size_type_int' => '', - 'object_decryptedMessageMediaVideo_param_key_type_bytes' => '', - 'object_decryptedMessageMediaVideo_param_iv_type_bytes' => '', - 'object_decryptedMessageMediaGeoPoint' => '', - 'object_decryptedMessageMediaGeoPoint_param_lat_type_double' => '', - 'object_decryptedMessageMediaGeoPoint_param_long_type_double' => '', - 'object_decryptedMessageMediaContact' => '', - 'object_decryptedMessageMediaContact_param_phone_number_type_string' => '', - 'object_decryptedMessageMediaContact_param_first_name_type_string' => '', - 'object_decryptedMessageMediaContact_param_last_name_type_string' => '', - 'object_decryptedMessageMediaContact_param_user_id_type_int' => '', - 'object_decryptedMessageActionSetMessageTTL' => '', - 'object_decryptedMessageActionSetMessageTTL_param_ttl_seconds_type_int' => '', - 'object_decryptedMessageMediaDocument' => '', - 'object_decryptedMessageMediaDocument_param_thumb_type_bytes' => '', - 'object_decryptedMessageMediaDocument_param_thumb_w_type_int' => '', - 'object_decryptedMessageMediaDocument_param_thumb_h_type_int' => '', - 'object_decryptedMessageMediaDocument_param_file_name_type_string' => '', - 'object_decryptedMessageMediaDocument_param_mime_type_type_string' => '', - 'object_decryptedMessageMediaDocument_param_size_type_int' => '', - 'object_decryptedMessageMediaDocument_param_key_type_bytes' => '', - 'object_decryptedMessageMediaDocument_param_iv_type_bytes' => '', - 'object_decryptedMessageMediaAudio' => '', - 'object_decryptedMessageMediaAudio_param_duration_type_int' => '', - 'object_decryptedMessageMediaAudio_param_size_type_int' => '', - 'object_decryptedMessageMediaAudio_param_key_type_bytes' => '', - 'object_decryptedMessageMediaAudio_param_iv_type_bytes' => '', - 'object_decryptedMessageActionReadMessages' => '', - 'object_decryptedMessageActionReadMessages_param_random_ids_type_Vector t' => '', - 'object_decryptedMessageActionDeleteMessages' => '', - 'object_decryptedMessageActionDeleteMessages_param_random_ids_type_Vector t' => '', - 'object_decryptedMessageActionScreenshotMessages' => '', - 'object_decryptedMessageActionScreenshotMessages_param_random_ids_type_Vector t' => '', - 'object_decryptedMessageActionFlushHistory' => '', - 'object_decryptedMessage_param_ttl_type_int' => '', - 'object_decryptedMessageMediaVideo_param_mime_type_type_string' => '', - 'object_decryptedMessageMediaAudio_param_mime_type_type_string' => '', - 'object_decryptedMessageLayer' => '', - 'object_decryptedMessageLayer_param_layer_type_int' => '', - 'object_decryptedMessageLayer_param_in_seq_no_type_int' => '', - 'object_decryptedMessageLayer_param_out_seq_no_type_int' => '', - 'object_decryptedMessageLayer_param_message_type_DecryptedMessage' => '', - 'object_decryptedMessageActionResend' => '', - 'object_decryptedMessageActionResend_param_start_seq_no_type_int' => '', - 'object_decryptedMessageActionResend_param_end_seq_no_type_int' => '', - 'object_decryptedMessageActionNotifyLayer' => '', - 'object_decryptedMessageActionNotifyLayer_param_layer_type_int' => '', - 'object_decryptedMessageActionTyping' => '', - 'object_decryptedMessageActionTyping_param_action_type_SendMessageAction' => '', - 'object_decryptedMessageActionRequestKey' => '', - 'object_decryptedMessageActionRequestKey_param_exchange_id_type_long' => '', - 'object_decryptedMessageActionRequestKey_param_g_a_type_bytes' => '', - 'object_decryptedMessageActionAcceptKey' => '', - 'object_decryptedMessageActionAcceptKey_param_exchange_id_type_long' => '', - 'object_decryptedMessageActionAcceptKey_param_g_b_type_bytes' => '', - 'object_decryptedMessageActionAcceptKey_param_key_fingerprint_type_long' => '', - 'object_decryptedMessageActionAbortKey' => '', - 'object_decryptedMessageActionAbortKey_param_exchange_id_type_long' => '', - 'object_decryptedMessageActionCommitKey' => '', - 'object_decryptedMessageActionCommitKey_param_exchange_id_type_long' => '', - 'object_decryptedMessageActionCommitKey_param_key_fingerprint_type_long' => '', - 'object_decryptedMessageActionNoop' => '', - 'object_decryptedMessageMediaExternalDocument' => '', - 'object_decryptedMessageMediaExternalDocument_param_id_type_long' => '', - 'object_decryptedMessageMediaExternalDocument_param_access_hash_type_long' => '', - 'object_decryptedMessageMediaExternalDocument_param_date_type_int' => '', - 'object_decryptedMessageMediaExternalDocument_param_mime_type_type_string' => '', - 'object_decryptedMessageMediaExternalDocument_param_size_type_int' => '', - 'object_decryptedMessageMediaExternalDocument_param_thumb_type_PhotoSize' => '', - 'object_decryptedMessageMediaExternalDocument_param_dc_id_type_int' => '', - 'object_decryptedMessageMediaExternalDocument_param_attributes_type_Vector t' => '', - 'object_decryptedMessage_param_entities_type_Vector t' => '', - 'object_decryptedMessage_param_via_bot_name_type_string' => '', - 'object_decryptedMessage_param_reply_to_random_id_type_long' => '', - 'object_decryptedMessageMediaPhoto_param_caption_type_string' => '', - 'object_decryptedMessageMediaVideo_param_caption_type_string' => '', - 'object_decryptedMessageMediaDocument_param_attributes_type_Vector t' => '', - 'object_decryptedMessageMediaDocument_param_caption_type_string' => '', - 'object_decryptedMessageMediaVenue' => '', - 'object_decryptedMessageMediaVenue_param_lat_type_double' => '', - 'object_decryptedMessageMediaVenue_param_long_type_double' => '', - 'object_decryptedMessageMediaVenue_param_title_type_string' => '', - 'object_decryptedMessageMediaVenue_param_address_type_string' => '', - 'object_decryptedMessageMediaVenue_param_provider_type_string' => '', - 'object_decryptedMessageMediaVenue_param_venue_id_type_string' => '', - 'object_decryptedMessageMediaWebPage' => '', - 'object_decryptedMessageMediaWebPage_param_url_type_string' => '', - 'object_decryptedMessage_param_grouped_id_type_long' => '', - 'object_inputPeerContact' => '', - 'object_inputPeerContact_param_user_id_type_int' => '', - 'object_inputPeerForeign' => '', - 'object_inputPeerForeign_param_user_id_type_int' => '', - 'object_inputPeerForeign_param_access_hash_type_long' => '', - 'object_inputUserContact' => '', - 'object_inputUserContact_param_user_id_type_int' => '', - 'object_inputUserForeign' => '', - 'object_inputUserForeign_param_user_id_type_int' => '', - 'object_inputUserForeign_param_access_hash_type_long' => '', - 'object_inputMediaUploadedVideo' => '', - 'object_inputMediaUploadedVideo_param_file_type_InputFile' => '', - 'object_inputMediaUploadedVideo_param_duration_type_int' => '', - 'object_inputMediaUploadedVideo_param_w_type_int' => '', - 'object_inputMediaUploadedVideo_param_h_type_int' => '', - 'object_inputMediaUploadedVideo_param_mime_type_type_string' => '', - 'object_inputMediaUploadedThumbVideo' => '', - 'object_inputMediaUploadedThumbVideo_param_file_type_InputFile' => '', - 'object_inputMediaUploadedThumbVideo_param_thumb_type_InputFile' => '', - 'object_inputMediaUploadedThumbVideo_param_duration_type_int' => '', - 'object_inputMediaUploadedThumbVideo_param_w_type_int' => '', - 'object_inputMediaUploadedThumbVideo_param_h_type_int' => '', - 'object_inputMediaUploadedThumbVideo_param_mime_type_type_string' => '', - 'object_inputMediaVideo' => '', - 'object_inputMediaVideo_param_id_type_InputVideo' => '', - 'object_inputChatUploadedPhoto_param_crop_type_InputPhotoCrop' => '', - 'object_inputChatPhoto_param_crop_type_InputPhotoCrop' => '', - 'object_inputVideoEmpty' => '', - 'object_inputVideo' => '', - 'object_inputVideo_param_id_type_long' => '', - 'object_inputVideo_param_access_hash_type_long' => '', - 'object_inputVideoFileLocation' => '', - 'object_inputVideoFileLocation_param_id_type_long' => '', - 'object_inputVideoFileLocation_param_access_hash_type_long' => '', - 'object_inputPhotoCropAuto' => '', - 'object_inputPhotoCrop' => '', - 'object_inputPhotoCrop_param_crop_left_type_double' => '', - 'object_inputPhotoCrop_param_crop_top_type_double' => '', - 'object_inputPhotoCrop_param_crop_width_type_double' => '', - 'object_userSelf' => '', - 'object_userSelf_param_id_type_int' => '', - 'object_userSelf_param_first_name_type_string' => '', - 'object_userSelf_param_last_name_type_string' => '', - 'object_userSelf_param_username_type_string' => '', - 'object_userSelf_param_phone_type_string' => '', - 'object_userSelf_param_photo_type_UserProfilePhoto' => '', - 'object_userSelf_param_status_type_UserStatus' => '', - 'object_userSelf_param_inactive_type_Bool' => '', - 'object_userContact' => '', - 'object_userContact_param_id_type_int' => '', - 'object_userContact_param_first_name_type_string' => '', - 'object_userContact_param_last_name_type_string' => '', - 'object_userContact_param_username_type_string' => '', - 'object_userContact_param_access_hash_type_long' => '', - 'object_userContact_param_phone_type_string' => '', - 'object_userContact_param_photo_type_UserProfilePhoto' => '', - 'object_userContact_param_status_type_UserStatus' => '', - 'object_userRequest' => '', - 'object_userRequest_param_id_type_int' => '', - 'object_userRequest_param_first_name_type_string' => '', - 'object_userRequest_param_last_name_type_string' => '', - 'object_userRequest_param_username_type_string' => '', - 'object_userRequest_param_access_hash_type_long' => '', - 'object_userRequest_param_phone_type_string' => '', - 'object_userRequest_param_photo_type_UserProfilePhoto' => '', - 'object_userRequest_param_status_type_UserStatus' => '', - 'object_userForeign' => '', - 'object_userForeign_param_id_type_int' => '', - 'object_userForeign_param_first_name_type_string' => '', - 'object_userForeign_param_last_name_type_string' => '', - 'object_userForeign_param_username_type_string' => '', - 'object_userForeign_param_access_hash_type_long' => '', - 'object_userForeign_param_photo_type_UserProfilePhoto' => '', - 'object_userForeign_param_status_type_UserStatus' => '', - 'object_userDeleted' => '', - 'object_userDeleted_param_id_type_int' => '', - 'object_userDeleted_param_first_name_type_string' => '', - 'object_userDeleted_param_last_name_type_string' => '', - 'object_userDeleted_param_username_type_string' => '', - 'object_userStatusEmpty' => '', - 'object_userStatusOnline' => '', - 'object_userStatusOnline_param_expires_type_int' => '', - 'object_userStatusOffline' => '', - 'object_userStatusOffline_param_was_online_type_int' => '', - 'object_chat_param_left_type_Bool' => '', - 'object_chatForbidden_param_date_type_int' => '', - 'object_chatParticipants_param_admin_id_type_int' => '', - 'object_messageForwarded' => '', - 'object_messageForwarded_param_id_type_int' => '', - 'object_messageForwarded_param_fwd_from_id_type_int' => '', - 'object_messageForwarded_param_fwd_date_type_int' => '', - 'object_messageForwarded_param_from_id_type_int' => '', - 'object_messageForwarded_param_to_id_type_Peer' => '', - 'object_messageForwarded_param_date_type_int' => '', - 'object_messageForwarded_param_message_type_string' => '', - 'object_messageForwarded_param_media_type_MessageMedia' => '', - 'object_messageMediaVideo' => '', - 'object_messageMediaVideo_param_video_type_Video' => '', - 'object_messageMediaUnsupported_param_bytes_type_bytes' => '', - 'object_messageActionChatAddUser_param_user_id_type_int' => '', - 'object_photo_param_user_id_type_int' => '', - 'object_photo_param_caption_type_string' => '', - 'object_photo_param_geo_type_GeoPoint' => '', - 'object_videoEmpty' => '', - 'object_videoEmpty_param_id_type_long' => '', - 'object_video' => '', - 'object_video_param_id_type_long' => '', - 'object_video_param_access_hash_type_long' => '', - 'object_video_param_user_id_type_int' => '', - 'object_video_param_date_type_int' => '', - 'object_video_param_caption_type_string' => '', - 'object_video_param_duration_type_int' => '', - 'object_video_param_mime_type_type_string' => '', - 'object_video_param_size_type_int' => '', - 'object_video_param_thumb_type_PhotoSize' => '', - 'object_video_param_dc_id_type_int' => '', - 'object_video_param_w_type_int' => '', - 'object_video_param_h_type_int' => '', - 'object_auth.checkedPhone_param_phone_invited_type_Bool' => '', - 'object_auth.sentCode_param_phone_registered_type_Bool' => '', - 'object_auth.sentCode_param_send_call_timeout_type_int' => '', - 'object_auth.sentCode_param_is_password_type_Bool' => '', - 'object_auth.authorization_param_expires_type_int' => '', - 'object_inputPeerNotifySettings_param_show_previews_type_Bool' => '', - 'object_inputPeerNotifySettings_param_events_mask_type_int' => '', - 'object_peerNotifySettings_param_show_previews_type_Bool' => '', - 'object_peerNotifySettings_param_events_mask_type_int' => '', - 'object_userFull_param_blocked_type_Bool' => '', - 'object_userFull_param_real_first_name_type_string' => '', - 'object_userFull_param_real_last_name_type_string' => '', - 'object_contactSuggested' => '', - 'object_contactSuggested_param_user_id_type_int' => '', - 'object_contactSuggested_param_mutual_contacts_type_int' => '', - 'object_contactStatus_param_expires_type_int' => '', - 'object_contacts.foreignLinkUnknown' => '', - 'object_contacts.foreignLinkRequested' => '', - 'object_contacts.foreignLinkRequested_param_has_phone_type_Bool' => '', - 'object_contacts.foreignLinkMutual' => '', - 'object_contacts.myLinkEmpty' => '', - 'object_contacts.myLinkRequested' => '', - 'object_contacts.myLinkRequested_param_contact_type_Bool' => '', - 'object_contacts.myLinkContact' => '', - 'object_contacts.link_param_my_link_type_contacts.MyLink' => '', - 'object_contacts.link_param_foreign_link_type_contacts.ForeignLink' => '', - 'object_contacts.suggested' => '', - 'object_contacts.suggested_param_results_type_Vector t' => '', - 'object_contacts.suggested_param_users_type_Vector t' => '', - 'object_messages.statedMessages' => '', - 'object_messages.statedMessages_param_messages_type_Vector t' => '', - 'object_messages.statedMessages_param_chats_type_Vector t' => '', - 'object_messages.statedMessages_param_users_type_Vector t' => '', - 'object_messages.statedMessages_param_pts_type_int' => '', - 'object_messages.statedMessages_param_seq_type_int' => '', - 'object_messages.statedMessage' => '', - 'object_messages.statedMessage_param_message_type_Message' => '', - 'object_messages.statedMessage_param_chats_type_Vector t' => '', - 'object_messages.statedMessage_param_users_type_Vector t' => '', - 'object_messages.statedMessage_param_pts_type_int' => '', - 'object_messages.statedMessage_param_seq_type_int' => '', - 'object_messages.sentMessage' => '', - 'object_messages.sentMessage_param_id_type_int' => '', - 'object_messages.sentMessage_param_date_type_int' => '', - 'object_messages.sentMessage_param_pts_type_int' => '', - 'object_messages.sentMessage_param_seq_type_int' => '', - 'object_messages.chats_param_users_type_Vector t' => '', - 'object_messages.affectedHistory_param_seq_type_int' => '', - 'object_inputMessagesFilterPhotoVideoDocuments' => '', - 'object_inputMessagesFilterAudio' => '', - 'object_inputMessagesFilterAudioDocuments' => '', - 'object_updateReadMessages' => '', - 'object_updateReadMessages_param_messages_type_Vector t' => '', - 'object_updateReadMessages_param_pts_type_int' => '', - 'object_updateUserStatus' => '', - 'object_updateUserStatus_param_user_id_type_int' => '', - 'object_updateUserStatus_param_status_type_UserStatus' => '', - 'object_updateContactLink_param_my_link_type_contacts.MyLink' => '', - 'object_updateContactLink_param_foreign_link_type_contacts.ForeignLink' => '', - 'object_updateNewAuthorization' => '', - 'object_updateNewAuthorization_param_auth_key_id_type_long' => '', - 'object_updateNewAuthorization_param_date_type_int' => '', - 'object_updateNewAuthorization_param_device_type_string' => '', - 'object_updateNewAuthorization_param_location_type_string' => '', - 'object_updateShortMessage_param_from_id_type_int' => '', - 'object_updateShortMessage_param_seq_type_int' => '', - 'object_updateShortChatMessage_param_seq_type_int' => '', - 'object_dcOption_param_hostname_type_string' => '', - 'object_config_param_broadcast_size_max_type_int' => '', - 'object_messages.statedMessagesLinks' => '', - 'object_messages.statedMessagesLinks_param_messages_type_Vector t' => '', - 'object_messages.statedMessagesLinks_param_chats_type_Vector t' => '', - 'object_messages.statedMessagesLinks_param_users_type_Vector t' => '', - 'object_messages.statedMessagesLinks_param_links_type_Vector t' => '', - 'object_messages.statedMessagesLinks_param_pts_type_int' => '', - 'object_messages.statedMessagesLinks_param_seq_type_int' => '', - 'object_messages.statedMessageLink' => '', - 'object_messages.statedMessageLink_param_message_type_Message' => '', - 'object_messages.statedMessageLink_param_chats_type_Vector t' => '', - 'object_messages.statedMessageLink_param_users_type_Vector t' => '', - 'object_messages.statedMessageLink_param_links_type_Vector t' => '', - 'object_messages.statedMessageLink_param_pts_type_int' => '', - 'object_messages.statedMessageLink_param_seq_type_int' => '', - 'object_messages.sentMessageLink' => '', - 'object_messages.sentMessageLink_param_id_type_int' => '', - 'object_messages.sentMessageLink_param_date_type_int' => '', - 'object_messages.sentMessageLink_param_pts_type_int' => '', - 'object_messages.sentMessageLink_param_seq_type_int' => '', - 'object_messages.sentMessageLink_param_links_type_Vector t' => '', - 'object_inputMediaUploadedAudio' => '', - 'object_inputMediaUploadedAudio_param_file_type_InputFile' => '', - 'object_inputMediaUploadedAudio_param_duration_type_int' => '', - 'object_inputMediaUploadedAudio_param_mime_type_type_string' => '', - 'object_inputMediaAudio' => '', - 'object_inputMediaAudio_param_id_type_InputAudio' => '', - 'object_inputMediaUploadedDocument_param_file_name_type_string' => '', - 'object_inputMediaUploadedThumbDocument' => '', - 'object_inputMediaUploadedThumbDocument_param_file_type_InputFile' => '', - 'object_inputMediaUploadedThumbDocument_param_thumb_type_InputFile' => '', - 'object_inputMediaUploadedThumbDocument_param_file_name_type_string' => '', - 'object_inputMediaUploadedThumbDocument_param_mime_type_type_string' => '', - 'object_messageMediaAudio' => '', - 'object_messageMediaAudio_param_audio_type_Audio' => '', - 'object_inputAudioEmpty' => '', - 'object_inputAudio' => '', - 'object_inputAudio_param_id_type_long' => '', - 'object_inputAudio_param_access_hash_type_long' => '', - 'object_inputAudioFileLocation' => '', - 'object_inputAudioFileLocation_param_id_type_long' => '', - 'object_inputAudioFileLocation_param_access_hash_type_long' => '', - 'object_audioEmpty' => '', - 'object_audioEmpty_param_id_type_long' => '', - 'object_audio' => '', - 'object_audio_param_id_type_long' => '', - 'object_audio_param_access_hash_type_long' => '', - 'object_audio_param_user_id_type_int' => '', - 'object_audio_param_date_type_int' => '', - 'object_audio_param_duration_type_int' => '', - 'object_audio_param_mime_type_type_string' => '', - 'object_audio_param_size_type_int' => '', - 'object_audio_param_dc_id_type_int' => '', - 'object_document_param_user_id_type_int' => '', - 'object_document_param_file_name_type_string' => '', - 'object_auth.sentAppCode' => '', - 'object_auth.sentAppCode_param_phone_registered_type_Bool' => '', - 'object_auth.sentAppCode_param_phone_code_hash_type_string' => '', - 'object_auth.sentAppCode_param_send_call_timeout_type_int' => '', - 'object_auth.sentAppCode_param_is_password_type_Bool' => '', - 'object_contactFound' => '', - 'object_contactFound_param_user_id_type_int' => '', - 'object_updateServiceNotification_param_popup_type_Bool' => '', - 'object_inputMediaUploadedThumbDocument_param_attributes_type_Vector t' => '', - 'object_userStatusRecently' => '', - 'object_userStatusLastWeek' => '', - 'object_userStatusLastMonth' => '', - 'object_account.sentChangePhoneCode' => '', - 'object_account.sentChangePhoneCode_param_phone_code_hash_type_string' => '', - 'object_account.sentChangePhoneCode_param_send_call_timeout_type_int' => '', - 'object_messages.allStickers_param_hash_type_string' => '', - 'object_messages.allStickers_param_packs_type_Vector t' => '', - 'object_messages.allStickers_param_documents_type_Vector t' => '', - 'object_message_param_fwd_from_id_type_int' => '', - 'object_message_param_fwd_date_type_int' => '', - 'object_chatLocated' => '', - 'object_chatLocated_param_chat_id_type_int' => '', - 'object_chatLocated_param_distance_type_int' => '', - 'object_messages.messageEmpty' => '', - 'object_messages.statedMessages_param_pts_count_type_int' => '', - 'object_messages.statedMessage_param_pts_count_type_int' => '', - 'object_messages.sentMessage_param_pts_count_type_int' => '', - 'object_updateReadMessages_param_pts_count_type_int' => '', - 'object_updateShortMessage_param_fwd_from_id_type_int' => '', - 'object_updateShortMessage_param_fwd_date_type_int' => '', - 'object_updateShortChatMessage_param_fwd_from_id_type_int' => '', - 'object_updateShortChatMessage_param_fwd_date_type_int' => '', - 'object_messages.statedMessagesLinks_param_pts_count_type_int' => '', - 'object_messages.statedMessageLink_param_pts_count_type_int' => '', - 'object_messages.sentMessageLink_param_pts_count_type_int' => '', - 'object_inputGeoChat' => '', - 'object_inputGeoChat_param_chat_id_type_int' => '', - 'object_inputGeoChat_param_access_hash_type_long' => '', - 'object_inputNotifyGeoChatPeer' => '', - 'object_inputNotifyGeoChatPeer_param_peer_type_InputGeoChat' => '', - 'object_geoChat' => '', - 'object_geoChat_param_id_type_int' => '', - 'object_geoChat_param_access_hash_type_long' => '', - 'object_geoChat_param_title_type_string' => '', - 'object_geoChat_param_address_type_string' => '', - 'object_geoChat_param_venue_type_string' => '', - 'object_geoChat_param_geo_type_GeoPoint' => '', - 'object_geoChat_param_photo_type_ChatPhoto' => '', - 'object_geoChat_param_participants_count_type_int' => '', - 'object_geoChat_param_date_type_int' => '', - 'object_geoChat_param_checked_in_type_Bool' => '', - 'object_geoChat_param_version_type_int' => '', - 'object_geoChatMessageEmpty' => '', - 'object_geoChatMessageEmpty_param_chat_id_type_int' => '', - 'object_geoChatMessageEmpty_param_id_type_int' => '', - 'object_geoChatMessage' => '', - 'object_geoChatMessage_param_chat_id_type_int' => '', - 'object_geoChatMessage_param_id_type_int' => '', - 'object_geoChatMessage_param_from_id_type_int' => '', - 'object_geoChatMessage_param_date_type_int' => '', - 'object_geoChatMessage_param_message_type_string' => '', - 'object_geoChatMessage_param_media_type_MessageMedia' => '', - 'object_geoChatMessageService' => '', - 'object_geoChatMessageService_param_chat_id_type_int' => '', - 'object_geoChatMessageService_param_id_type_int' => '', - 'object_geoChatMessageService_param_from_id_type_int' => '', - 'object_geoChatMessageService_param_date_type_int' => '', - 'object_geoChatMessageService_param_action_type_MessageAction' => '', - 'object_geochats.statedMessage' => '', - 'object_geochats.statedMessage_param_message_type_GeoChatMessage' => '', - 'object_geochats.statedMessage_param_chats_type_Vector t' => '', - 'object_geochats.statedMessage_param_users_type_Vector t' => '', - 'object_geochats.statedMessage_param_seq_type_int' => '', - 'object_geochats.located' => '', - 'object_geochats.located_param_results_type_Vector t' => '', - 'object_geochats.located_param_messages_type_Vector t' => '', - 'object_geochats.located_param_chats_type_Vector t' => '', - 'object_geochats.located_param_users_type_Vector t' => '', - 'object_geochats.messages' => '', - 'object_geochats.messages_param_messages_type_Vector t' => '', - 'object_geochats.messages_param_chats_type_Vector t' => '', - 'object_geochats.messages_param_users_type_Vector t' => '', - 'object_geochats.messagesSlice' => '', - 'object_geochats.messagesSlice_param_count_type_int' => '', - 'object_geochats.messagesSlice_param_messages_type_Vector t' => '', - 'object_geochats.messagesSlice_param_chats_type_Vector t' => '', - 'object_geochats.messagesSlice_param_users_type_Vector t' => '', - 'object_messageActionGeoChatCreate' => '', - 'object_messageActionGeoChatCreate_param_title_type_string' => '', - 'object_messageActionGeoChatCreate_param_address_type_string' => '', - 'object_messageActionGeoChatCheckin' => '', - 'object_updateNewGeoChatMessage' => '', - 'object_updateNewGeoChatMessage_param_message_type_GeoChatMessage' => '', - 'object_messages.sentMessage_param_media_type_MessageMedia' => '', - 'object_messages.sentMessageLink_param_media_type_MessageMedia' => '', - 'object_inputMediaUploadedPhoto_param_caption_type_string' => '', - 'object_inputMediaPhoto_param_caption_type_string' => '', - 'object_inputMediaUploadedVideo_param_caption_type_string' => '', - 'object_inputMediaUploadedThumbVideo_param_caption_type_string' => '', - 'object_inputMediaVideo_param_caption_type_string' => '', - 'object_messageMediaPhoto_param_caption_type_string' => '', - 'object_messageMediaVideo_param_caption_type_string' => '', - 'object_botCommand' => '', - 'object_botCommand_param_command_type_string' => '', - 'object_botCommand_param_description_type_string' => '', - 'object_botInfoEmpty' => '', - 'object_botInfo_param_version_type_int' => '', - 'object_botInfo_param_share_text_type_string' => '', - 'object_help.appChangelogEmpty' => '', - 'object_help.appChangelog' => '', - 'object_help.appChangelog_param_text_type_string' => '', - 'object_message_param_fwd_from_id_type_Peer' => '', - 'object_updateShortMessage_param_fwd_from_id_type_Peer' => '', - 'object_updateShortChatMessage_param_fwd_from_id_type_Peer' => '', - 'object_channelFull_param_unread_important_count_type_int' => '', - 'object_dialogChannel' => '', - 'object_dialogChannel_param_peer_type_Peer' => '', - 'object_dialogChannel_param_top_message_type_int' => '', - 'object_dialogChannel_param_top_important_message_type_int' => '', - 'object_dialogChannel_param_read_inbox_max_id_type_int' => '', - 'object_dialogChannel_param_unread_count_type_int' => '', - 'object_dialogChannel_param_unread_important_count_type_int' => '', - 'object_dialogChannel_param_notify_settings_type_PeerNotifySettings' => '', - 'object_dialogChannel_param_pts_type_int' => '', - 'object_messageGroup' => '', - 'object_messageGroup_param_min_id_type_int' => '', - 'object_messageGroup_param_max_id_type_int' => '', - 'object_messageGroup_param_count_type_int' => '', - 'object_messageGroup_param_date_type_int' => '', - 'object_messages.channelMessages_param_collapsed_type_Vector t' => '', - 'object_updateChannelGroup' => '', - 'object_updateChannelGroup_param_channel_id_type_int' => '', - 'object_updateChannelGroup_param_group_type_MessageGroup' => '', - 'object_updates.channelDifferenceTooLong_param_top_important_message_type_int' => '', - 'object_updates.channelDifferenceTooLong_param_unread_important_count_type_int' => '', - 'object_channelMessagesFilterCollapsed' => '', - 'object_channelParticipantModerator' => '', - 'object_channelParticipantModerator_param_user_id_type_int' => '', - 'object_channelParticipantModerator_param_inviter_id_type_int' => '', - 'object_channelParticipantModerator_param_date_type_int' => '', - 'object_channelParticipantEditor' => '', - 'object_channelParticipantEditor_param_user_id_type_int' => '', - 'object_channelParticipantEditor_param_inviter_id_type_int' => '', - 'object_channelParticipantEditor_param_date_type_int' => '', - 'object_channelParticipantKicked' => '', - 'object_channelParticipantKicked_param_user_id_type_int' => '', - 'object_channelParticipantKicked_param_kicked_by_type_int' => '', - 'object_channelParticipantKicked_param_date_type_int' => '', - 'object_channelRoleEmpty' => '', - 'object_channelRoleModerator' => '', - 'object_channelRoleEditor' => '', - 'object_inputChatEmpty' => '', - 'object_inputChat' => '', - 'object_inputChat_param_chat_id_type_int' => '', - 'object_updateReadChannelInbox_param_peer_type_Peer' => '', - 'object_updateDeleteChannelMessages_param_peer_type_Peer' => '', - 'object_message_param_unread_type_true' => '', - 'object_messageService_param_unread_type_true' => '', - 'object_updateShortMessage_param_unread_type_true' => '', - 'object_updateShortChatMessage_param_unread_type_true' => '', - 'object_stickerSet_param_disabled_type_true' => '', - 'object_updateShortSentMessage_param_unread_type_true' => '', - 'object_channel_param_kicked_type_true' => '', - 'object_channel_param_moderator_type_true' => '', - 'object_channelMessagesFilter_param_important_only_type_true' => '', - 'object_messageActionChatDeactivate' => '', - 'object_messageActionChatActivate' => '', - 'object_user_param_restiction_reason_type_string' => '', - 'object_channel_param_restiction_reason_type_string' => '', - 'object_webPageExternal' => '', - 'object_webPageExternal_param_url_type_string' => '', - 'object_webPageExternal_param_display_url_type_string' => '', - 'object_webPageExternal_param_type_type_string' => '', - 'object_webPageExternal_param_title_type_string' => '', - 'object_webPageExternal_param_description_type_string' => '', - 'object_webPageExternal_param_thumb_url_type_string' => '', - 'object_webPageExternal_param_content_url_type_string' => '', - 'object_webPageExternal_param_w_type_int' => '', - 'object_webPageExternal_param_h_type_int' => '', - 'object_webPageExternal_param_duration_type_int' => '', - 'object_foundGif_param_webpage_type_WebPage' => '', - 'object_inputMediaUploadedDocument_param_caption_type_string' => '', - 'object_inputMediaUploadedThumbDocument_param_caption_type_string' => '', - 'object_inputMediaDocument_param_caption_type_string' => '', - 'object_messageMediaDocument_param_caption_type_string' => '', - 'object_inputBotInlineMessageMediaAuto_param_caption_type_string' => '', - 'object_botInlineMessageMediaAuto_param_caption_type_string' => '', - 'object_botInlineMediaResultDocument' => '', - 'object_botInlineMediaResultDocument_param_id_type_string' => '', - 'object_botInlineMediaResultDocument_param_type_type_string' => '', - 'object_botInlineMediaResultDocument_param_document_type_Document' => '', - 'object_botInlineMediaResultDocument_param_send_message_type_BotInlineMessage' => '', - 'object_botInlineMediaResultPhoto' => '', - 'object_botInlineMediaResultPhoto_param_id_type_string' => '', - 'object_botInlineMediaResultPhoto_param_type_type_string' => '', - 'object_botInlineMediaResultPhoto_param_photo_type_Photo' => '', - 'object_botInlineMediaResultPhoto_param_send_message_type_BotInlineMessage' => '', - 'object_inputMediaVideo_param_video_type_InputVideo' => '', - 'object_inputMediaAudio_param_audio_type_InputAudio' => '', - 'object_inputMediaDocument_param_document_id_type_InputDocument' => '', - 'object_inputGeoPoint_param_latitude_type_double' => '', - 'object_inputGeoPoint_param_longitude_type_double' => '', - 'object_geoPoint_param_longitude_type_double' => '', - 'object_geoPoint_param_latitude_type_double' => '', - 'object_updateNewEncryptedMessage_param_encr_message_type_EncryptedMessage' => '', - 'object_updateEncryption_param_encr_chat_type_EncryptedChat' => '', - 'object_updateNotifySettings_param_notify_peer_type_NotifyPeer' => '', - 'object_updateServiceNotification_param_message_text_type_string' => '', - 'object_updateNewChannelMessage_param_channel_pts_type_int' => '', - 'object_updateNewChannelMessage_param_channel_pts_count_type_int' => '', - 'object_updateDeleteChannelMessages_param_channel_pts_type_int' => '', - 'object_updateDeleteChannelMessages_param_channel_pts_count_type_int' => '', - 'object_updates.channelDifferenceEmpty_param_channel_pts_type_int' => '', - 'object_updates.channelDifferenceTooLong_param_channel_pts_type_int' => '', - 'object_updates.channelDifference_param_channel_pts_type_int' => '', - 'object_privacyKeyChatInvite' => '', - 'object_inputMediaUploadedThumbDocument_param_stickers_type_Vector t' => '', - 'object_inputMediaPhotoExternal_param_caption_type_string' => '', - 'object_inputMediaDocumentExternal_param_caption_type_string' => '', - 'object_destroy_auth_key_ok' => '', - 'object_destroy_auth_key_none' => '', - 'object_destroy_auth_key_fail' => '', - 'object_help.appChangelog_param_message_type_string' => '', - 'object_help.appChangelog_param_media_type_MessageMedia' => '', - 'object_help.appChangelog_param_entities_type_Vector t' => '', - 'object_pageBlockParagraph' => '', - 'object_pageBlockParagraph_param_text_type_RichText' => '', - 'object_pageBlockPreformatted' => '', - 'object_pageBlockPreformatted_param_text_type_RichText' => '', - 'object_pageBlockPreformatted_param_language_type_string' => '', - 'object_pageBlockDivider' => '', - 'object_pageBlockAnchor' => '', - 'object_pageBlockAnchor_param_name_type_string' => '', - 'object_pageBlockCover' => '', - 'object_pageBlockCover_param_cover_type_PageBlock' => '', - 'object_pagePart_param_videos_type_Vector t' => '', - 'object_pageFull_param_videos_type_Vector t' => '', - 'object_phoneCallRequested_param_g_a_type_bytes' => '', - 'object_resPQ_param_pq_type_string' => '', - 'object_p_q_inner_data_param_pq_type_string' => '', - 'object_p_q_inner_data_param_p_type_string' => '', - 'object_p_q_inner_data_param_q_type_string' => '', - 'object_server_DH_params_ok_param_encrypted_answer_type_string' => '', - 'object_server_DH_inner_data_param_dh_prime_type_string' => '', - 'object_server_DH_inner_data_param_g_a_type_string' => '', - 'object_client_DH_inner_data_param_g_b_type_string' => '', - 'object_msgs_state_info_param_info_type_string' => '', - 'object_msgs_all_info_param_info_type_string' => '', - 'object_http_wait' => '', - 'object_http_wait_param_max_delay_type_int' => '', - 'object_http_wait_param_wait_after_type_int' => '', - 'object_http_wait_param_max_wait_type_int' => '', - 'object_ipPort' => '', - 'object_ipPort_param_ipv4_type_int' => '', - 'object_ipPort_param_port_type_int' => '', - 'object_help.configSimple' => '', - 'object_help.configSimple_param_date_type_int' => '', - 'object_help.configSimple_param_expires_type_int' => '', - 'object_help.configSimple_param_dc_id_type_int' => '', - 'object_help.configSimple_param_ip_port_list_type_Vector t' => '', - 'object_inputMessagesFilterMyMentionsUnread' => '', + 'object_account.passwordInputSettings_param_hint_type_string' => 'Hint', + 'object_account.passwordInputSettings_param_email_type_string' => 'Email', + 'object_auth.passwordRecovery' => 'Password recovery', + 'object_auth.passwordRecovery_param_email_pattern_type_string' => 'Email pattern', + 'object_receivedNotifyMessage' => 'Received notify message', + 'object_receivedNotifyMessage_param_id_type_int' => 'ID', + 'object_chatInviteEmpty' => 'Empty chat invite', + 'object_chatInviteExported' => 'Exported chat invite', + 'object_chatInviteExported_param_link_type_string' => 'Link', + 'object_chatInviteAlready' => 'Invite of a chat of which I am already member ', + 'object_chatInviteAlready_param_chat_type_Chat' => 'Chat', + 'object_chatInvite' => 'Chat invite', + 'object_chatInvite_param_channel_type_true' => 'Channel?', + 'object_chatInvite_param_broadcast_type_true' => 'Broadcast?', + 'object_chatInvite_param_public_type_true' => 'Public?', + 'object_chatInvite_param_megagroup_type_true' => 'Megagroup?', + 'object_chatInvite_param_title_type_string' => 'Title', + 'object_chatInvite_param_photo_type_ChatPhoto' => 'Photo', + 'object_chatInvite_param_participants_count_type_int' => 'Participants count', + 'object_chatInvite_param_participants_type_Vector t' => 'Participants', + 'object_inputStickerSetEmpty' => 'Empty input sticker set', + 'object_inputStickerSetID' => 'Sticker set ID', + 'object_inputStickerSetID_param_id_type_long' => 'ID', + 'object_inputStickerSetID_param_access_hash_type_long' => 'Access hash', + 'object_inputStickerSetShortName' => 'Sticker set short name', + 'object_inputStickerSetShortName_param_short_name_type_string' => 'Short name', + 'object_stickerSet' => 'Sticker set', + 'object_stickerSet_param_installed_type_true' => 'Installed?', + 'object_stickerSet_param_archived_type_true' => 'Archived?', + 'object_stickerSet_param_official_type_true' => 'Official?', + 'object_stickerSet_param_masks_type_true' => 'Masks?', + 'object_stickerSet_param_id_type_long' => 'ID', + 'object_stickerSet_param_access_hash_type_long' => 'Access hash', + 'object_stickerSet_param_title_type_string' => 'Title', + 'object_stickerSet_param_short_name_type_string' => 'Short name', + 'object_stickerSet_param_count_type_int' => 'Count', + 'object_stickerSet_param_hash_type_int' => 'Hash', + 'object_messages.stickerSet' => 'Sticker set', + 'object_messages.stickerSet_param_set_type_StickerSet' => 'Set', + 'object_messages.stickerSet_param_packs_type_Vector t' => 'Packs', + 'object_messages.stickerSet_param_documents_type_Vector t' => 'Documents', + 'object_botInfo' => 'Bot info', + 'object_botInfo_param_user_id_type_int' => 'User ID', + 'object_botInfo_param_description_type_string' => 'Description', + 'object_botInfo_param_commands_type_Vector t' => 'Commands', + 'object_keyboardButton' => 'Keyboard button', + 'object_keyboardButton_param_text_type_string' => 'Text', + 'object_keyboardButtonUrl' => 'Keyboard button URL', + 'object_keyboardButtonUrl_param_text_type_string' => 'Text', + 'object_keyboardButtonUrl_param_url_type_string' => 'URL', + 'object_keyboardButtonCallback' => 'Keyboard button callback', + 'object_keyboardButtonCallback_param_text_type_string' => 'Text', + 'object_keyboardButtonCallback_param_data_type_bytes' => 'Data', + 'object_keyboardButtonRequestPhone' => 'Keyboard button request phone', + 'object_keyboardButtonRequestPhone_param_text_type_string' => 'Text', + 'object_keyboardButtonRequestGeoLocation' => 'Keyboard button request geo location', + 'object_keyboardButtonRequestGeoLocation_param_text_type_string' => 'Text', + 'object_keyboardButtonSwitchInline' => 'Keyboard button switch inline', + 'object_keyboardButtonSwitchInline_param_same_peer_type_true' => 'Same peer?', + 'object_keyboardButtonSwitchInline_param_text_type_string' => 'Text', + 'object_keyboardButtonSwitchInline_param_query_type_string' => 'Query', + 'object_keyboardButtonGame' => 'Keyboard button game', + 'object_keyboardButtonGame_param_text_type_string' => 'Text', + 'object_keyboardButtonBuy' => 'Keyboard button buy', + 'object_keyboardButtonBuy_param_text_type_string' => 'Text', + 'object_keyboardButtonRow' => 'Keyboard button row', + 'object_keyboardButtonRow_param_buttons_type_Vector t' => 'Buttons', + 'object_replyKeyboardHide' => 'Reply keyboard hide', + 'object_replyKeyboardHide_param_selective_type_true' => 'Selective?', + 'object_replyKeyboardForceReply' => 'Reply keyboard force reply', + 'object_replyKeyboardForceReply_param_single_use_type_true' => 'Single use?', + 'object_replyKeyboardForceReply_param_selective_type_true' => 'Selective?', + 'object_replyKeyboardMarkup' => 'Reply keyboard markup', + 'object_replyKeyboardMarkup_param_resize_type_true' => 'Resize?', + 'object_replyKeyboardMarkup_param_single_use_type_true' => 'Single use?', + 'object_replyKeyboardMarkup_param_selective_type_true' => 'Selective?', + 'object_replyKeyboardMarkup_param_rows_type_Vector t' => 'Rows', + 'object_replyInlineMarkup' => 'Reply inline markup', + 'object_replyInlineMarkup_param_rows_type_Vector t' => 'Rows', + 'object_messageEntityUnknown' => 'Message entity unknown', + 'object_messageEntityUnknown_param_offset_type_int' => 'Offset', + 'object_messageEntityUnknown_param_length_type_int' => 'Length', + 'object_messageEntityMention' => 'Message entity mention', + 'object_messageEntityMention_param_offset_type_int' => 'Offset', + 'object_messageEntityMention_param_length_type_int' => 'Length', + 'object_messageEntityHashtag' => 'Message entity hashtag', + 'object_messageEntityHashtag_param_offset_type_int' => 'Offset', + 'object_messageEntityHashtag_param_length_type_int' => 'Length', + 'object_messageEntityBotCommand' => 'Message entity bot command', + 'object_messageEntityBotCommand_param_offset_type_int' => 'Offset', + 'object_messageEntityBotCommand_param_length_type_int' => 'Length', + 'object_messageEntityUrl' => 'Message entity URL', + 'object_messageEntityUrl_param_offset_type_int' => 'Offset', + 'object_messageEntityUrl_param_length_type_int' => 'Length', + 'object_messageEntityEmail' => 'Message entity email', + 'object_messageEntityEmail_param_offset_type_int' => 'Offset', + 'object_messageEntityEmail_param_length_type_int' => 'Length', + 'object_messageEntityBold' => 'Message entity bold', + 'object_messageEntityBold_param_offset_type_int' => 'Offset', + 'object_messageEntityBold_param_length_type_int' => 'Length', + 'object_messageEntityItalic' => 'Message entity italic', + 'object_messageEntityItalic_param_offset_type_int' => 'Offset', + 'object_messageEntityItalic_param_length_type_int' => 'Length', + 'object_messageEntityCode' => 'Message entity code', + 'object_messageEntityCode_param_offset_type_int' => 'Offset', + 'object_messageEntityCode_param_length_type_int' => 'Length', + 'object_messageEntityPre' => 'Message entity pre', + 'object_messageEntityPre_param_offset_type_int' => 'Offset', + 'object_messageEntityPre_param_length_type_int' => 'Length', + 'object_messageEntityPre_param_language_type_string' => 'Language', + 'object_messageEntityTextUrl' => 'Message entity text URL', + 'object_messageEntityTextUrl_param_offset_type_int' => 'Offset', + 'object_messageEntityTextUrl_param_length_type_int' => 'Length', + 'object_messageEntityTextUrl_param_url_type_string' => 'URL', + 'object_messageEntityMentionName' => 'Message entity mention name', + 'object_messageEntityMentionName_param_offset_type_int' => 'Offset', + 'object_messageEntityMentionName_param_length_type_int' => 'Length', + 'object_messageEntityMentionName_param_user_id_type_int' => 'User ID', + 'object_inputMessageEntityMentionName' => 'Message entity mention name', + 'object_inputMessageEntityMentionName_param_offset_type_int' => 'Offset', + 'object_inputMessageEntityMentionName_param_length_type_int' => 'Length', + 'object_inputMessageEntityMentionName_param_user_id_type_InputUser' => 'User ID', + 'object_inputChannelEmpty' => 'Empty input channel', + 'object_inputChannel' => 'Channel', + 'object_inputChannel_param_channel_id_type_int' => 'Channel ID', + 'object_inputChannel_param_access_hash_type_long' => 'Access hash', + 'object_contacts.resolvedPeer' => 'Resolved peer', + 'object_contacts.resolvedPeer_param_peer_type_Peer' => 'Peer', + 'object_contacts.resolvedPeer_param_chats_type_Vector t' => 'Chats', + 'object_contacts.resolvedPeer_param_users_type_Vector t' => 'Users', + 'object_messageRange' => 'Message range', + 'object_messageRange_param_min_id_type_int' => 'Min ID', + 'object_messageRange_param_max_id_type_int' => 'Max ID', + 'object_updates.channelDifferenceEmpty' => 'Empty channel difference', + 'object_updates.channelDifferenceEmpty_param_final_type_true' => 'Final?', + 'object_updates.channelDifferenceEmpty_param_pts_type_int' => 'Pts', + 'object_updates.channelDifferenceEmpty_param_timeout_type_int' => 'Timeout', + 'object_updates.channelDifferenceTooLong' => 'Channel difference too long', + 'object_updates.channelDifferenceTooLong_param_final_type_true' => 'Final?', + 'object_updates.channelDifferenceTooLong_param_pts_type_int' => 'Pts', + 'object_updates.channelDifferenceTooLong_param_timeout_type_int' => 'Timeout', + 'object_updates.channelDifferenceTooLong_param_top_message_type_int' => 'Top message', + 'object_updates.channelDifferenceTooLong_param_read_inbox_max_id_type_int' => 'Read inbox max ID', + 'object_updates.channelDifferenceTooLong_param_read_outbox_max_id_type_int' => 'Read outbox max ID', + 'object_updates.channelDifferenceTooLong_param_unread_count_type_int' => 'Unread count', + 'object_updates.channelDifferenceTooLong_param_unread_mentions_count_type_int' => 'Unread mentions count', + 'object_updates.channelDifferenceTooLong_param_messages_type_Vector t' => 'Messages', + 'object_updates.channelDifferenceTooLong_param_chats_type_Vector t' => 'Chats', + 'object_updates.channelDifferenceTooLong_param_users_type_Vector t' => 'Users', + 'object_updates.channelDifference' => 'Channel difference', + 'object_updates.channelDifference_param_final_type_true' => 'Final?', + 'object_updates.channelDifference_param_pts_type_int' => 'Pts', + 'object_updates.channelDifference_param_timeout_type_int' => 'Timeout', + 'object_updates.channelDifference_param_new_messages_type_Vector t' => 'New messages', + 'object_updates.channelDifference_param_other_updates_type_Vector t' => 'Other updates', + 'object_updates.channelDifference_param_chats_type_Vector t' => 'Chats', + 'object_updates.channelDifference_param_users_type_Vector t' => 'Users', + 'object_channelMessagesFilterEmpty' => 'Empty channel messages filter', + 'object_channelMessagesFilter' => 'Channel messages filter', + 'object_channelMessagesFilter_param_exclude_new_messages_type_true' => 'Exclude new messages?', + 'object_channelMessagesFilter_param_ranges_type_Vector t' => 'Ranges', + 'object_channelParticipant' => 'Channel participant', + 'object_channelParticipant_param_user_id_type_int' => 'User ID', + 'object_channelParticipant_param_date_type_int' => 'Date', + 'object_channelParticipantSelf' => 'Channel participant self', + 'object_channelParticipantSelf_param_user_id_type_int' => 'User ID', + 'object_channelParticipantSelf_param_inviter_id_type_int' => 'Inviter ID', + 'object_channelParticipantSelf_param_date_type_int' => 'Date', + 'object_channelParticipantCreator' => 'Channel participant creator', + 'object_channelParticipantCreator_param_user_id_type_int' => 'User ID', + 'object_channelParticipantAdmin' => 'Channel participant admin', + 'object_channelParticipantAdmin_param_can_edit_type_true' => 'Can edit?', + 'object_channelParticipantAdmin_param_user_id_type_int' => 'User ID', + 'object_channelParticipantAdmin_param_inviter_id_type_int' => 'Inviter ID', + 'object_channelParticipantAdmin_param_promoted_by_type_int' => 'Promoted by', + 'object_channelParticipantAdmin_param_date_type_int' => 'Date', + 'object_channelParticipantAdmin_param_admin_rights_type_ChannelAdminRights' => 'Admin rights', + 'object_channelParticipantBanned' => 'Channel participant banned', + 'object_channelParticipantBanned_param_left_type_true' => 'Left?', + 'object_channelParticipantBanned_param_user_id_type_int' => 'User ID', + 'object_channelParticipantBanned_param_kicked_by_type_int' => 'Kicked by', + 'object_channelParticipantBanned_param_date_type_int' => 'Date', + 'object_channelParticipantBanned_param_banned_rights_type_ChannelBannedRights' => 'Banned rights', + 'object_channelParticipantsRecent' => 'Channel participants recent', + 'object_channelParticipantsAdmins' => 'Channel participants admins', + 'object_channelParticipantsKicked' => 'Channel participants kicked', + 'object_channelParticipantsKicked_param_q_type_string' => 'Query', + 'object_channelParticipantsBots' => 'Channel participants bots', + 'object_channelParticipantsBanned' => 'Channel participants banned', + 'object_channelParticipantsBanned_param_q_type_string' => 'Query', + 'object_channelParticipantsSearch' => 'Channel participants search', + 'object_channelParticipantsSearch_param_q_type_string' => 'Query', + 'object_channels.channelParticipants' => 'Channel participants', + 'object_channels.channelParticipants_param_count_type_int' => 'Count', + 'object_channels.channelParticipants_param_participants_type_Vector t' => 'Participants', + 'object_channels.channelParticipants_param_users_type_Vector t' => 'Users', + 'object_channels.channelParticipantsNotModified' => 'Channel participants not modified', + 'object_channels.channelParticipant' => 'Channel participant', + 'object_channels.channelParticipant_param_participant_type_ChannelParticipant' => 'Participant', + 'object_channels.channelParticipant_param_users_type_Vector t' => 'Users', + 'object_help.termsOfService' => 'Terms of service', + 'object_help.termsOfService_param_text_type_string' => 'Text', + 'object_foundGif' => 'Found gif', + 'object_foundGif_param_url_type_string' => 'URL', + 'object_foundGif_param_thumb_url_type_string' => 'Thumbnail URL', + 'object_foundGif_param_content_url_type_string' => 'Content URL', + 'object_foundGif_param_content_type_type_string' => 'Content type', + 'object_foundGif_param_w_type_int' => 'Width', + 'object_foundGif_param_h_type_int' => 'Height', + 'object_foundGifCached' => 'Found gif cached', + 'object_foundGifCached_param_url_type_string' => 'URL', + 'object_foundGifCached_param_photo_type_Photo' => 'Photo', + 'object_foundGifCached_param_document_type_Document' => 'Document', + 'object_messages.foundGifs' => 'Found gifs', + 'object_messages.foundGifs_param_next_offset_type_int' => 'Next offset', + 'object_messages.foundGifs_param_results_type_Vector t' => 'Results', + 'object_messages.savedGifsNotModified' => 'Saved gifs not modified', + 'object_messages.savedGifs' => 'Saved gifs', + 'object_messages.savedGifs_param_hash_type_int' => 'Hash', + 'object_messages.savedGifs_param_gifs_type_Vector t' => 'Gifs', + 'object_inputBotInlineMessageMediaAuto' => 'Bot inline message media auto', + 'object_inputBotInlineMessageMediaAuto_param_message_type_string' => 'Message', + 'object_inputBotInlineMessageMediaAuto_param_entities_type_Vector t' => 'Entities', + 'object_inputBotInlineMessageMediaAuto_param_reply_markup_type_ReplyMarkup' => 'Reply markup', + 'object_inputBotInlineMessageText' => 'Bot inline message text', + 'object_inputBotInlineMessageText_param_no_webpage_type_true' => 'No webpage?', + 'object_inputBotInlineMessageText_param_message_type_string' => 'Message', + 'object_inputBotInlineMessageText_param_entities_type_Vector t' => 'Entities', + 'object_inputBotInlineMessageText_param_reply_markup_type_ReplyMarkup' => 'Reply markup', + 'object_inputBotInlineMessageMediaGeo' => 'Bot inline message media geo', + 'object_inputBotInlineMessageMediaGeo_param_geo_point_type_InputGeoPoint' => 'Geo point', + 'object_inputBotInlineMessageMediaGeo_param_period_type_int' => 'Period', + 'object_inputBotInlineMessageMediaGeo_param_reply_markup_type_ReplyMarkup' => 'Reply markup', + 'object_inputBotInlineMessageMediaVenue' => 'Bot inline message media venue', + 'object_inputBotInlineMessageMediaVenue_param_geo_point_type_InputGeoPoint' => 'Geo point', + 'object_inputBotInlineMessageMediaVenue_param_title_type_string' => 'Title', + 'object_inputBotInlineMessageMediaVenue_param_address_type_string' => 'Address', + 'object_inputBotInlineMessageMediaVenue_param_provider_type_string' => 'Provider', + 'object_inputBotInlineMessageMediaVenue_param_venue_id_type_string' => 'Venue ID', + 'object_inputBotInlineMessageMediaVenue_param_reply_markup_type_ReplyMarkup' => 'Reply markup', + 'object_inputBotInlineMessageMediaContact' => 'Bot inline message media contact', + 'object_inputBotInlineMessageMediaContact_param_phone_number_type_string' => 'Phone number', + 'object_inputBotInlineMessageMediaContact_param_first_name_type_string' => 'First name', + 'object_inputBotInlineMessageMediaContact_param_last_name_type_string' => 'Last name', + 'object_inputBotInlineMessageMediaContact_param_reply_markup_type_ReplyMarkup' => 'Reply markup', + 'object_inputBotInlineMessageGame' => 'Bot inline message game', + 'object_inputBotInlineMessageGame_param_reply_markup_type_ReplyMarkup' => 'Reply markup', + 'object_inputBotInlineResult' => 'Bot inline result', + 'object_inputBotInlineResult_param_id_type_string' => 'ID', + 'object_inputBotInlineResult_param_type_type_string' => 'Type', + 'object_inputBotInlineResult_param_title_type_string' => 'Title', + 'object_inputBotInlineResult_param_description_type_string' => 'Description', + 'object_inputBotInlineResult_param_url_type_string' => 'URL', + 'object_inputBotInlineResult_param_thumb_url_type_string' => 'Thumbnail URL', + 'object_inputBotInlineResult_param_content_url_type_string' => 'Content URL', + 'object_inputBotInlineResult_param_content_type_type_string' => 'Content type', + 'object_inputBotInlineResult_param_w_type_int' => 'Width', + 'object_inputBotInlineResult_param_h_type_int' => 'Height', + 'object_inputBotInlineResult_param_duration_type_int' => 'Duration', + 'object_inputBotInlineResult_param_send_message_type_InputBotInlineMessage' => 'Message to send', + 'object_inputBotInlineResultPhoto' => 'Bot inline result photo', + 'object_inputBotInlineResultPhoto_param_id_type_string' => 'ID', + 'object_inputBotInlineResultPhoto_param_type_type_string' => 'Type', + 'object_inputBotInlineResultPhoto_param_photo_type_InputPhoto' => 'Photo', + 'object_inputBotInlineResultPhoto_param_send_message_type_InputBotInlineMessage' => 'Message to send', + 'object_inputBotInlineResultDocument' => 'Bot inline result document', + 'object_inputBotInlineResultDocument_param_id_type_string' => 'ID', + 'object_inputBotInlineResultDocument_param_type_type_string' => 'Type', + 'object_inputBotInlineResultDocument_param_title_type_string' => 'Title', + 'object_inputBotInlineResultDocument_param_description_type_string' => 'Description', + 'object_inputBotInlineResultDocument_param_document_type_InputDocument' => 'Document', + 'object_inputBotInlineResultDocument_param_send_message_type_InputBotInlineMessage' => 'Message to send', + 'object_inputBotInlineResultGame' => 'Bot inline result game', + 'object_inputBotInlineResultGame_param_id_type_string' => 'ID', + 'object_inputBotInlineResultGame_param_short_name_type_string' => 'Short name', + 'object_inputBotInlineResultGame_param_send_message_type_InputBotInlineMessage' => 'Message to send', + 'object_botInlineMessageMediaAuto' => 'Bot inline message media auto', + 'object_botInlineMessageMediaAuto_param_message_type_string' => 'Message', + 'object_botInlineMessageMediaAuto_param_entities_type_Vector t' => 'Entities', + 'object_botInlineMessageMediaAuto_param_reply_markup_type_ReplyMarkup' => 'Reply markup', + 'object_botInlineMessageText' => 'Bot inline message text', + 'object_botInlineMessageText_param_no_webpage_type_true' => 'No webpage?', + 'object_botInlineMessageText_param_message_type_string' => 'Message', + 'object_botInlineMessageText_param_entities_type_Vector t' => 'Entities', + 'object_botInlineMessageText_param_reply_markup_type_ReplyMarkup' => 'Reply markup', + 'object_botInlineMessageMediaGeo' => 'Bot inline message media geo', + 'object_botInlineMessageMediaGeo_param_geo_type_GeoPoint' => 'Geo', + 'object_botInlineMessageMediaGeo_param_period_type_int' => 'Period', + 'object_botInlineMessageMediaGeo_param_reply_markup_type_ReplyMarkup' => 'Reply markup', + 'object_botInlineMessageMediaVenue' => 'Bot inline message media venue', + 'object_botInlineMessageMediaVenue_param_geo_type_GeoPoint' => 'Geo', + 'object_botInlineMessageMediaVenue_param_title_type_string' => 'Title', + 'object_botInlineMessageMediaVenue_param_address_type_string' => 'Address', + 'object_botInlineMessageMediaVenue_param_provider_type_string' => 'Provider', + 'object_botInlineMessageMediaVenue_param_venue_id_type_string' => 'Venue ID', + 'object_botInlineMessageMediaVenue_param_reply_markup_type_ReplyMarkup' => 'Reply markup', + 'object_botInlineMessageMediaContact' => 'Bot inline message media contact', + 'object_botInlineMessageMediaContact_param_phone_number_type_string' => 'Phone number', + 'object_botInlineMessageMediaContact_param_first_name_type_string' => 'First name', + 'object_botInlineMessageMediaContact_param_last_name_type_string' => 'Last name', + 'object_botInlineMessageMediaContact_param_reply_markup_type_ReplyMarkup' => 'Reply markup', + 'object_botInlineResult' => 'Bot inline result', + 'object_botInlineResult_param_id_type_string' => 'ID', + 'object_botInlineResult_param_type_type_string' => 'Type', + 'object_botInlineResult_param_title_type_string' => 'Title', + 'object_botInlineResult_param_description_type_string' => 'Description', + 'object_botInlineResult_param_url_type_string' => 'URL', + 'object_botInlineResult_param_thumb_url_type_string' => 'Thumbnail URL', + 'object_botInlineResult_param_content_url_type_string' => 'Content URL', + 'object_botInlineResult_param_content_type_type_string' => 'Content type', + 'object_botInlineResult_param_w_type_int' => 'Width', + 'object_botInlineResult_param_h_type_int' => 'Height', + 'object_botInlineResult_param_duration_type_int' => 'Duration', + 'object_botInlineResult_param_send_message_type_BotInlineMessage' => 'Message to send', + 'object_botInlineMediaResult' => 'Bot inline media result', + 'object_botInlineMediaResult_param_id_type_string' => 'ID', + 'object_botInlineMediaResult_param_type_type_string' => 'Type', + 'object_botInlineMediaResult_param_photo_type_Photo' => 'Photo', + 'object_botInlineMediaResult_param_document_type_Document' => 'Document', + 'object_botInlineMediaResult_param_title_type_string' => 'Title', + 'object_botInlineMediaResult_param_description_type_string' => 'Description', + 'object_botInlineMediaResult_param_send_message_type_BotInlineMessage' => 'Send message', + 'object_messages.botResults' => 'Bot results', + 'object_messages.botResults_param_gallery_type_true' => 'Gallery?', + 'object_messages.botResults_param_query_id_type_long' => 'Query ID', + 'object_messages.botResults_param_next_offset_type_string' => 'Next offset', + 'object_messages.botResults_param_switch_pm_type_InlineBotSwitchPM' => 'Switch pm', + 'object_messages.botResults_param_results_type_Vector t' => 'Results', + 'object_messages.botResults_param_cache_time_type_int' => 'Cache time', + 'object_messages.botResults_param_users_type_Vector t' => 'Users', + 'object_exportedMessageLink' => 'Exported message link', + 'object_exportedMessageLink_param_link_type_string' => 'Link', + 'object_exportedMessageLink_param_html_type_string' => 'Html', + 'object_messageFwdHeader' => 'Forwarded message info', + 'object_messageFwdHeader_param_from_id_type_int' => 'From ID', + 'object_messageFwdHeader_param_date_type_int' => 'Date', + 'object_messageFwdHeader_param_channel_id_type_int' => 'Channel ID', + 'object_messageFwdHeader_param_channel_post_type_int' => 'Channel post', + 'object_messageFwdHeader_param_post_author_type_string' => 'Post author', + 'object_messageFwdHeader_param_saved_from_peer_type_Peer' => 'Saved from peer', + 'object_messageFwdHeader_param_saved_from_msg_id_type_int' => 'Saved from msg ID', + 'object_auth.codeTypeSms' => 'Auth code type: SMS', + 'object_auth.codeTypeCall' => 'Auth code type: call', + 'object_auth.codeTypeFlashCall' => 'Auth code type: flash call', + 'object_auth.sentCodeTypeApp' => 'Sent code type app', + 'object_auth.sentCodeTypeApp_param_length_type_int' => 'Length', + 'object_auth.sentCodeTypeSms' => 'Sent code type sms', + 'object_auth.sentCodeTypeSms_param_length_type_int' => 'Length', + 'object_auth.sentCodeTypeCall' => 'Sent code type call', + 'object_auth.sentCodeTypeCall_param_length_type_int' => 'Length', + 'object_auth.sentCodeTypeFlashCall' => 'Sent code type flash call', + 'object_auth.sentCodeTypeFlashCall_param_pattern_type_string' => 'Pattern', + 'object_messages.botCallbackAnswer' => 'Bot callback answer', + 'object_messages.botCallbackAnswer_param_alert_type_true' => 'Alert?', + 'object_messages.botCallbackAnswer_param_has_url_type_true' => 'Has URL?', + 'object_messages.botCallbackAnswer_param_native_ui_type_true' => 'Native ui?', + 'object_messages.botCallbackAnswer_param_message_type_string' => 'Message', + 'object_messages.botCallbackAnswer_param_url_type_string' => 'URL', + 'object_messages.botCallbackAnswer_param_cache_time_type_int' => 'Cache time', + 'object_messages.messageEditData' => 'Message edit data', + 'object_messages.messageEditData_param_caption_type_true' => 'Caption?', + 'object_inputBotInlineMessageID' => 'Bot inline message ID', + 'object_inputBotInlineMessageID_param_dc_id_type_int' => 'DC ID', + 'object_inputBotInlineMessageID_param_id_type_long' => 'ID', + 'object_inputBotInlineMessageID_param_access_hash_type_long' => 'Access hash', + 'object_inlineBotSwitchPM' => 'Inline bot switch pm', + 'object_inlineBotSwitchPM_param_text_type_string' => 'Text', + 'object_inlineBotSwitchPM_param_start_param_type_string' => 'Start param', + 'object_messages.peerDialogs' => 'Peer dialogs', + 'object_messages.peerDialogs_param_dialogs_type_Vector t' => 'Dialogs', + 'object_messages.peerDialogs_param_messages_type_Vector t' => 'Messages', + 'object_messages.peerDialogs_param_chats_type_Vector t' => 'Chats', + 'object_messages.peerDialogs_param_users_type_Vector t' => 'Users', + 'object_messages.peerDialogs_param_state_type_updates.State' => 'State', + 'object_topPeer' => 'Top peer', + 'object_topPeer_param_peer_type_Peer' => 'Peer', + 'object_topPeer_param_rating_type_double' => 'Rating', + 'object_topPeerCategoryBotsPM' => 'Top peer category bots pm', + 'object_topPeerCategoryBotsInline' => 'Top peer category bots inline', + 'object_topPeerCategoryCorrespondents' => 'Top peer category correspondents', + 'object_topPeerCategoryGroups' => 'Top peer category groups', + 'object_topPeerCategoryChannels' => 'Top peer category channels', + 'object_topPeerCategoryPhoneCalls' => 'Top peer category phone calls', + 'object_topPeerCategoryPeers' => 'Top peer category peers', + 'object_topPeerCategoryPeers_param_category_type_TopPeerCategory' => 'Category', + 'object_topPeerCategoryPeers_param_count_type_int' => 'Count', + 'object_topPeerCategoryPeers_param_peers_type_Vector t' => 'Peers', + 'object_contacts.topPeersNotModified' => 'Top peers not modified', + 'object_contacts.topPeers' => 'Top peers', + 'object_contacts.topPeers_param_categories_type_Vector t' => 'Categories', + 'object_contacts.topPeers_param_chats_type_Vector t' => 'Chats', + 'object_contacts.topPeers_param_users_type_Vector t' => 'Users', + 'object_draftMessageEmpty' => 'Empty draft message', + 'object_draftMessage' => 'Draft message', + 'object_draftMessage_param_no_webpage_type_true' => 'No webpage?', + 'object_draftMessage_param_reply_to_msg_id_type_int' => 'Reply to msg ID', + 'object_draftMessage_param_message_type_string' => 'Message', + 'object_draftMessage_param_entities_type_Vector t' => 'Entities', + 'object_draftMessage_param_date_type_int' => 'Date', + 'object_messages.featuredStickersNotModified' => 'Featured stickers not modified', + 'object_messages.featuredStickers' => 'Featured stickers', + 'object_messages.featuredStickers_param_hash_type_int' => 'Hash', + 'object_messages.featuredStickers_param_sets_type_Vector t' => 'Sets', + 'object_messages.featuredStickers_param_unread_type_Vector t' => 'Unread', + 'object_messages.recentStickersNotModified' => 'Recent stickers not modified', + 'object_messages.recentStickers' => 'Recent stickers', + 'object_messages.recentStickers_param_hash_type_int' => 'Hash', + 'object_messages.recentStickers_param_stickers_type_Vector t' => 'Stickers', + 'object_messages.archivedStickers' => 'Archived stickers', + 'object_messages.archivedStickers_param_count_type_int' => 'Count', + 'object_messages.archivedStickers_param_sets_type_Vector t' => 'Sets', + 'object_messages.stickerSetInstallResultSuccess' => 'Sticker set install result success', + 'object_messages.stickerSetInstallResultArchive' => 'Sticker set install result archive', + 'object_messages.stickerSetInstallResultArchive_param_sets_type_Vector t' => 'Sets', + 'object_stickerSetCovered' => 'Sticker set covered', + 'object_stickerSetCovered_param_set_type_StickerSet' => 'Set', + 'object_stickerSetCovered_param_cover_type_Document' => 'Cover', + 'object_stickerSetMultiCovered' => 'Sticker set multi covered', + 'object_stickerSetMultiCovered_param_set_type_StickerSet' => 'Set', + 'object_stickerSetMultiCovered_param_covers_type_Vector t' => 'Covers', + 'object_maskCoords' => 'Mask coords', + 'object_maskCoords_param_n_type_int' => 'N', + 'object_maskCoords_param_x_type_double' => 'X', + 'object_maskCoords_param_y_type_double' => 'Y', + 'object_maskCoords_param_zoom_type_double' => 'Zoom', + 'object_inputStickeredMediaPhoto' => 'Stickered media photo', + 'object_inputStickeredMediaPhoto_param_id_type_InputPhoto' => 'ID', + 'object_inputStickeredMediaDocument' => 'Stickered media document', + 'object_inputStickeredMediaDocument_param_id_type_InputDocument' => 'ID', + 'object_game' => 'Game', + 'object_game_param_id_type_long' => 'ID', + 'object_game_param_access_hash_type_long' => 'Access hash', + 'object_game_param_short_name_type_string' => 'Short name', + 'object_game_param_title_type_string' => 'Title', + 'object_game_param_description_type_string' => 'Description', + 'object_game_param_photo_type_Photo' => 'Photo', + 'object_game_param_document_type_Document' => 'Document', + 'object_inputGameID' => 'Game ID', + 'object_inputGameID_param_id_type_long' => 'ID', + 'object_inputGameID_param_access_hash_type_long' => 'Access hash', + 'object_inputGameShortName' => 'Game short name', + 'object_inputGameShortName_param_bot_id_type_InputUser' => 'Bot ID', + 'object_inputGameShortName_param_short_name_type_string' => 'Short name', + 'object_highScore' => 'High score', + 'object_highScore_param_pos_type_int' => 'Pos', + 'object_highScore_param_user_id_type_int' => 'User ID', + 'object_highScore_param_score_type_int' => 'Score', + 'object_messages.highScores' => 'High scores', + 'object_messages.highScores_param_scores_type_Vector t' => 'Scores', + 'object_messages.highScores_param_users_type_Vector t' => 'Users', + 'object_textEmpty' => 'Empty text', + 'object_textPlain' => 'Text plain', + 'object_textPlain_param_text_type_string' => 'Text', + 'object_textBold' => 'Text bold', + 'object_textBold_param_text_type_RichText' => 'Text', + 'object_textItalic' => 'Text italic', + 'object_textItalic_param_text_type_RichText' => 'Text', + 'object_textUnderline' => 'Text underline', + 'object_textUnderline_param_text_type_RichText' => 'Text', + 'object_textStrike' => 'Text strike', + 'object_textStrike_param_text_type_RichText' => 'Text', + 'object_textFixed' => 'Text fixed', + 'object_textFixed_param_text_type_RichText' => 'Text', + 'object_textUrl' => 'Text URL', + 'object_textUrl_param_text_type_RichText' => 'Text', + 'object_textUrl_param_url_type_string' => 'URL', + 'object_textUrl_param_webpage_id_type_long' => 'Webpage ID', + 'object_textEmail' => 'Text email', + 'object_textEmail_param_text_type_RichText' => 'Text', + 'object_textEmail_param_email_type_string' => 'Email', + 'object_textConcat' => 'Text concat', + 'object_textConcat_param_texts_type_Vector t' => 'Texts', + 'object_pageBlockUnsupported' => 'Page block unsupported', + 'object_pageBlockTitle' => 'Page block title', + 'object_pageBlockTitle_param_text_type_RichText' => 'Text', + 'object_pageBlockSubtitle' => 'Page block subtitle', + 'object_pageBlockSubtitle_param_text_type_RichText' => 'Text', + 'object_pageBlockAuthorDate' => 'Page block author date', + 'object_pageBlockAuthorDate_param_author_type_RichText' => 'Author', + 'object_pageBlockAuthorDate_param_published_date_type_int' => 'Published date', + 'object_pageBlockHeader' => 'Page block header', + 'object_pageBlockHeader_param_text_type_RichText' => 'Text', + 'object_pageBlockSubheader' => 'Page block subheader', + 'object_pageBlockSubheader_param_text_type_RichText' => 'Text', + 'object_pageBlockFooter' => 'Page block footer', + 'object_pageBlockFooter_param_text_type_RichText' => 'Text', + 'object_pageBlockList' => 'Page block list', + 'object_pageBlockList_param_ordered_type_Bool' => 'Ordered?', + 'object_pageBlockList_param_items_type_Vector t' => 'Items', + 'object_pageBlockBlockquote' => 'Page block blockquote', + 'object_pageBlockBlockquote_param_text_type_RichText' => 'Text', + 'object_pageBlockBlockquote_param_caption_type_RichText' => 'Caption', + 'object_pageBlockPullquote' => 'Page block pullquote', + 'object_pageBlockPullquote_param_text_type_RichText' => 'Text', + 'object_pageBlockPullquote_param_caption_type_RichText' => 'Caption', + 'object_pageBlockPhoto' => 'Page block photo', + 'object_pageBlockPhoto_param_photo_id_type_long' => 'Photo ID', + 'object_pageBlockPhoto_param_caption_type_RichText' => 'Caption', + 'object_pageBlockVideo' => 'Page block video', + 'object_pageBlockVideo_param_autoplay_type_true' => 'Autoplay?', + 'object_pageBlockVideo_param_loop_type_true' => 'Loop?', + 'object_pageBlockVideo_param_video_id_type_long' => 'Video ID', + 'object_pageBlockVideo_param_caption_type_RichText' => 'Caption', + 'object_pageBlockEmbed' => 'Page block embed', + 'object_pageBlockEmbed_param_full_width_type_true' => 'Full width?', + 'object_pageBlockEmbed_param_allow_scrolling_type_true' => 'Allow scrolling?', + 'object_pageBlockEmbed_param_url_type_string' => 'URL', + 'object_pageBlockEmbed_param_html_type_string' => 'Html', + 'object_pageBlockEmbed_param_poster_photo_id_type_long' => 'Poster photo ID', + 'object_pageBlockEmbed_param_w_type_int' => 'Width', + 'object_pageBlockEmbed_param_h_type_int' => 'Height', + 'object_pageBlockEmbed_param_caption_type_RichText' => 'Caption', + 'object_pageBlockEmbedPost' => 'Page block embed post', + 'object_pageBlockEmbedPost_param_url_type_string' => 'URL', + 'object_pageBlockEmbedPost_param_webpage_id_type_long' => 'Webpage ID', + 'object_pageBlockEmbedPost_param_author_photo_id_type_long' => 'Author photo ID', + 'object_pageBlockEmbedPost_param_author_type_string' => 'Author', + 'object_pageBlockEmbedPost_param_date_type_int' => 'Date', + 'object_pageBlockEmbedPost_param_blocks_type_Vector t' => 'Blocks', + 'object_pageBlockEmbedPost_param_caption_type_RichText' => 'Caption', + 'object_pageBlockCollage' => 'Page block collage', + 'object_pageBlockCollage_param_items_type_Vector t' => 'Items', + 'object_pageBlockCollage_param_caption_type_RichText' => 'Caption', + 'object_pageBlockSlideshow' => 'Page block slideshow', + 'object_pageBlockSlideshow_param_items_type_Vector t' => 'Items', + 'object_pageBlockSlideshow_param_caption_type_RichText' => 'Caption', + 'object_pageBlockChannel' => 'Page block channel', + 'object_pageBlockChannel_param_channel_type_Chat' => 'Channel', + 'object_pageBlockAudio' => 'Page block audio', + 'object_pageBlockAudio_param_audio_id_type_long' => 'Audio ID', + 'object_pageBlockAudio_param_caption_type_RichText' => 'Caption', + 'object_pagePart' => 'Page part', + 'object_pagePart_param_blocks_type_Vector t' => 'Blocks', + 'object_pagePart_param_photos_type_Vector t' => 'Photos', + 'object_pagePart_param_documents_type_Vector t' => 'Documents', + 'object_pageFull' => 'Page full', + 'object_pageFull_param_blocks_type_Vector t' => 'Blocks', + 'object_pageFull_param_photos_type_Vector t' => 'Photos', + 'object_pageFull_param_documents_type_Vector t' => 'Documents', + 'object_phoneCallDiscardReasonMissed' => 'Phone call discard reason missed', + 'object_phoneCallDiscardReasonDisconnect' => 'Phone call discard reason disconnect', + 'object_phoneCallDiscardReasonHangup' => 'Phone call discard reason hangup', + 'object_phoneCallDiscardReasonBusy' => 'Phone call discard reason busy', + 'object_dataJSON' => 'Data json', + 'object_dataJSON_param_data_type_string' => 'Data', + 'object_labeledPrice' => 'Labeled price', + 'object_labeledPrice_param_label_type_string' => 'Label', + 'object_labeledPrice_param_amount_type_long' => 'Amount', + 'object_invoice' => 'Invoice', + 'object_invoice_param_test_type_true' => 'Test?', + 'object_invoice_param_name_requested_type_true' => 'Name requested?', + 'object_invoice_param_phone_requested_type_true' => 'Phone requested?', + 'object_invoice_param_email_requested_type_true' => 'Email requested?', + 'object_invoice_param_shipping_address_requested_type_true' => 'Shipping address requested?', + 'object_invoice_param_flexible_type_true' => 'Flexible?', + 'object_invoice_param_phone_to_provider_type_true' => 'Phone to provider?', + 'object_invoice_param_email_to_provider_type_true' => 'Email to provider?', + 'object_invoice_param_currency_type_string' => 'Currency', + 'object_invoice_param_prices_type_Vector t' => 'Prices', + 'object_paymentCharge' => 'Payment charge', + 'object_paymentCharge_param_id_type_string' => 'ID', + 'object_paymentCharge_param_provider_charge_id_type_string' => 'Provider charge ID', + 'object_postAddress' => 'Post address', + 'object_postAddress_param_street_line1_type_string' => 'Street line1', + 'object_postAddress_param_street_line2_type_string' => 'Street line2', + 'object_postAddress_param_city_type_string' => 'City', + 'object_postAddress_param_state_type_string' => 'State', + 'object_postAddress_param_country_iso2_type_string' => 'Country iso2', + 'object_postAddress_param_post_code_type_string' => 'Post code', + 'object_paymentRequestedInfo' => 'Payment requested info', + 'object_paymentRequestedInfo_param_name_type_string' => 'Name', + 'object_paymentRequestedInfo_param_phone_type_string' => 'Phone', + 'object_paymentRequestedInfo_param_email_type_string' => 'Email', + 'object_paymentRequestedInfo_param_shipping_address_type_PostAddress' => 'Shipping address', + 'object_paymentSavedCredentialsCard' => 'Payment saved credentials card', + 'object_paymentSavedCredentialsCard_param_id_type_string' => 'ID', + 'object_paymentSavedCredentialsCard_param_title_type_string' => 'Title', + 'object_webDocument' => 'Web document', + 'object_webDocument_param_url_type_string' => 'URL', + 'object_webDocument_param_access_hash_type_long' => 'Access hash', + 'object_webDocument_param_size_type_int' => 'Size', + 'object_webDocument_param_mime_type_type_string' => 'Mime type', + 'object_webDocument_param_attributes_type_Vector t' => 'Attributes', + 'object_webDocument_param_dc_id_type_int' => 'DC ID', + 'object_inputWebDocument' => 'Web document', + 'object_inputWebDocument_param_url_type_string' => 'URL', + 'object_inputWebDocument_param_size_type_int' => 'Size', + 'object_inputWebDocument_param_mime_type_type_string' => 'Mime type', + 'object_inputWebDocument_param_attributes_type_Vector t' => 'Attributes', + 'object_inputWebFileLocation' => 'Web file location', + 'object_inputWebFileLocation_param_url_type_string' => 'URL', + 'object_inputWebFileLocation_param_access_hash_type_long' => 'Access hash', + 'object_upload.webFile' => 'Web file', + 'object_upload.webFile_param_size_type_int' => 'Size', + 'object_upload.webFile_param_mime_type_type_string' => 'Mime type', + 'object_upload.webFile_param_file_type_type_storage.FileType' => 'File type', + 'object_upload.webFile_param_mtime_type_int' => 'Mtime', + 'object_upload.webFile_param_bytes_type_bytes' => 'Bytes', + 'object_payments.paymentForm' => 'Payment form', + 'object_payments.paymentForm_param_can_save_credentials_type_true' => 'Can save credentials?', + 'object_payments.paymentForm_param_password_missing_type_true' => 'Password missing?', + 'object_payments.paymentForm_param_bot_id_type_int' => 'Bot ID', + 'object_payments.paymentForm_param_invoice_type_Invoice' => 'Invoice', + 'object_payments.paymentForm_param_provider_id_type_int' => 'Provider ID', + 'object_payments.paymentForm_param_url_type_string' => 'URL', + 'object_payments.paymentForm_param_native_provider_type_string' => 'Native provider', + 'object_payments.paymentForm_param_native_params_type_DataJSON' => 'Native params', + 'object_payments.paymentForm_param_saved_info_type_PaymentRequestedInfo' => 'Saved info', + 'object_payments.paymentForm_param_saved_credentials_type_PaymentSavedCredentials' => 'Saved credentials', + 'object_payments.paymentForm_param_users_type_Vector t' => 'Users', + 'object_payments.validatedRequestedInfo' => 'Validated requested info', + 'object_payments.validatedRequestedInfo_param_id_type_string' => 'ID', + 'object_payments.validatedRequestedInfo_param_shipping_options_type_Vector t' => 'Shipping options', + 'object_payments.paymentResult' => 'Payment result', + 'object_payments.paymentResult_param_updates_type_Updates' => 'Updates', + 'object_payments.paymentVerficationNeeded' => 'Payment verfication needed', + 'object_payments.paymentVerficationNeeded_param_url_type_string' => 'URL', + 'object_payments.paymentReceipt' => 'Payment receipt', + 'object_payments.paymentReceipt_param_date_type_int' => 'Date', + 'object_payments.paymentReceipt_param_bot_id_type_int' => 'Bot ID', + 'object_payments.paymentReceipt_param_invoice_type_Invoice' => 'Invoice', + 'object_payments.paymentReceipt_param_provider_id_type_int' => 'Provider ID', + 'object_payments.paymentReceipt_param_info_type_PaymentRequestedInfo' => 'Info', + 'object_payments.paymentReceipt_param_shipping_type_ShippingOption' => 'Shipping', + 'object_payments.paymentReceipt_param_currency_type_string' => 'Currency', + 'object_payments.paymentReceipt_param_total_amount_type_long' => 'Total amount', + 'object_payments.paymentReceipt_param_credentials_title_type_string' => 'Credentials title', + 'object_payments.paymentReceipt_param_users_type_Vector t' => 'Users', + 'object_payments.savedInfo' => 'Saved info', + 'object_payments.savedInfo_param_has_saved_credentials_type_true' => 'Has saved credentials?', + 'object_payments.savedInfo_param_saved_info_type_PaymentRequestedInfo' => 'Saved info', + 'object_inputPaymentCredentialsSaved' => 'Payment credentials saved', + 'object_inputPaymentCredentialsSaved_param_id_type_string' => 'ID', + 'object_inputPaymentCredentialsSaved_param_tmp_password_type_bytes' => 'Tmp password', + 'object_inputPaymentCredentials' => 'Payment credentials', + 'object_inputPaymentCredentials_param_save_type_true' => 'Save?', + 'object_inputPaymentCredentials_param_data_type_DataJSON' => 'Data', + 'object_inputPaymentCredentialsApplePay' => 'Payment credentials apple pay', + 'object_inputPaymentCredentialsApplePay_param_payment_data_type_DataJSON' => 'Payment data', + 'object_inputPaymentCredentialsAndroidPay' => 'Payment credentials android pay', + 'object_inputPaymentCredentialsAndroidPay_param_payment_token_type_DataJSON' => 'Payment token', + 'object_inputPaymentCredentialsAndroidPay_param_google_transaction_id_type_string' => 'Google transaction ID', + 'object_account.tmpPassword' => 'Tmp password', + 'object_account.tmpPassword_param_tmp_password_type_bytes' => 'Tmp password', + 'object_account.tmpPassword_param_valid_until_type_int' => 'Valid until', + 'object_shippingOption' => 'Shipping option', + 'object_shippingOption_param_id_type_string' => 'ID', + 'object_shippingOption_param_title_type_string' => 'Title', + 'object_shippingOption_param_prices_type_Vector t' => 'Prices', + 'object_inputStickerSetItem' => 'Sticker set item', + 'object_inputStickerSetItem_param_document_type_InputDocument' => 'Document', + 'object_inputStickerSetItem_param_emoji_type_string' => 'Emoji', + 'object_inputStickerSetItem_param_mask_coords_type_MaskCoords' => 'Mask coords', + 'object_inputPhoneCall' => 'Phone call', + 'object_inputPhoneCall_param_id_type_long' => 'ID', + 'object_inputPhoneCall_param_access_hash_type_long' => 'Access hash', + 'object_phoneCallEmpty' => 'Empty phone call', + 'object_phoneCallEmpty_param_id_type_long' => 'ID', + 'object_phoneCallWaiting' => 'Phone call waiting', + 'object_phoneCallWaiting_param_id_type_long' => 'ID', + 'object_phoneCallWaiting_param_access_hash_type_long' => 'Access hash', + 'object_phoneCallWaiting_param_date_type_int' => 'Date', + 'object_phoneCallWaiting_param_admin_id_type_int' => 'Admin ID', + 'object_phoneCallWaiting_param_participant_id_type_int' => 'Participant ID', + 'object_phoneCallWaiting_param_protocol_type_PhoneCallProtocol' => 'Protocol', + 'object_phoneCallWaiting_param_receive_date_type_int' => 'Receive date', + 'object_phoneCallRequested' => 'Phone call requested', + 'object_phoneCallRequested_param_id_type_long' => 'ID', + 'object_phoneCallRequested_param_access_hash_type_long' => 'Access hash', + 'object_phoneCallRequested_param_date_type_int' => 'Date', + 'object_phoneCallRequested_param_admin_id_type_int' => 'Admin ID', + 'object_phoneCallRequested_param_participant_id_type_int' => 'Participant ID', + 'object_phoneCallRequested_param_g_a_hash_type_bytes' => 'G a hash', + 'object_phoneCallRequested_param_protocol_type_PhoneCallProtocol' => 'Protocol', + 'object_phoneCallAccepted' => 'Phone call accepted', + 'object_phoneCallAccepted_param_id_type_long' => 'ID', + 'object_phoneCallAccepted_param_access_hash_type_long' => 'Access hash', + 'object_phoneCallAccepted_param_date_type_int' => 'Date', + 'object_phoneCallAccepted_param_admin_id_type_int' => 'Admin ID', + 'object_phoneCallAccepted_param_participant_id_type_int' => 'Participant ID', + 'object_phoneCallAccepted_param_g_b_type_bytes' => 'G b', + 'object_phoneCallAccepted_param_protocol_type_PhoneCallProtocol' => 'Protocol', + 'object_phoneCall' => 'Phone call', + 'object_phoneCall_param_id_type_long' => 'ID', + 'object_phoneCall_param_access_hash_type_long' => 'Access hash', + 'object_phoneCall_param_date_type_int' => 'Date', + 'object_phoneCall_param_admin_id_type_int' => 'Admin ID', + 'object_phoneCall_param_participant_id_type_int' => 'Participant ID', + 'object_phoneCall_param_g_a_or_b_type_bytes' => 'G a or b', + 'object_phoneCall_param_key_fingerprint_type_long' => 'Key fingerprint', + 'object_phoneCall_param_protocol_type_PhoneCallProtocol' => 'Protocol', + 'object_phoneCall_param_connection_type_PhoneConnection' => 'Connection', + 'object_phoneCall_param_alternative_connections_type_Vector t' => 'Alternative connections', + 'object_phoneCall_param_start_date_type_int' => 'Start date', + 'object_phoneCallDiscarded' => 'Phone call discarded', + 'object_phoneCallDiscarded_param_need_rating_type_true' => 'Need rating?', + 'object_phoneCallDiscarded_param_need_debug_type_true' => 'Need debug?', + 'object_phoneCallDiscarded_param_id_type_long' => 'ID', + 'object_phoneCallDiscarded_param_reason_type_PhoneCallDiscardReason' => 'Reason', + 'object_phoneCallDiscarded_param_duration_type_int' => 'Duration', + 'object_phoneConnection' => 'Phone connection', + 'object_phoneConnection_param_id_type_long' => 'ID', + 'object_phoneConnection_param_ip_type_string' => 'Ip', + 'object_phoneConnection_param_ipv6_type_string' => 'Ipv6', + 'object_phoneConnection_param_port_type_int' => 'Port', + 'object_phoneConnection_param_peer_tag_type_bytes' => 'Peer tag', + 'object_phoneCallProtocol' => 'Phone call protocol', + 'object_phoneCallProtocol_param_udp_p2p_type_true' => 'Udp p2p?', + 'object_phoneCallProtocol_param_udp_reflector_type_true' => 'Udp reflector?', + 'object_phoneCallProtocol_param_min_layer_type_int' => 'Min layer', + 'object_phoneCallProtocol_param_max_layer_type_int' => 'Max layer', + 'object_phone.phoneCall' => 'Phone call', + 'object_phone.phoneCall_param_phone_call_type_PhoneCall' => 'Phone call', + 'object_phone.phoneCall_param_users_type_Vector t' => 'Users', + 'object_upload.cdnFileReuploadNeeded' => 'Cdn file reupload needed', + 'object_upload.cdnFileReuploadNeeded_param_request_token_type_bytes' => 'Request token', + 'object_upload.cdnFile' => 'Cdn file', + 'object_upload.cdnFile_param_bytes_type_bytes' => 'Bytes', + 'object_cdnPublicKey' => 'Cdn public key', + 'object_cdnPublicKey_param_dc_id_type_int' => 'DC ID', + 'object_cdnPublicKey_param_public_key_type_string' => 'Public key', + 'object_cdnConfig' => 'CDN configuration', + 'object_cdnConfig_param_public_keys_type_Vector t' => 'Public keys', + 'object_langPackString' => 'Lang pack string', + 'object_langPackString_param_key_type_string' => 'Key', + 'object_langPackString_param_value_type_string' => 'Value', + 'object_langPackStringPluralized' => 'Lang pack string pluralized', + 'object_langPackStringPluralized_param_key_type_string' => 'Key', + 'object_langPackStringPluralized_param_zero_value_type_string' => 'Zero value', + 'object_langPackStringPluralized_param_one_value_type_string' => 'One value', + 'object_langPackStringPluralized_param_two_value_type_string' => 'Two value', + 'object_langPackStringPluralized_param_few_value_type_string' => 'Few value', + 'object_langPackStringPluralized_param_many_value_type_string' => 'Many value', + 'object_langPackStringPluralized_param_other_value_type_string' => 'Other value', + 'object_langPackStringDeleted' => 'Lang pack string deleted', + 'object_langPackStringDeleted_param_key_type_string' => 'Key', + 'object_langPackDifference' => 'Lang pack difference', + 'object_langPackDifference_param_lang_code_type_string' => 'Lang code', + 'object_langPackDifference_param_from_version_type_int' => 'From version', + 'object_langPackDifference_param_version_type_int' => 'Version', + 'object_langPackDifference_param_strings_type_Vector t' => 'Strings', + 'object_langPackLanguage' => 'Lang pack language', + 'object_langPackLanguage_param_name_type_string' => 'Name', + 'object_langPackLanguage_param_native_name_type_string' => 'Native name', + 'object_langPackLanguage_param_lang_code_type_string' => 'Lang code', + 'object_channelAdminRights' => 'Admin rights', + 'object_channelAdminRights_param_change_info_type_true' => 'Change info', + 'object_channelAdminRights_param_post_messages_type_true' => 'Post messages', + 'object_channelAdminRights_param_edit_messages_type_true' => 'Edit messages', + 'object_channelAdminRights_param_delete_messages_type_true' => 'Delete messages', + 'object_channelAdminRights_param_ban_users_type_true' => 'Ban users', + 'object_channelAdminRights_param_invite_users_type_true' => 'Invite users', + 'object_channelAdminRights_param_invite_link_type_true' => 'Generate an invite link', + 'object_channelAdminRights_param_pin_messages_type_true' => 'Pin messages', + 'object_channelAdminRights_param_add_admins_type_true' => 'Add other admins', + 'object_channelBannedRights' => 'Banned user rights (when true, the user will NOT be able to do that thing)', + 'object_channelBannedRights_param_view_messages_type_true' => 'Disallow viewing messages', + 'object_channelBannedRights_param_send_messages_type_true' => 'Disallow sending messages', + 'object_channelBannedRights_param_send_media_type_true' => 'Disallow sending media', + 'object_channelBannedRights_param_send_stickers_type_true' => 'Disallow sending stickers', + 'object_channelBannedRights_param_send_gifs_type_true' => 'Disallow sending gifs', + 'object_channelBannedRights_param_send_games_type_true' => 'Disallow sending games', + 'object_channelBannedRights_param_send_inline_type_true' => 'Disallow sending inline keyboards', + 'object_channelBannedRights_param_embed_links_type_true' => 'Disallow embedding links', + 'object_channelBannedRights_param_until_date_type_int' => 'Until date', + 'object_channelAdminLogEventActionChangeTitle' => 'Change title', + 'object_channelAdminLogEventActionChangeTitle_param_prev_value_type_string' => 'Previous value', + 'object_channelAdminLogEventActionChangeTitle_param_new_value_type_string' => 'New value', + 'object_channelAdminLogEventActionChangeAbout' => 'Change about text', + 'object_channelAdminLogEventActionChangeAbout_param_prev_value_type_string' => 'Previous value', + 'object_channelAdminLogEventActionChangeAbout_param_new_value_type_string' => 'New value', + 'object_channelAdminLogEventActionChangeUsername' => 'Change username', + 'object_channelAdminLogEventActionChangeUsername_param_prev_value_type_string' => 'Prev value', + 'object_channelAdminLogEventActionChangeUsername_param_new_value_type_string' => 'New value', + 'object_channelAdminLogEventActionChangePhoto' => 'Change photo', + 'object_channelAdminLogEventActionChangePhoto_param_prev_photo_type_ChatPhoto' => 'Previous photo', + 'object_channelAdminLogEventActionChangePhoto_param_new_photo_type_ChatPhoto' => 'New photo', + 'object_channelAdminLogEventActionToggleInvites' => 'Invite setting toggled', + 'object_channelAdminLogEventActionToggleInvites_param_new_value_type_Bool' => 'New value', + 'object_channelAdminLogEventActionToggleSignatures' => 'Toggle channel signatures', + 'object_channelAdminLogEventActionToggleSignatures_param_new_value_type_Bool' => 'New value?', + 'object_channelAdminLogEventActionUpdatePinned' => 'Message pinned', + 'object_channelAdminLogEventActionUpdatePinned_param_message_type_Message' => 'Message', + 'object_channelAdminLogEventActionEditMessage' => 'Edit message', + 'object_channelAdminLogEventActionEditMessage_param_prev_message_type_Message' => 'Prev message', + 'object_channelAdminLogEventActionEditMessage_param_new_message_type_Message' => 'New message', + 'object_channelAdminLogEventActionDeleteMessage' => 'Delete message', + 'object_channelAdminLogEventActionDeleteMessage_param_message_type_Message' => 'Message', + 'object_channelAdminLogEventActionParticipantJoin' => 'Joined participant', + 'object_channelAdminLogEventActionParticipantLeave' => 'Left participant', + 'object_channelAdminLogEventActionParticipantInvite' => 'Invite participant', + 'object_channelAdminLogEventActionParticipantInvite_param_participant_type_ChannelParticipant' => 'Participant', + 'object_channelAdminLogEventActionParticipantToggleBan' => 'User banned', + 'object_channelAdminLogEventActionParticipantToggleBan_param_prev_participant_type_ChannelParticipant' => 'Prev participant', + 'object_channelAdminLogEventActionParticipantToggleBan_param_new_participant_type_ChannelParticipant' => 'New participant', + 'object_channelAdminLogEventActionParticipantToggleAdmin' => 'Admin toggled', + 'object_channelAdminLogEventActionParticipantToggleAdmin_param_prev_participant_type_ChannelParticipant' => 'Prev participant', + 'object_channelAdminLogEventActionParticipantToggleAdmin_param_new_participant_type_ChannelParticipant' => 'New participant', + 'object_channelAdminLogEventActionChangeStickerSet' => 'Change stickerset', + 'object_channelAdminLogEventActionChangeStickerSet_param_prev_stickerset_type_InputStickerSet' => 'Previous stickerset', + 'object_channelAdminLogEventActionChangeStickerSet_param_new_stickerset_type_InputStickerSet' => 'New stickerset', + 'object_channelAdminLogEventActionTogglePreHistoryHidden' => 'Previous history hidden', + 'object_channelAdminLogEventActionTogglePreHistoryHidden_param_new_value_type_Bool' => 'New value', + 'object_channelAdminLogEvent' => 'Channel admin log event', + 'object_channelAdminLogEvent_param_id_type_long' => 'ID', + 'object_channelAdminLogEvent_param_date_type_int' => 'Date', + 'object_channelAdminLogEvent_param_user_id_type_int' => 'User ID', + 'object_channelAdminLogEvent_param_action_type_ChannelAdminLogEventAction' => 'Action', + 'object_channels.adminLogResults' => 'Admin log results', + 'object_channels.adminLogResults_param_events_type_Vector t' => 'Events', + 'object_channels.adminLogResults_param_chats_type_Vector t' => 'Chats', + 'object_channels.adminLogResults_param_users_type_Vector t' => 'Users', + 'object_channelAdminLogEventsFilter' => 'Event filter', + 'object_channelAdminLogEventsFilter_param_join_type_true' => 'Join users events', + 'object_channelAdminLogEventsFilter_param_leave_type_true' => 'Left users events', + 'object_channelAdminLogEventsFilter_param_invite_type_true' => 'Invite users events', + 'object_channelAdminLogEventsFilter_param_ban_type_true' => 'Ban events', + 'object_channelAdminLogEventsFilter_param_unban_type_true' => 'Unban events', + 'object_channelAdminLogEventsFilter_param_kick_type_true' => 'Kicked users events', + 'object_channelAdminLogEventsFilter_param_unkick_type_true' => 'Unkick events', + 'object_channelAdminLogEventsFilter_param_promote_type_true' => 'Admin promotion events', + 'object_channelAdminLogEventsFilter_param_demote_type_true' => 'Demote admin events', + 'object_channelAdminLogEventsFilter_param_info_type_true' => 'Change info events', + 'object_channelAdminLogEventsFilter_param_settings_type_true' => 'Setting changes', + 'object_channelAdminLogEventsFilter_param_pinned_type_true' => 'Pinned message events', + 'object_channelAdminLogEventsFilter_param_edit_type_true' => 'Edit message events', + 'object_channelAdminLogEventsFilter_param_delete_type_true' => 'Delete message events', + 'object_popularContact' => 'Popular contact', + 'object_popularContact_param_client_id_type_long' => 'Client ID', + 'object_popularContact_param_importers_type_int' => 'Importers', + 'object_cdnFileHash' => 'CDN file hash', + 'object_cdnFileHash_param_offset_type_int' => 'Offset', + 'object_cdnFileHash_param_limit_type_int' => 'Limit', + 'object_cdnFileHash_param_hash_type_bytes' => 'Hash', + 'object_messages.favedStickersNotModified' => 'Faved stickers not modified', + 'object_messages.favedStickers' => 'Faved stickers', + 'object_messages.favedStickers_param_hash_type_int' => 'Hash', + 'object_messages.favedStickers_param_packs_type_Vector t' => 'Packs', + 'object_messages.favedStickers_param_stickers_type_Vector t' => 'Stickers', + 'object_recentMeUrlUnknown' => 'Recent me URL unknown', + 'object_recentMeUrlUnknown_param_url_type_string' => 'URL', + 'object_recentMeUrlUser' => 'Recent me URL user', + 'object_recentMeUrlUser_param_url_type_string' => 'URL', + 'object_recentMeUrlUser_param_user_id_type_int' => 'User ID', + 'object_recentMeUrlChat' => 'Recent me URL chat', + 'object_recentMeUrlChat_param_url_type_string' => 'URL', + 'object_recentMeUrlChat_param_chat_id_type_int' => 'Chat ID', + 'object_recentMeUrlChatInvite' => 'Recent me URL chat invite', + 'object_recentMeUrlChatInvite_param_url_type_string' => 'URL', + 'object_recentMeUrlChatInvite_param_chat_invite_type_ChatInvite' => 'Chat invite', + 'object_recentMeUrlStickerSet' => 'Recent me URL sticker set', + 'object_recentMeUrlStickerSet_param_url_type_string' => 'URL', + 'object_recentMeUrlStickerSet_param_set_type_StickerSetCovered' => 'Set', + 'object_help.recentMeUrls' => 'Recent me URLs', + 'object_help.recentMeUrls_param_urls_type_Vector t' => 'URLs', + 'object_help.recentMeUrls_param_chats_type_Vector t' => 'Chats', + 'object_help.recentMeUrls_param_users_type_Vector t' => 'Users', + 'object_inputSingleMedia' => 'Single media', + 'object_inputSingleMedia_param_media_type_InputMedia' => 'Media', + 'object_inputSingleMedia_param_message_type_string' => 'Message', + 'object_inputSingleMedia_param_entities_type_Vector t' => 'Entities', + 'object_webAuthorization' => 'Web authorization', + 'object_webAuthorization_param_hash_type_long' => 'Hash', + 'object_webAuthorization_param_bot_id_type_int' => 'Bot ID', + 'object_webAuthorization_param_domain_type_string' => 'Domain', + 'object_webAuthorization_param_browser_type_string' => 'Browser', + 'object_webAuthorization_param_platform_type_string' => 'Platform', + 'object_webAuthorization_param_date_created_type_int' => 'Date created', + 'object_webAuthorization_param_date_active_type_int' => 'Date active', + 'object_webAuthorization_param_ip_type_string' => 'Ip', + 'object_webAuthorization_param_region_type_string' => 'Region', + 'object_account.webAuthorizations' => 'Telegram login authorizations', + 'object_account.webAuthorizations_param_authorizations_type_Vector t' => 'Authorizations', + 'object_account.webAuthorizations_param_users_type_Vector t' => 'Users', + 'object_inputMessageID' => 'Message ID', + 'object_inputMessageID_param_id_type_int' => 'ID', + 'object_inputMessageReplyTo' => 'Message reply to', + 'object_inputMessageReplyTo_param_id_type_int' => 'ID', + 'object_inputMessagePinned' => 'Message pinned', + 'object_decryptedDataBlock' => 'Decrypted data block', + 'object_decryptedDataBlock_param_voice_call_id_type_int128' => 'Voice call ID', + 'object_decryptedDataBlock_param_in_seq_no_type_int' => 'In seq no', + 'object_decryptedDataBlock_param_out_seq_no_type_int' => 'Out seq no', + 'object_decryptedDataBlock_param_recent_received_mask_type_int' => 'Recent received mask', + 'object_decryptedDataBlock_param_proto_type_int' => 'Proto', + 'object_decryptedDataBlock_param_extra_type_string' => 'Extra', + 'object_decryptedDataBlock_param_raw_data_type_string' => 'Raw data', + 'object_simpleDataBlock' => 'Simple data block', + 'object_simpleDataBlock_param_raw_data_type_string' => 'Raw data', + 'object_decryptedMessage' => 'Decrypted message', + 'object_decryptedMessage_param_message_type_string' => 'Message', + 'object_decryptedMessage_param_media_type_DecryptedMessageMedia' => 'Media', + 'object_decryptedMessageService' => 'Decrypted message service', + 'object_decryptedMessageService_param_action_type_DecryptedMessageAction' => 'Action', + 'object_decryptedMessageMediaEmpty' => 'Empty decrypted message media', + 'object_decryptedMessageMediaPhoto' => 'Decrypted message media photo', + 'object_decryptedMessageMediaPhoto_param_thumb_type_bytes' => 'Thumbnail', + 'object_decryptedMessageMediaPhoto_param_thumb_w_type_int' => 'Thumbnail width', + 'object_decryptedMessageMediaPhoto_param_thumb_h_type_int' => 'Thumbnail height', + 'object_decryptedMessageMediaPhoto_param_w_type_int' => 'Width', + 'object_decryptedMessageMediaPhoto_param_h_type_int' => 'Height', + 'object_decryptedMessageMediaPhoto_param_size_type_int' => 'Size', + 'object_decryptedMessageMediaPhoto_param_key_type_bytes' => 'Key', + 'object_decryptedMessageMediaPhoto_param_iv_type_bytes' => 'Iv', + 'object_decryptedMessageMediaVideo' => 'Decrypted message media video', + 'object_decryptedMessageMediaVideo_param_thumb_type_bytes' => 'Thumbnail', + 'object_decryptedMessageMediaVideo_param_thumb_w_type_int' => 'Thumbnail width', + 'object_decryptedMessageMediaVideo_param_thumb_h_type_int' => 'Thumbnail height', + 'object_decryptedMessageMediaVideo_param_duration_type_int' => 'Duration', + 'object_decryptedMessageMediaVideo_param_w_type_int' => 'Width', + 'object_decryptedMessageMediaVideo_param_h_type_int' => 'Height', + 'object_decryptedMessageMediaVideo_param_size_type_int' => 'Size', + 'object_decryptedMessageMediaVideo_param_key_type_bytes' => 'Key', + 'object_decryptedMessageMediaVideo_param_iv_type_bytes' => 'Iv', + 'object_decryptedMessageMediaGeoPoint' => 'Decrypted message media geo point', + 'object_decryptedMessageMediaGeoPoint_param_lat_type_double' => 'Lat', + 'object_decryptedMessageMediaGeoPoint_param_long_type_double' => 'Long', + 'object_decryptedMessageMediaContact' => 'Decrypted message media contact', + 'object_decryptedMessageMediaContact_param_phone_number_type_string' => 'Phone number', + 'object_decryptedMessageMediaContact_param_first_name_type_string' => 'First name', + 'object_decryptedMessageMediaContact_param_last_name_type_string' => 'Last name', + 'object_decryptedMessageMediaContact_param_user_id_type_int' => 'User ID', + 'object_decryptedMessageActionSetMessageTTL' => 'Decrypted message action set message ttl', + 'object_decryptedMessageActionSetMessageTTL_param_ttl_seconds_type_int' => 'Ttl seconds', + 'object_decryptedMessageMediaDocument' => 'Decrypted message media document', + 'object_decryptedMessageMediaDocument_param_thumb_type_bytes' => 'Thumbnail', + 'object_decryptedMessageMediaDocument_param_thumb_w_type_int' => 'Thumbnail w', + 'object_decryptedMessageMediaDocument_param_thumb_h_type_int' => 'Thumbnail h', + 'object_decryptedMessageMediaDocument_param_file_name_type_string' => 'File name', + 'object_decryptedMessageMediaDocument_param_mime_type_type_string' => 'Mime type', + 'object_decryptedMessageMediaDocument_param_size_type_int' => 'Size', + 'object_decryptedMessageMediaDocument_param_key_type_bytes' => 'Key', + 'object_decryptedMessageMediaDocument_param_iv_type_bytes' => 'Iv', + 'object_decryptedMessageMediaAudio' => 'Decrypted message media audio', + 'object_decryptedMessageMediaAudio_param_duration_type_int' => 'Duration', + 'object_decryptedMessageMediaAudio_param_size_type_int' => 'Size', + 'object_decryptedMessageMediaAudio_param_key_type_bytes' => 'Key', + 'object_decryptedMessageMediaAudio_param_iv_type_bytes' => 'Iv', + 'object_decryptedMessageActionReadMessages' => 'Decrypted message action read messages', + 'object_decryptedMessageActionReadMessages_param_random_ids_type_Vector t' => 'Random IDs', + 'object_decryptedMessageActionDeleteMessages' => 'Decrypted message action delete messages', + 'object_decryptedMessageActionDeleteMessages_param_random_ids_type_Vector t' => 'Random IDs', + 'object_decryptedMessageActionScreenshotMessages' => 'Decrypted message action screenshot messages', + 'object_decryptedMessageActionScreenshotMessages_param_random_ids_type_Vector t' => 'Random IDs', + 'object_decryptedMessageActionFlushHistory' => 'Decrypted message action flush history', + 'object_decryptedMessage_param_ttl_type_int' => 'Ttl', + 'object_decryptedMessageMediaVideo_param_mime_type_type_string' => 'Mime type', + 'object_decryptedMessageMediaAudio_param_mime_type_type_string' => 'Mime type', + 'object_decryptedMessageLayer' => 'Decrypted message layer', + 'object_decryptedMessageLayer_param_layer_type_int' => 'Layer', + 'object_decryptedMessageLayer_param_in_seq_no_type_int' => 'In seq no', + 'object_decryptedMessageLayer_param_out_seq_no_type_int' => 'Out seq no', + 'object_decryptedMessageLayer_param_message_type_DecryptedMessage' => 'Message', + 'object_decryptedMessageActionResend' => 'Decrypted message action resend', + 'object_decryptedMessageActionResend_param_start_seq_no_type_int' => 'Start seq no', + 'object_decryptedMessageActionResend_param_end_seq_no_type_int' => 'End seq no', + 'object_decryptedMessageActionNotifyLayer' => 'Decrypted message action notify layer', + 'object_decryptedMessageActionNotifyLayer_param_layer_type_int' => 'Layer', + 'object_decryptedMessageActionTyping' => 'Decrypted message action typing', + 'object_decryptedMessageActionTyping_param_action_type_SendMessageAction' => 'Action', + 'object_decryptedMessageActionRequestKey' => 'Decrypted message action request key', + 'object_decryptedMessageActionRequestKey_param_exchange_id_type_long' => 'Exchange ID', + 'object_decryptedMessageActionRequestKey_param_g_a_type_bytes' => 'G a', + 'object_decryptedMessageActionAcceptKey' => 'Decrypted message action accept key', + 'object_decryptedMessageActionAcceptKey_param_exchange_id_type_long' => 'Exchange ID', + 'object_decryptedMessageActionAcceptKey_param_g_b_type_bytes' => 'G b', + 'object_decryptedMessageActionAcceptKey_param_key_fingerprint_type_long' => 'Key fingerprint', + 'object_decryptedMessageActionAbortKey' => 'Decrypted message action abort key', + 'object_decryptedMessageActionAbortKey_param_exchange_id_type_long' => 'Exchange ID', + 'object_decryptedMessageActionCommitKey' => 'Decrypted message action commit key', + 'object_decryptedMessageActionCommitKey_param_exchange_id_type_long' => 'Exchange ID', + 'object_decryptedMessageActionCommitKey_param_key_fingerprint_type_long' => 'Key fingerprint', + 'object_decryptedMessageActionNoop' => 'Decrypted message action noop', + 'object_decryptedMessageMediaExternalDocument' => 'Decrypted message media external document', + 'object_decryptedMessageMediaExternalDocument_param_id_type_long' => 'ID', + 'object_decryptedMessageMediaExternalDocument_param_access_hash_type_long' => 'Access hash', + 'object_decryptedMessageMediaExternalDocument_param_date_type_int' => 'Date', + 'object_decryptedMessageMediaExternalDocument_param_mime_type_type_string' => 'Mime type', + 'object_decryptedMessageMediaExternalDocument_param_size_type_int' => 'Size', + 'object_decryptedMessageMediaExternalDocument_param_thumb_type_PhotoSize' => 'Thumbnail', + 'object_decryptedMessageMediaExternalDocument_param_dc_id_type_int' => 'DC ID', + 'object_decryptedMessageMediaExternalDocument_param_attributes_type_Vector t' => 'Attributes', + 'object_decryptedMessage_param_entities_type_Vector t' => 'Entities', + 'object_decryptedMessage_param_via_bot_name_type_string' => 'Via bot name', + 'object_decryptedMessage_param_reply_to_random_id_type_long' => 'Reply to random ID', + 'object_decryptedMessageMediaPhoto_param_caption_type_string' => 'Caption', + 'object_decryptedMessageMediaVideo_param_caption_type_string' => 'Caption', + 'object_decryptedMessageMediaDocument_param_attributes_type_Vector t' => 'Attributes', + 'object_decryptedMessageMediaDocument_param_caption_type_string' => 'Caption', + 'object_decryptedMessageMediaVenue' => 'Decrypted message media venue', + 'object_decryptedMessageMediaVenue_param_lat_type_double' => 'Lat', + 'object_decryptedMessageMediaVenue_param_long_type_double' => 'Long', + 'object_decryptedMessageMediaVenue_param_title_type_string' => 'Title', + 'object_decryptedMessageMediaVenue_param_address_type_string' => 'Address', + 'object_decryptedMessageMediaVenue_param_provider_type_string' => 'Provider', + 'object_decryptedMessageMediaVenue_param_venue_id_type_string' => 'Venue ID', + 'object_decryptedMessageMediaWebPage' => 'Decrypted message media web page', + 'object_decryptedMessageMediaWebPage_param_url_type_string' => 'URL', + 'object_decryptedMessage_param_grouped_id_type_long' => 'Grouped ID', + 'object_inputPeerContact' => 'Peer contact', + 'object_inputPeerContact_param_user_id_type_int' => 'User ID', + 'object_inputPeerForeign' => 'Peer foreign', + 'object_inputPeerForeign_param_user_id_type_int' => 'User ID', + 'object_inputPeerForeign_param_access_hash_type_long' => 'Access hash', + 'object_inputUserContact' => 'User contact', + 'object_inputUserContact_param_user_id_type_int' => 'User ID', + 'object_inputUserForeign' => 'User foreign', + 'object_inputUserForeign_param_user_id_type_int' => 'User ID', + 'object_inputUserForeign_param_access_hash_type_long' => 'Access hash', + 'object_inputMediaUploadedVideo' => 'Media uploaded video', + 'object_inputMediaUploadedVideo_param_file_type_InputFile' => 'File', + 'object_inputMediaUploadedVideo_param_duration_type_int' => 'Duration', + 'object_inputMediaUploadedVideo_param_w_type_int' => 'Width', + 'object_inputMediaUploadedVideo_param_h_type_int' => 'Height', + 'object_inputMediaUploadedVideo_param_mime_type_type_string' => 'Mime type', + 'object_inputMediaUploadedThumbVideo' => 'Media uploaded thumb video', + 'object_inputMediaUploadedThumbVideo_param_file_type_InputFile' => 'File', + 'object_inputMediaUploadedThumbVideo_param_thumb_type_InputFile' => 'Thumbnail', + 'object_inputMediaUploadedThumbVideo_param_duration_type_int' => 'Duration', + 'object_inputMediaUploadedThumbVideo_param_w_type_int' => 'Width', + 'object_inputMediaUploadedThumbVideo_param_h_type_int' => 'Height', + 'object_inputMediaUploadedThumbVideo_param_mime_type_type_string' => 'Mime type', + 'object_inputMediaVideo' => 'Media video', + 'object_inputMediaVideo_param_id_type_InputVideo' => 'ID', + 'object_inputChatUploadedPhoto_param_crop_type_InputPhotoCrop' => 'Crop', + 'object_inputChatPhoto_param_crop_type_InputPhotoCrop' => 'Crop', + 'object_inputVideoEmpty' => 'Empty input video', + 'object_inputVideo' => 'Video', + 'object_inputVideo_param_id_type_long' => 'ID', + 'object_inputVideo_param_access_hash_type_long' => 'Access hash', + 'object_inputVideoFileLocation' => 'Video file location', + 'object_inputVideoFileLocation_param_id_type_long' => 'ID', + 'object_inputVideoFileLocation_param_access_hash_type_long' => 'Access hash', + 'object_inputPhotoCropAuto' => 'Photo crop auto', + 'object_inputPhotoCrop' => 'Photo crop', + 'object_inputPhotoCrop_param_crop_left_type_double' => 'Crop left', + 'object_inputPhotoCrop_param_crop_top_type_double' => 'Crop top', + 'object_inputPhotoCrop_param_crop_width_type_double' => 'Crop width', + 'object_userSelf' => 'User self', + 'object_userSelf_param_id_type_int' => 'ID', + 'object_userSelf_param_first_name_type_string' => 'First name', + 'object_userSelf_param_last_name_type_string' => 'Last name', + 'object_userSelf_param_username_type_string' => 'Username', + 'object_userSelf_param_phone_type_string' => 'Phone', + 'object_userSelf_param_photo_type_UserProfilePhoto' => 'Photo', + 'object_userSelf_param_status_type_UserStatus' => 'Status', + 'object_userSelf_param_inactive_type_Bool' => 'Inactive?', + 'object_userContact' => 'User contact', + 'object_userContact_param_id_type_int' => 'ID', + 'object_userContact_param_first_name_type_string' => 'First name', + 'object_userContact_param_last_name_type_string' => 'Last name', + 'object_userContact_param_username_type_string' => 'Username', + 'object_userContact_param_access_hash_type_long' => 'Access hash', + 'object_userContact_param_phone_type_string' => 'Phone', + 'object_userContact_param_photo_type_UserProfilePhoto' => 'Photo', + 'object_userContact_param_status_type_UserStatus' => 'Status', + 'object_userRequest' => 'User request', + 'object_userRequest_param_id_type_int' => 'ID', + 'object_userRequest_param_first_name_type_string' => 'First name', + 'object_userRequest_param_last_name_type_string' => 'Last name', + 'object_userRequest_param_username_type_string' => 'Username', + 'object_userRequest_param_access_hash_type_long' => 'Access hash', + 'object_userRequest_param_phone_type_string' => 'Phone', + 'object_userRequest_param_photo_type_UserProfilePhoto' => 'Photo', + 'object_userRequest_param_status_type_UserStatus' => 'Status', + 'object_userForeign' => 'User foreign', + 'object_userForeign_param_id_type_int' => 'ID', + 'object_userForeign_param_first_name_type_string' => 'First name', + 'object_userForeign_param_last_name_type_string' => 'Last name', + 'object_userForeign_param_username_type_string' => 'Username', + 'object_userForeign_param_access_hash_type_long' => 'Access hash', + 'object_userForeign_param_photo_type_UserProfilePhoto' => 'Photo', + 'object_userForeign_param_status_type_UserStatus' => 'Status', + 'object_userDeleted' => 'User deleted', + 'object_userDeleted_param_id_type_int' => 'ID', + 'object_userDeleted_param_first_name_type_string' => 'First name', + 'object_userDeleted_param_last_name_type_string' => 'Last name', + 'object_userDeleted_param_username_type_string' => 'Username', + 'object_userStatusEmpty' => 'Empty user status', + 'object_userStatusOnline' => 'User status online', + 'object_userStatusOnline_param_expires_type_int' => 'Expires', + 'object_userStatusOffline' => 'User status offline', + 'object_userStatusOffline_param_was_online_type_int' => 'Was online', + 'object_chat_param_left_type_Bool' => 'Left?', + 'object_chatForbidden_param_date_type_int' => 'Date', + 'object_chatParticipants_param_admin_id_type_int' => 'Admin ID', + 'object_messageForwarded' => 'Message forwarded', + 'object_messageForwarded_param_id_type_int' => 'ID', + 'object_messageForwarded_param_fwd_from_id_type_int' => 'Forwarded from ID', + 'object_messageForwarded_param_fwd_date_type_int' => 'Forwarded date', + 'object_messageForwarded_param_from_id_type_int' => 'From ID', + 'object_messageForwarded_param_to_id_type_Peer' => 'To ID', + 'object_messageForwarded_param_date_type_int' => 'Date', + 'object_messageForwarded_param_message_type_string' => 'Message', + 'object_messageForwarded_param_media_type_MessageMedia' => 'Media', + 'object_messageMediaVideo' => 'Message media video', + 'object_messageMediaVideo_param_video_type_Video' => 'Video', + 'object_messageMediaUnsupported_param_bytes_type_bytes' => 'Bytes', + 'object_messageActionChatAddUser_param_user_id_type_int' => 'User ID', + 'object_photo_param_user_id_type_int' => 'User ID', + 'object_photo_param_caption_type_string' => 'Caption', + 'object_photo_param_geo_type_GeoPoint' => 'Geo', + 'object_videoEmpty' => 'Empty video', + 'object_videoEmpty_param_id_type_long' => 'ID', + 'object_video' => 'Video', + 'object_video_param_id_type_long' => 'ID', + 'object_video_param_access_hash_type_long' => 'Access hash', + 'object_video_param_user_id_type_int' => 'User ID', + 'object_video_param_date_type_int' => 'Date', + 'object_video_param_caption_type_string' => 'Caption', + 'object_video_param_duration_type_int' => 'Duration', + 'object_video_param_mime_type_type_string' => 'Mime type', + 'object_video_param_size_type_int' => 'Size', + 'object_video_param_thumb_type_PhotoSize' => 'Thumbnail', + 'object_video_param_dc_id_type_int' => 'DC ID', + 'object_video_param_w_type_int' => 'Width', + 'object_video_param_h_type_int' => 'Height', + 'object_auth.checkedPhone_param_phone_invited_type_Bool' => 'Phone invited?', + 'object_auth.sentCode_param_phone_registered_type_Bool' => 'Phone registered?', + 'object_auth.sentCode_param_send_call_timeout_type_int' => 'Send call timeout', + 'object_auth.sentCode_param_is_password_type_Bool' => 'Is password?', + 'object_auth.authorization_param_expires_type_int' => 'Expiration date', + 'object_inputPeerNotifySettings_param_show_previews_type_Bool' => 'Show previews?', + 'object_inputPeerNotifySettings_param_events_mask_type_int' => 'Events mask', + 'object_peerNotifySettings_param_show_previews_type_Bool' => 'Show previews?', + 'object_peerNotifySettings_param_events_mask_type_int' => 'Events mask', + 'object_userFull_param_blocked_type_Bool' => 'Blocked?', + 'object_userFull_param_real_first_name_type_string' => 'Real first name', + 'object_userFull_param_real_last_name_type_string' => 'Real last name', + 'object_contactSuggested' => 'Contact suggested', + 'object_contactSuggested_param_user_id_type_int' => 'User ID', + 'object_contactSuggested_param_mutual_contacts_type_int' => 'Mutual contacts', + 'object_contactStatus_param_expires_type_int' => 'Expires', + 'object_contacts.foreignLinkUnknown' => 'Foreign link unknown', + 'object_contacts.foreignLinkRequested' => 'Foreign link requested', + 'object_contacts.foreignLinkRequested_param_has_phone_type_Bool' => 'Has phone?', + 'object_contacts.foreignLinkMutual' => 'Foreign link mutual', + 'object_contacts.myLinkEmpty' => 'Empty my link', + 'object_contacts.myLinkRequested' => 'My link requested', + 'object_contacts.myLinkRequested_param_contact_type_Bool' => 'Contact?', + 'object_contacts.myLinkContact' => 'My link contact', + 'object_contacts.link_param_my_link_type_contacts.MyLink' => 'My link', + 'object_contacts.link_param_foreign_link_type_contacts.ForeignLink' => 'Foreign link', + 'object_contacts.suggested' => 'Suggested', + 'object_contacts.suggested_param_results_type_Vector t' => 'Results', + 'object_contacts.suggested_param_users_type_Vector t' => 'Users', + 'object_messages.statedMessages' => 'Stated messages', + 'object_messages.statedMessages_param_messages_type_Vector t' => 'Messages', + 'object_messages.statedMessages_param_chats_type_Vector t' => 'Chats', + 'object_messages.statedMessages_param_users_type_Vector t' => 'Users', + 'object_messages.statedMessages_param_pts_type_int' => 'Pts', + 'object_messages.statedMessages_param_seq_type_int' => 'Seq', + 'object_messages.statedMessage' => 'Stated message', + 'object_messages.statedMessage_param_message_type_Message' => 'Message', + 'object_messages.statedMessage_param_chats_type_Vector t' => 'Chats', + 'object_messages.statedMessage_param_users_type_Vector t' => 'Users', + 'object_messages.statedMessage_param_pts_type_int' => 'Pts', + 'object_messages.statedMessage_param_seq_type_int' => 'Seq', + 'object_messages.sentMessage' => 'Sent message', + 'object_messages.sentMessage_param_id_type_int' => 'ID', + 'object_messages.sentMessage_param_date_type_int' => 'Date', + 'object_messages.sentMessage_param_pts_type_int' => 'Pts', + 'object_messages.sentMessage_param_seq_type_int' => 'Seq', + 'object_messages.chats_param_users_type_Vector t' => 'Users', + 'object_messages.affectedHistory_param_seq_type_int' => 'Seq', + 'object_inputMessagesFilterPhotoVideoDocuments' => 'Messages filter photo video documents', + 'object_inputMessagesFilterAudio' => 'Messages filter audio', + 'object_inputMessagesFilterAudioDocuments' => 'Messages filter audio documents', + 'object_updateReadMessages' => 'Update read messages', + 'object_updateReadMessages_param_messages_type_Vector t' => 'Messages', + 'object_updateReadMessages_param_pts_type_int' => 'Pts', + 'object_updateUserStatus' => 'Update user status', + 'object_updateUserStatus_param_user_id_type_int' => 'User ID', + 'object_updateUserStatus_param_status_type_UserStatus' => 'Status', + 'object_updateContactLink_param_my_link_type_contacts.MyLink' => 'My link', + 'object_updateContactLink_param_foreign_link_type_contacts.ForeignLink' => 'Foreign link', + 'object_updateNewAuthorization' => 'Update new authorization', + 'object_updateNewAuthorization_param_auth_key_id_type_long' => 'Auth key ID', + 'object_updateNewAuthorization_param_date_type_int' => 'Date', + 'object_updateNewAuthorization_param_device_type_string' => 'Device', + 'object_updateNewAuthorization_param_location_type_string' => 'Location', + 'object_updateShortMessage_param_from_id_type_int' => 'From ID', + 'object_updateShortMessage_param_seq_type_int' => 'Seq', + 'object_updateShortChatMessage_param_seq_type_int' => 'Seq', + 'object_dcOption_param_hostname_type_string' => 'Hostname', + 'object_config_param_broadcast_size_max_type_int' => 'Broadcast size max', + 'object_messages.statedMessagesLinks' => 'Stated messages links', + 'object_messages.statedMessagesLinks_param_messages_type_Vector t' => 'Messages', + 'object_messages.statedMessagesLinks_param_chats_type_Vector t' => 'Chats', + 'object_messages.statedMessagesLinks_param_users_type_Vector t' => 'Users', + 'object_messages.statedMessagesLinks_param_links_type_Vector t' => 'Links', + 'object_messages.statedMessagesLinks_param_pts_type_int' => 'Pts', + 'object_messages.statedMessagesLinks_param_seq_type_int' => 'Seq', + 'object_messages.statedMessageLink' => 'Stated message link', + 'object_messages.statedMessageLink_param_message_type_Message' => 'Message', + 'object_messages.statedMessageLink_param_chats_type_Vector t' => 'Chats', + 'object_messages.statedMessageLink_param_users_type_Vector t' => 'Users', + 'object_messages.statedMessageLink_param_links_type_Vector t' => 'Links', + 'object_messages.statedMessageLink_param_pts_type_int' => 'Pts', + 'object_messages.statedMessageLink_param_seq_type_int' => 'Seq', + 'object_messages.sentMessageLink' => 'Sent message link', + 'object_messages.sentMessageLink_param_id_type_int' => 'ID', + 'object_messages.sentMessageLink_param_date_type_int' => 'Date', + 'object_messages.sentMessageLink_param_pts_type_int' => 'Pts', + 'object_messages.sentMessageLink_param_seq_type_int' => 'Seq', + 'object_messages.sentMessageLink_param_links_type_Vector t' => 'Links', + 'object_inputMediaUploadedAudio' => 'Media uploaded audio', + 'object_inputMediaUploadedAudio_param_file_type_InputFile' => 'File', + 'object_inputMediaUploadedAudio_param_duration_type_int' => 'Duration', + 'object_inputMediaUploadedAudio_param_mime_type_type_string' => 'Mime type', + 'object_inputMediaAudio' => 'Media audio', + 'object_inputMediaAudio_param_id_type_InputAudio' => 'ID', + 'object_inputMediaUploadedDocument_param_file_name_type_string' => 'File name', + 'object_inputMediaUploadedThumbDocument' => 'Media uploaded thumb document', + 'object_inputMediaUploadedThumbDocument_param_file_type_InputFile' => 'File', + 'object_inputMediaUploadedThumbDocument_param_thumb_type_InputFile' => 'Thumbnail', + 'object_inputMediaUploadedThumbDocument_param_file_name_type_string' => 'File name', + 'object_inputMediaUploadedThumbDocument_param_mime_type_type_string' => 'Mime type', + 'object_messageMediaAudio' => 'Message media audio', + 'object_messageMediaAudio_param_audio_type_Audio' => 'Audio', + 'object_inputAudioEmpty' => 'Empty input audio', + 'object_inputAudio' => 'Audio', + 'object_inputAudio_param_id_type_long' => 'ID', + 'object_inputAudio_param_access_hash_type_long' => 'Access hash', + 'object_inputAudioFileLocation' => 'Audio file location', + 'object_inputAudioFileLocation_param_id_type_long' => 'ID', + 'object_inputAudioFileLocation_param_access_hash_type_long' => 'Access hash', + 'object_audioEmpty' => 'Empty audio', + 'object_audioEmpty_param_id_type_long' => 'ID', + 'object_audio' => 'Audio', + 'object_audio_param_id_type_long' => 'ID', + 'object_audio_param_access_hash_type_long' => 'Access hash', + 'object_audio_param_user_id_type_int' => 'User ID', + 'object_audio_param_date_type_int' => 'Date', + 'object_audio_param_duration_type_int' => 'Duration', + 'object_audio_param_mime_type_type_string' => 'Mime type', + 'object_audio_param_size_type_int' => 'Size', + 'object_audio_param_dc_id_type_int' => 'DC ID', + 'object_document_param_user_id_type_int' => 'User ID', + 'object_document_param_file_name_type_string' => 'File name', + 'object_auth.sentAppCode' => 'Sent app code', + 'object_auth.sentAppCode_param_phone_registered_type_Bool' => 'Phone registered?', + 'object_auth.sentAppCode_param_phone_code_hash_type_string' => 'Phone code hash', + 'object_auth.sentAppCode_param_send_call_timeout_type_int' => 'Send call timeout', + 'object_auth.sentAppCode_param_is_password_type_Bool' => 'Is password?', + 'object_contactFound' => 'Contact found', + 'object_contactFound_param_user_id_type_int' => 'User ID', + 'object_updateServiceNotification_param_popup_type_Bool' => 'Popup?', + 'object_inputMediaUploadedThumbDocument_param_attributes_type_Vector t' => 'Attributes', + 'object_userStatusRecently' => 'User status recently', + 'object_userStatusLastWeek' => 'User status last week', + 'object_userStatusLastMonth' => 'User status last month', + 'object_account.sentChangePhoneCode' => 'Sent change phone code', + 'object_account.sentChangePhoneCode_param_phone_code_hash_type_string' => 'Phone code hash', + 'object_account.sentChangePhoneCode_param_send_call_timeout_type_int' => 'Send call timeout', + 'object_messages.allStickers_param_hash_type_string' => 'Hash', + 'object_messages.allStickers_param_packs_type_Vector t' => 'Packs', + 'object_messages.allStickers_param_documents_type_Vector t' => 'Documents', + 'object_message_param_fwd_from_id_type_int' => 'Forwarded from ID', + 'object_message_param_fwd_date_type_int' => 'Forwarded date', + 'object_chatLocated' => 'Chat located', + 'object_chatLocated_param_chat_id_type_int' => 'Chat ID', + 'object_chatLocated_param_distance_type_int' => 'Distance', + 'object_messages.messageEmpty' => 'Empty message', + 'object_messages.statedMessages_param_pts_count_type_int' => 'Pts count', + 'object_messages.statedMessage_param_pts_count_type_int' => 'Pts count', + 'object_messages.sentMessage_param_pts_count_type_int' => 'Pts count', + 'object_updateReadMessages_param_pts_count_type_int' => 'Pts count', + 'object_updateShortMessage_param_fwd_from_id_type_int' => 'Fwd from ID', + 'object_updateShortMessage_param_fwd_date_type_int' => 'Fwd date', + 'object_updateShortChatMessage_param_fwd_from_id_type_int' => 'Fwd from ID', + 'object_updateShortChatMessage_param_fwd_date_type_int' => 'Fwd date', + 'object_messages.statedMessagesLinks_param_pts_count_type_int' => 'Pts count', + 'object_messages.statedMessageLink_param_pts_count_type_int' => 'Pts count', + 'object_messages.sentMessageLink_param_pts_count_type_int' => 'Pts count', + 'object_inputGeoChat' => 'Geo chat', + 'object_inputGeoChat_param_chat_id_type_int' => 'Chat ID', + 'object_inputGeoChat_param_access_hash_type_long' => 'Access hash', + 'object_inputNotifyGeoChatPeer' => 'Notify geo chat peer', + 'object_inputNotifyGeoChatPeer_param_peer_type_InputGeoChat' => 'Peer', + 'object_geoChat' => 'Geo chat', + 'object_geoChat_param_id_type_int' => 'ID', + 'object_geoChat_param_access_hash_type_long' => 'Access hash', + 'object_geoChat_param_title_type_string' => 'Title', + 'object_geoChat_param_address_type_string' => 'Address', + 'object_geoChat_param_venue_type_string' => 'Venue', + 'object_geoChat_param_geo_type_GeoPoint' => 'Geo', + 'object_geoChat_param_photo_type_ChatPhoto' => 'Photo', + 'object_geoChat_param_participants_count_type_int' => 'Participants count', + 'object_geoChat_param_date_type_int' => 'Date', + 'object_geoChat_param_checked_in_type_Bool' => 'Checked in?', + 'object_geoChat_param_version_type_int' => 'Version', + 'object_geoChatMessageEmpty' => 'Empty geo chat message', + 'object_geoChatMessageEmpty_param_chat_id_type_int' => 'Chat ID', + 'object_geoChatMessageEmpty_param_id_type_int' => 'ID', + 'object_geoChatMessage' => 'Geo chat message', + 'object_geoChatMessage_param_chat_id_type_int' => 'Chat ID', + 'object_geoChatMessage_param_id_type_int' => 'ID', + 'object_geoChatMessage_param_from_id_type_int' => 'From ID', + 'object_geoChatMessage_param_date_type_int' => 'Date', + 'object_geoChatMessage_param_message_type_string' => 'Message', + 'object_geoChatMessage_param_media_type_MessageMedia' => 'Media', + 'object_geoChatMessageService' => 'Geo chat message service', + 'object_geoChatMessageService_param_chat_id_type_int' => 'Chat ID', + 'object_geoChatMessageService_param_id_type_int' => 'ID', + 'object_geoChatMessageService_param_from_id_type_int' => 'From ID', + 'object_geoChatMessageService_param_date_type_int' => 'Date', + 'object_geoChatMessageService_param_action_type_MessageAction' => 'Action', + 'object_geochats.statedMessage' => 'Stated message', + 'object_geochats.statedMessage_param_message_type_GeoChatMessage' => 'Message', + 'object_geochats.statedMessage_param_chats_type_Vector t' => 'Chats', + 'object_geochats.statedMessage_param_users_type_Vector t' => 'Users', + 'object_geochats.statedMessage_param_seq_type_int' => 'Seq', + 'object_geochats.located' => 'Located', + 'object_geochats.located_param_results_type_Vector t' => 'Results', + 'object_geochats.located_param_messages_type_Vector t' => 'Messages', + 'object_geochats.located_param_chats_type_Vector t' => 'Chats', + 'object_geochats.located_param_users_type_Vector t' => 'Users', + 'object_geochats.messages' => 'Messages', + 'object_geochats.messages_param_messages_type_Vector t' => 'Messages', + 'object_geochats.messages_param_chats_type_Vector t' => 'Chats', + 'object_geochats.messages_param_users_type_Vector t' => 'Users', + 'object_geochats.messagesSlice' => 'Messages slice', + 'object_geochats.messagesSlice_param_count_type_int' => 'Count', + 'object_geochats.messagesSlice_param_messages_type_Vector t' => 'Messages', + 'object_geochats.messagesSlice_param_chats_type_Vector t' => 'Chats', + 'object_geochats.messagesSlice_param_users_type_Vector t' => 'Users', + 'object_messageActionGeoChatCreate' => 'Message action geo chat create', + 'object_messageActionGeoChatCreate_param_title_type_string' => 'Title', + 'object_messageActionGeoChatCreate_param_address_type_string' => 'Address', + 'object_messageActionGeoChatCheckin' => 'Message action geo chat checkin', + 'object_updateNewGeoChatMessage' => 'Update new geo chat message', + 'object_updateNewGeoChatMessage_param_message_type_GeoChatMessage' => 'Message', + 'object_messages.sentMessage_param_media_type_MessageMedia' => 'Media', + 'object_messages.sentMessageLink_param_media_type_MessageMedia' => 'Media', + 'object_inputMediaUploadedPhoto_param_caption_type_string' => 'Caption', + 'object_inputMediaPhoto_param_caption_type_string' => 'Caption', + 'object_inputMediaUploadedVideo_param_caption_type_string' => 'Caption', + 'object_inputMediaUploadedThumbVideo_param_caption_type_string' => 'Caption', + 'object_inputMediaVideo_param_caption_type_string' => 'Caption', + 'object_messageMediaPhoto_param_caption_type_string' => 'Caption', + 'object_messageMediaVideo_param_caption_type_string' => 'Caption', + 'object_botCommand' => 'Bot command', + 'object_botCommand_param_command_type_string' => 'Command', + 'object_botCommand_param_description_type_string' => 'Description', + 'object_botInfoEmpty' => 'Empty bot info', + 'object_botInfo_param_version_type_int' => 'Version', + 'object_botInfo_param_share_text_type_string' => 'Share text', + 'object_help.appChangelogEmpty' => 'Empty app changelog', + 'object_help.appChangelog' => 'App changelog', + 'object_help.appChangelog_param_text_type_string' => 'Text', + 'object_message_param_fwd_from_id_type_Peer' => 'Forwarded from ID', + 'object_updateShortMessage_param_fwd_from_id_type_Peer' => 'Fwd from ID', + 'object_updateShortChatMessage_param_fwd_from_id_type_Peer' => 'Fwd from ID', + 'object_channelFull_param_unread_important_count_type_int' => 'Unread important count', + 'object_dialogChannel' => 'Dialog channel', + 'object_dialogChannel_param_peer_type_Peer' => 'Peer', + 'object_dialogChannel_param_top_message_type_int' => 'Top message', + 'object_dialogChannel_param_top_important_message_type_int' => 'Top important message', + 'object_dialogChannel_param_read_inbox_max_id_type_int' => 'Read inbox max ID', + 'object_dialogChannel_param_unread_count_type_int' => 'Unread count', + 'object_dialogChannel_param_unread_important_count_type_int' => 'Unread important count', + 'object_dialogChannel_param_notify_settings_type_PeerNotifySettings' => 'Notify settings', + 'object_dialogChannel_param_pts_type_int' => 'Pts', + 'object_messageGroup' => 'Message group', + 'object_messageGroup_param_min_id_type_int' => 'Min ID', + 'object_messageGroup_param_max_id_type_int' => 'Max ID', + 'object_messageGroup_param_count_type_int' => 'Count', + 'object_messageGroup_param_date_type_int' => 'Date', + 'object_messages.channelMessages_param_collapsed_type_Vector t' => 'Collapsed', + 'object_updateChannelGroup' => 'Update channel group', + 'object_updateChannelGroup_param_channel_id_type_int' => 'Channel ID', + 'object_updateChannelGroup_param_group_type_MessageGroup' => 'Group', + 'object_updates.channelDifferenceTooLong_param_top_important_message_type_int' => 'Top important message', + 'object_updates.channelDifferenceTooLong_param_unread_important_count_type_int' => 'Unread important count', + 'object_channelMessagesFilterCollapsed' => 'Channel messages filter collapsed', + 'object_channelParticipantModerator' => 'Channel participant moderator', + 'object_channelParticipantModerator_param_user_id_type_int' => 'User ID', + 'object_channelParticipantModerator_param_inviter_id_type_int' => 'Inviter ID', + 'object_channelParticipantModerator_param_date_type_int' => 'Date', + 'object_channelParticipantEditor' => 'Channel participant editor', + 'object_channelParticipantEditor_param_user_id_type_int' => 'User ID', + 'object_channelParticipantEditor_param_inviter_id_type_int' => 'Inviter ID', + 'object_channelParticipantEditor_param_date_type_int' => 'Date', + 'object_channelParticipantKicked' => 'Channel participant kicked', + 'object_channelParticipantKicked_param_user_id_type_int' => 'User ID', + 'object_channelParticipantKicked_param_kicked_by_type_int' => 'Kicked by', + 'object_channelParticipantKicked_param_date_type_int' => 'Date', + 'object_channelRoleEmpty' => 'Empty channel role', + 'object_channelRoleModerator' => 'Channel role moderator', + 'object_channelRoleEditor' => 'Channel role editor', + 'object_inputChatEmpty' => 'Empty input chat', + 'object_inputChat' => 'Chat', + 'object_inputChat_param_chat_id_type_int' => 'Chat ID', + 'object_updateReadChannelInbox_param_peer_type_Peer' => 'Peer', + 'object_updateDeleteChannelMessages_param_peer_type_Peer' => 'Peer', + 'object_message_param_unread_type_true' => 'Unread?', + 'object_messageService_param_unread_type_true' => 'Unread?', + 'object_updateShortMessage_param_unread_type_true' => 'Unread?', + 'object_updateShortChatMessage_param_unread_type_true' => 'Unread?', + 'object_stickerSet_param_disabled_type_true' => 'Disabled?', + 'object_updateShortSentMessage_param_unread_type_true' => 'Unread?', + 'object_channel_param_kicked_type_true' => 'Kicked?', + 'object_channel_param_moderator_type_true' => 'Moderator?', + 'object_channelMessagesFilter_param_important_only_type_true' => 'Important only?', + 'object_messageActionChatDeactivate' => 'Message action chat deactivate', + 'object_messageActionChatActivate' => 'Message action chat activate', + 'object_user_param_restiction_reason_type_string' => 'Restiction reason', + 'object_channel_param_restiction_reason_type_string' => 'Restiction reason', + 'object_webPageExternal' => 'Web page external', + 'object_webPageExternal_param_url_type_string' => 'URL', + 'object_webPageExternal_param_display_url_type_string' => 'Display URL', + 'object_webPageExternal_param_type_type_string' => 'Type', + 'object_webPageExternal_param_title_type_string' => 'Title', + 'object_webPageExternal_param_description_type_string' => 'Description', + 'object_webPageExternal_param_thumb_url_type_string' => 'Thumbnail URL', + 'object_webPageExternal_param_content_url_type_string' => 'Content URL', + 'object_webPageExternal_param_w_type_int' => 'Width', + 'object_webPageExternal_param_h_type_int' => 'Height', + 'object_webPageExternal_param_duration_type_int' => 'Duration', + 'object_foundGif_param_webpage_type_WebPage' => 'Webpage', + 'object_inputMediaUploadedDocument_param_caption_type_string' => 'Caption', + 'object_inputMediaUploadedThumbDocument_param_caption_type_string' => 'Caption', + 'object_inputMediaDocument_param_caption_type_string' => 'Caption', + 'object_messageMediaDocument_param_caption_type_string' => 'Caption', + 'object_inputBotInlineMessageMediaAuto_param_caption_type_string' => 'Caption', + 'object_botInlineMessageMediaAuto_param_caption_type_string' => 'Caption', + 'object_botInlineMediaResultDocument' => 'Bot inline media result document', + 'object_botInlineMediaResultDocument_param_id_type_string' => 'ID', + 'object_botInlineMediaResultDocument_param_type_type_string' => 'Type', + 'object_botInlineMediaResultDocument_param_document_type_Document' => 'Document', + 'object_botInlineMediaResultDocument_param_send_message_type_BotInlineMessage' => 'Send message', + 'object_botInlineMediaResultPhoto' => 'Bot inline media result photo', + 'object_botInlineMediaResultPhoto_param_id_type_string' => 'ID', + 'object_botInlineMediaResultPhoto_param_type_type_string' => 'Type', + 'object_botInlineMediaResultPhoto_param_photo_type_Photo' => 'Photo', + 'object_botInlineMediaResultPhoto_param_send_message_type_BotInlineMessage' => 'Send message', + 'object_inputMediaVideo_param_video_type_InputVideo' => 'Video', + 'object_inputMediaAudio_param_audio_type_InputAudio' => 'Audio', + 'object_inputMediaDocument_param_document_id_type_InputDocument' => 'Document ID', + 'object_inputGeoPoint_param_latitude_type_double' => 'Latitude', + 'object_inputGeoPoint_param_longitude_type_double' => 'Longitude', + 'object_geoPoint_param_longitude_type_double' => 'Longitude', + 'object_geoPoint_param_latitude_type_double' => 'Latitude', + 'object_updateNewEncryptedMessage_param_encr_message_type_EncryptedMessage' => 'Encr message', + 'object_updateEncryption_param_encr_chat_type_EncryptedChat' => 'Encr chat', + 'object_updateNotifySettings_param_notify_peer_type_NotifyPeer' => 'Notify peer', + 'object_updateServiceNotification_param_message_text_type_string' => 'Message text', + 'object_updateNewChannelMessage_param_channel_pts_type_int' => 'Channel pts', + 'object_updateNewChannelMessage_param_channel_pts_count_type_int' => 'Channel pts count', + 'object_updateDeleteChannelMessages_param_channel_pts_type_int' => 'Channel pts', + 'object_updateDeleteChannelMessages_param_channel_pts_count_type_int' => 'Channel pts count', + 'object_updates.channelDifferenceEmpty_param_channel_pts_type_int' => 'Channel pts', + 'object_updates.channelDifferenceTooLong_param_channel_pts_type_int' => 'Channel pts', + 'object_updates.channelDifference_param_channel_pts_type_int' => 'Channel pts', + 'object_privacyKeyChatInvite' => 'Privacy key chat invite', + 'object_inputMediaUploadedThumbDocument_param_stickers_type_Vector t' => 'Stickers', + 'object_inputMediaPhotoExternal_param_caption_type_string' => 'Caption', + 'object_inputMediaDocumentExternal_param_caption_type_string' => 'Caption', + 'object_destroy_auth_key_ok' => 'Destroy auth key ok', + 'object_destroy_auth_key_none' => 'Destroy auth key none', + 'object_destroy_auth_key_fail' => 'Destroy auth key fail', + 'object_help.appChangelog_param_message_type_string' => 'Message', + 'object_help.appChangelog_param_media_type_MessageMedia' => 'Media', + 'object_help.appChangelog_param_entities_type_Vector t' => 'Entities', + 'object_pageBlockParagraph' => 'Page block paragraph', + 'object_pageBlockParagraph_param_text_type_RichText' => 'Text', + 'object_pageBlockPreformatted' => 'Page block preformatted', + 'object_pageBlockPreformatted_param_text_type_RichText' => 'Text', + 'object_pageBlockPreformatted_param_language_type_string' => 'Language', + 'object_pageBlockDivider' => 'Page block divider', + 'object_pageBlockAnchor' => 'Page block anchor', + 'object_pageBlockAnchor_param_name_type_string' => 'Name', + 'object_pageBlockCover' => 'Page block cover', + 'object_pageBlockCover_param_cover_type_PageBlock' => 'Cover', + 'object_pagePart_param_videos_type_Vector t' => 'Videos', + 'object_pageFull_param_videos_type_Vector t' => 'Videos', + 'object_phoneCallRequested_param_g_a_type_bytes' => 'G a', + 'object_resPQ_param_pq_type_string' => 'Pq', + 'object_p_q_inner_data_param_pq_type_string' => 'Pq', + 'object_p_q_inner_data_param_p_type_string' => 'P', + 'object_p_q_inner_data_param_q_type_string' => 'Q', + 'object_server_DH_params_ok_param_encrypted_answer_type_string' => 'Encrypted answer', + 'object_server_DH_inner_data_param_dh_prime_type_string' => 'Dh prime', + 'object_server_DH_inner_data_param_g_a_type_string' => 'G a', + 'object_client_DH_inner_data_param_g_b_type_string' => 'G b', + 'object_msgs_state_info_param_info_type_string' => 'Info', + 'object_msgs_all_info_param_info_type_string' => 'Info', + 'object_http_wait' => 'Http wait', + 'object_http_wait_param_max_delay_type_int' => 'Max delay', + 'object_http_wait_param_wait_after_type_int' => 'Wait after', + 'object_http_wait_param_max_wait_type_int' => 'Max wait', + 'object_ipPort' => 'Ip port', + 'object_ipPort_param_ipv4_type_int' => 'Ipv4', + 'object_ipPort_param_port_type_int' => 'Port', + 'object_help.configSimple' => 'Config simple', + 'object_help.configSimple_param_date_type_int' => 'Date', + 'object_help.configSimple_param_expires_type_int' => 'Expires', + 'object_help.configSimple_param_dc_id_type_int' => 'DC ID', + 'object_help.configSimple_param_ip_port_list_type_Vector t' => 'Ip port list', + 'object_inputMessagesFilterMyMentionsUnread' => 'Messages filter my mentions unread', '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', @@ -8456,7 +8754,7 @@ class Lang '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' => 'ids of stickers you already cached', + 'method_messages.searchStickerSets_param_hash_type_int' => 'Ids of stickers you already cached', 'method_upload.getFileHashes' => 'Get file hashes', 'method_upload.getFileHashes_param_location_type_InputFileLocation' => 'The file', 'method_upload.getFileHashes_param_offset_type_int' => 'Offset', @@ -8466,210 +8764,210 @@ class Lang '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' => '', + 'object_inputSecureFileLocation' => 'Secure file location', + 'object_inputSecureFileLocation_param_id_type_long' => 'ID', + 'object_inputSecureFileLocation_param_access_hash_type_long' => 'Access hash', + 'object_messageActionBotAllowed' => 'Message action bot allowed', + 'object_messageActionBotAllowed_param_domain_type_string' => 'Domain', + 'object_messageActionSecureValuesSentMe' => 'Message action secure values sent me', + 'object_messageActionSecureValuesSentMe_param_values_type_Vector t' => 'Values', + 'object_messageActionSecureValuesSentMe_param_credentials_type_SecureCredentialsEncrypted' => 'Credentials', + 'object_messageActionSecureValuesSent' => 'Message action secure values sent', + 'object_messageActionSecureValuesSent_param_types_type_Vector t' => 'Types', + 'object_auth.sentCode_param_terms_of_service_type_help.TermsOfService' => 'Terms of service', + 'object_inputPeerNotifySettings_param_silent_type_Bool' => 'Silent?', + 'object_peerNotifySettings_param_silent_type_Bool' => 'Silent?', + 'object_updateDialogPinned_param_peer_type_DialogPeer' => 'Peer', + 'object_upload.fileCdnRedirect_param_file_hashes_type_Vector t' => 'File hashes', + 'object_dcOption_param_secret_type_bytes' => 'Secret', + 'object_config_param_preload_featured_stickers_type_true' => 'Preload featured stickers?', + 'object_config_param_ignore_phone_entities_type_true' => 'Ignore phone entities?', + 'object_config_param_revoke_pm_inbox_type_true' => 'Revoke pm inbox?', + 'object_config_param_blocked_mode_type_true' => 'Blocked mode?', + 'object_config_param_revoke_time_limit_type_int' => 'Revoke time limit', + 'object_config_param_revoke_pm_time_limit_type_int' => 'Revoke pm time limit', + 'object_config_param_autoupdate_url_prefix_type_string' => 'Autoupdate URL prefix', + 'object_messages.stickers_param_hash_type_int' => 'Hash', + 'object_account.noPassword_param_new_secure_salt_type_bytes' => 'New secure salt', + 'object_account.noPassword_param_secure_random_type_bytes' => 'Secure random', + 'object_account.password_param_has_recovery_type_true' => 'Has recovery?', + 'object_account.password_param_has_secure_values_type_true' => 'Has secure values?', + 'object_account.password_param_new_secure_salt_type_bytes' => 'New secure salt', + 'object_account.password_param_secure_random_type_bytes' => 'Secure random', + 'object_account.passwordSettings_param_secure_salt_type_bytes' => 'Secure salt', + 'object_account.passwordSettings_param_secure_secret_type_bytes' => 'Secure secret', + 'object_account.passwordSettings_param_secure_secret_id_type_long' => 'Secure secret ID', + 'object_account.passwordInputSettings_param_new_secure_salt_type_bytes' => 'New secure salt', + 'object_account.passwordInputSettings_param_new_secure_secret_type_bytes' => 'New secure secret', + 'object_account.passwordInputSettings_param_new_secure_secret_id_type_long' => 'New secure secret ID', + 'object_stickerSet_param_installed_date_type_int' => 'Installed date', + 'object_messageEntityPhone' => 'Message entity phone', + 'object_messageEntityPhone_param_offset_type_int' => 'Offset', + 'object_messageEntityPhone_param_length_type_int' => 'Length', + 'object_messageEntityCashtag' => 'Message entity cashtag', + 'object_messageEntityCashtag_param_offset_type_int' => 'Offset', + 'object_messageEntityCashtag_param_length_type_int' => 'Length', + 'object_help.termsOfService_param_popup_type_true' => 'Popup?', + 'object_help.termsOfService_param_id_type_DataJSON' => 'ID', + 'object_help.termsOfService_param_entities_type_Vector t' => 'Entities', + 'object_help.termsOfService_param_min_age_confirm_type_int' => 'Min age confirm', + 'object_inputBotInlineMessageMediaVenue_param_venue_type_type_string' => 'Venue type', + 'object_inputBotInlineResult_param_thumb_type_InputWebDocument' => 'Thumbnail', + 'object_inputBotInlineResult_param_content_type_InputWebDocument' => 'Content', + 'object_botInlineMessageMediaVenue_param_venue_type_type_string' => 'Venue type', + 'object_botInlineResult_param_thumb_type_WebDocument' => 'Thumbnailnail', + 'object_botInlineResult_param_content_type_WebDocument' => 'Content', + 'object_messages.recentStickers_param_packs_type_Vector t' => 'Packs', + 'object_messages.recentStickers_param_dates_type_Vector t' => 'Dates', + 'object_webDocumentNoProxy' => 'Web document no proxy', + 'object_webDocumentNoProxy_param_url_type_string' => 'URL', + 'object_webDocumentNoProxy_param_size_type_int' => 'Size', + 'object_webDocumentNoProxy_param_mime_type_type_string' => 'Mime type', + 'object_webDocumentNoProxy_param_attributes_type_Vector t' => 'Attributes', + 'object_inputWebFileGeoPointLocation' => 'Web file geo point location', + 'object_inputWebFileGeoPointLocation_param_geo_point_type_InputGeoPoint' => 'Geo point', + 'object_inputWebFileGeoPointLocation_param_w_type_int' => 'Width', + 'object_inputWebFileGeoPointLocation_param_h_type_int' => 'Height', + 'object_inputWebFileGeoPointLocation_param_zoom_type_int' => 'Zoom', + 'object_inputWebFileGeoPointLocation_param_scale_type_int' => 'Scale', + 'object_inputWebFileGeoMessageLocation' => 'Web file geo message location', + 'object_inputWebFileGeoMessageLocation_param_peer_type_InputPeer' => 'Peer', + 'object_inputWebFileGeoMessageLocation_param_msg_id_type_int' => 'Msg ID', + 'object_inputWebFileGeoMessageLocation_param_w_type_int' => 'Width', + 'object_inputWebFileGeoMessageLocation_param_h_type_int' => 'Height', + 'object_inputWebFileGeoMessageLocation_param_zoom_type_int' => 'Zoom', + 'object_inputWebFileGeoMessageLocation_param_scale_type_int' => 'Scale', + 'object_channelAdminRights_param_manage_call_type_true' => 'Manage group calls', + 'object_inputDialogPeer' => 'Dialog peer', + 'object_inputDialogPeer_param_peer_type_InputPeer' => 'Peer', + 'object_dialogPeer' => 'Dialog peer', + 'object_dialogPeer_param_peer_type_Peer' => 'Peer', + 'object_messages.foundStickerSetsNotModified' => 'Found sticker sets not modified', + 'object_messages.foundStickerSets' => 'Found sticker sets', + 'object_messages.foundStickerSets_param_hash_type_int' => 'Hash', + 'object_messages.foundStickerSets_param_sets_type_Vector t' => 'Sets', + 'object_fileHash' => 'File hash', + 'object_fileHash_param_offset_type_int' => 'Offset', + 'object_fileHash_param_limit_type_int' => 'Limit', + 'object_fileHash_param_hash_type_bytes' => 'Hash', + 'object_inputClientProxy' => 'Client proxy', + 'object_inputClientProxy_param_address_type_string' => 'Address', + 'object_inputClientProxy_param_port_type_int' => 'Port', + 'object_help.proxyDataEmpty' => 'Empty proxy data', + 'object_help.proxyDataEmpty_param_expires_type_int' => 'Expires', + 'object_help.proxyDataPromo' => 'Proxy data promo', + 'object_help.proxyDataPromo_param_expires_type_int' => 'Expires', + 'object_help.proxyDataPromo_param_peer_type_Peer' => 'Peer', + 'object_help.proxyDataPromo_param_chats_type_Vector t' => 'Chats', + 'object_help.proxyDataPromo_param_users_type_Vector t' => 'Users', + 'object_help.termsOfServiceUpdateEmpty' => 'Empty terms of service update', + 'object_help.termsOfServiceUpdateEmpty_param_expires_type_int' => 'Expires', + 'object_help.termsOfServiceUpdate' => 'Terms of service update', + 'object_help.termsOfServiceUpdate_param_expires_type_int' => 'Expires', + 'object_help.termsOfServiceUpdate_param_terms_of_service_type_help.TermsOfService' => 'Terms of service', + 'object_inputSecureFileUploaded' => 'Secure file uploaded', + 'object_inputSecureFileUploaded_param_id_type_long' => 'ID', + 'object_inputSecureFileUploaded_param_parts_type_int' => 'Parts', + 'object_inputSecureFileUploaded_param_md5_checksum_type_string' => 'Md5 checksum', + 'object_inputSecureFileUploaded_param_file_hash_type_bytes' => 'File hash', + 'object_inputSecureFileUploaded_param_secret_type_bytes' => 'Secret', + 'object_inputSecureFile' => 'Secure file', + 'object_inputSecureFile_param_id_type_long' => 'ID', + 'object_inputSecureFile_param_access_hash_type_long' => 'Access hash', + 'object_secureFileEmpty' => 'Empty secure file', + 'object_secureFile' => 'Secure file', + 'object_secureFile_param_id_type_long' => 'ID', + 'object_secureFile_param_access_hash_type_long' => 'Access hash', + 'object_secureFile_param_size_type_int' => 'Size', + 'object_secureFile_param_dc_id_type_int' => 'DC ID', + 'object_secureFile_param_date_type_int' => 'Date', + 'object_secureFile_param_file_hash_type_bytes' => 'File hash', + 'object_secureFile_param_secret_type_bytes' => 'Secret', + 'object_secureData' => 'Secure data', + 'object_secureData_param_data_type_bytes' => 'Data', + 'object_secureData_param_data_hash_type_bytes' => 'Data hash', + 'object_secureData_param_secret_type_bytes' => 'Secret', + 'object_securePlainPhone' => 'Secure plain phone', + 'object_securePlainPhone_param_phone_type_string' => 'Phone', + 'object_securePlainEmail' => 'Secure plain email', + 'object_securePlainEmail_param_email_type_string' => 'Email', + 'object_secureValueTypePersonalDetails' => 'Secure value type personal details', + 'object_secureValueTypePassport' => 'Secure value type passport', + 'object_secureValueTypeDriverLicense' => 'Secure value type driver license', + 'object_secureValueTypeIdentityCard' => 'Secure value type IDentity card', + 'object_secureValueTypeInternalPassport' => 'Secure value type internal passport', + 'object_secureValueTypeAddress' => 'Secure value type address', + 'object_secureValueTypeUtilityBill' => 'Secure value type utility bill', + 'object_secureValueTypeBankStatement' => 'Secure value type bank statement', + 'object_secureValueTypeRentalAgreement' => 'Secure value type rental agreement', + 'object_secureValueTypePassportRegistration' => 'Secure value type passport registration', + 'object_secureValueTypeTemporaryRegistration' => 'Secure value type temporary registration', + 'object_secureValueTypePhone' => 'Secure value type phone', + 'object_secureValueTypeEmail' => 'Secure value type email', + 'object_secureValue' => 'Secure value', + 'object_secureValue_param_type_type_SecureValueType' => 'Type', + 'object_secureValue_param_data_type_SecureData' => 'Data', + 'object_secureValue_param_front_side_type_SecureFile' => 'Front side', + 'object_secureValue_param_reverse_side_type_SecureFile' => 'Reverse side', + 'object_secureValue_param_selfie_type_SecureFile' => 'Selfie', + 'object_secureValue_param_files_type_Vector t' => 'Files', + 'object_secureValue_param_plain_data_type_SecurePlainData' => 'Plain data', + 'object_secureValue_param_hash_type_bytes' => 'Hash', + 'object_inputSecureValue' => 'Secure value', + 'object_inputSecureValue_param_type_type_SecureValueType' => 'Type', + 'object_inputSecureValue_param_data_type_SecureData' => 'Data', + 'object_inputSecureValue_param_front_side_type_InputSecureFile' => 'Front side', + 'object_inputSecureValue_param_reverse_side_type_InputSecureFile' => 'Reverse side', + 'object_inputSecureValue_param_selfie_type_InputSecureFile' => 'Selfie', + 'object_inputSecureValue_param_files_type_Vector t' => 'Files', + 'object_inputSecureValue_param_plain_data_type_SecurePlainData' => 'Plain data', + 'object_secureValueHash' => 'Secure value hash', + 'object_secureValueHash_param_type_type_SecureValueType' => 'Type', + 'object_secureValueHash_param_hash_type_bytes' => 'Hash', + 'object_secureValueErrorData' => 'Secure value error data', + 'object_secureValueErrorData_param_type_type_SecureValueType' => 'Type', + 'object_secureValueErrorData_param_data_hash_type_bytes' => 'Data hash', + 'object_secureValueErrorData_param_field_type_string' => 'Field', + 'object_secureValueErrorData_param_text_type_string' => 'Text', + 'object_secureValueErrorFrontSide' => 'Secure value error front side', + 'object_secureValueErrorFrontSide_param_type_type_SecureValueType' => 'Type', + 'object_secureValueErrorFrontSide_param_file_hash_type_bytes' => 'File hash', + 'object_secureValueErrorFrontSide_param_text_type_string' => 'Text', + 'object_secureValueErrorReverseSide' => 'Secure value error reverse side', + 'object_secureValueErrorReverseSide_param_type_type_SecureValueType' => 'Type', + 'object_secureValueErrorReverseSide_param_file_hash_type_bytes' => 'File hash', + 'object_secureValueErrorReverseSide_param_text_type_string' => 'Text', + 'object_secureValueErrorSelfie' => 'Secure value error selfie', + 'object_secureValueErrorSelfie_param_type_type_SecureValueType' => 'Type', + 'object_secureValueErrorSelfie_param_file_hash_type_bytes' => 'File hash', + 'object_secureValueErrorSelfie_param_text_type_string' => 'Text', + 'object_secureValueErrorFile' => 'Secure value error file', + 'object_secureValueErrorFile_param_type_type_SecureValueType' => 'Type', + 'object_secureValueErrorFile_param_file_hash_type_bytes' => 'File hash', + 'object_secureValueErrorFile_param_text_type_string' => 'Text', + 'object_secureValueErrorFiles' => 'Secure value error files', + 'object_secureValueErrorFiles_param_type_type_SecureValueType' => 'Type', + 'object_secureValueErrorFiles_param_file_hash_type_Vector t' => 'File hash', + 'object_secureValueErrorFiles_param_text_type_string' => 'Text', + 'object_secureCredentialsEncrypted' => 'Secure credentials encrypted', + 'object_secureCredentialsEncrypted_param_data_type_bytes' => 'Data', + 'object_secureCredentialsEncrypted_param_hash_type_bytes' => 'Hash', + 'object_secureCredentialsEncrypted_param_secret_type_bytes' => 'Secret', + 'object_account.authorizationForm' => 'Telegram passport authorization form', + 'object_account.authorizationForm_param_selfie_required_type_true' => 'Selfie required?', + 'object_account.authorizationForm_param_required_types_type_Vector t' => 'Required types', + 'object_account.authorizationForm_param_values_type_Vector t' => 'Values', + 'object_account.authorizationForm_param_errors_type_Vector t' => 'Errors', + 'object_account.authorizationForm_param_users_type_Vector t' => 'Users', + 'object_account.authorizationForm_param_privacy_policy_url_type_string' => 'Privacy policy URL', + 'object_account.sentEmailCode' => 'Sent email code', + 'object_account.sentEmailCode_param_email_pattern_type_string' => 'Email pattern', + 'object_account.sentEmailCode_param_length_type_int' => 'Length', + 'object_help.deepLinkInfoEmpty' => 'Empty deep link info', + 'object_help.deepLinkInfo' => 'Deep link info', + 'object_help.deepLinkInfo_param_update_app_type_true' => 'Update app?', + 'object_help.deepLinkInfo_param_message_type_string' => 'Message', + 'object_help.deepLinkInfo_param_entities_type_Vector t' => 'Entities', 'method_invokeWithMessagesRange' => 'Invoke with messages range', 'method_invokeWithMessagesRange_param_range_type_MessageRange' => 'The range', 'method_invokeWithMessagesRange_param_query_type_!X' => 'The query', @@ -8690,23 +8988,23 @@ class Lang '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' => '', + 'object_ipPortSecret' => 'Ip port secret', + 'object_ipPortSecret_param_ipv4_type_int' => 'Ipv4', + 'object_ipPortSecret_param_port_type_int' => 'Port', + 'object_ipPortSecret_param_secret_type_bytes' => 'Secret', + 'object_accessPointRule' => 'Access point rule', + 'object_accessPointRule_param_phone_prefix_rules_type_string' => 'Phone prefix rules', + 'object_accessPointRule_param_dc_id_type_int' => 'DC ID', + 'object_accessPointRule_param_ips_type_vector' => 'Ips', + 'object_help.configSimple_param_rules_type_vector' => 'Rules', + 'object_inputTakeoutFileLocation' => 'Takeout file location', + 'object_savedPhoneContact' => 'Saved phone contact', + 'object_savedPhoneContact_param_phone_type_string' => 'Phone', + 'object_savedPhoneContact_param_first_name_type_string' => 'First name', + 'object_savedPhoneContact_param_last_name_type_string' => 'Last name', + 'object_savedPhoneContact_param_date_type_int' => 'Date', + 'object_account.takeout' => 'Takeout', + 'object_account.takeout_param_id_type_long' => 'ID', 'method_contacts.toggleTopPeers' => 'Toggle top peers', 'method_contacts.toggleTopPeers_param_enabled_type_Bool' => 'Enable or disable top peer', 'method_messages.getDialogs_param_hash_type_int' => 'IDs of previously fetched dialogs', @@ -8714,35 +9012,35 @@ class Lang 'method_messages.markDialogUnread_param_unread_type_true' => 'Should it be marked or unmarked as read', 'method_messages.markDialogUnread_param_peer_type_InputDialogPeer' => 'The dialog to mark as unread', 'method_messages.getDialogUnreadMarks' => 'Get dialogs marked as unread manually', - 'object_inputMediaContact_param_vcard_type_string' => '', - 'object_messageMediaContact_param_vcard_type_string' => '', - 'object_dialog_param_unread_mark_type_true' => '', - 'object_geoPoint_param_access_hash_type_long' => '', - 'object_messages.dialogsNotModified' => '', - 'object_messages.dialogsNotModified_param_count_type_int' => '', - 'object_updateDialogUnreadMark' => '', - 'object_updateDialogUnreadMark_param_unread_type_true' => '', - 'object_updateDialogUnreadMark_param_peer_type_DialogPeer' => '', - 'object_config_param_dc_txt_domain_name_type_string' => '', - 'object_config_param_gif_search_username_type_string' => '', - 'object_config_param_venue_search_username_type_string' => '', - 'object_config_param_img_search_username_type_string' => '', - 'object_config_param_static_maps_provider_type_string' => '', - 'object_config_param_caption_length_max_type_int' => '', - 'object_config_param_message_length_max_type_int' => '', - 'object_config_param_webfile_dc_id_type_int' => '', - 'object_inputBotInlineMessageMediaContact_param_vcard_type_string' => '', - 'object_botInlineMessageMediaContact_param_vcard_type_string' => '', - 'object_contacts.topPeersDisabled' => '', - 'object_draftMessageEmpty_param_date_type_int' => '', - 'object_inputWebFileGeoPointLocation_param_access_hash_type_long' => '', + 'object_inputMediaContact_param_vcard_type_string' => 'Vcard', + 'object_messageMediaContact_param_vcard_type_string' => 'Vcard', + 'object_dialog_param_unread_mark_type_true' => 'Unread mark?', + 'object_geoPoint_param_access_hash_type_long' => 'Access hash', + 'object_messages.dialogsNotModified' => 'Dialogs not modified', + 'object_messages.dialogsNotModified_param_count_type_int' => 'Count', + 'object_updateDialogUnreadMark' => 'Update dialog unread mark', + 'object_updateDialogUnreadMark_param_unread_type_true' => 'Unread?', + 'object_updateDialogUnreadMark_param_peer_type_DialogPeer' => 'Peer', + 'object_config_param_dc_txt_domain_name_type_string' => 'DC txt domain name', + 'object_config_param_gif_search_username_type_string' => 'Gif search username', + 'object_config_param_venue_search_username_type_string' => 'Venue search username', + 'object_config_param_img_search_username_type_string' => 'Img search username', + 'object_config_param_static_maps_provider_type_string' => 'Static maps provider', + 'object_config_param_caption_length_max_type_int' => 'Caption length max', + 'object_config_param_message_length_max_type_int' => 'Message length max', + 'object_config_param_webfile_dc_id_type_int' => 'Webfile DC ID', + 'object_inputBotInlineMessageMediaContact_param_vcard_type_string' => 'Vcard', + 'object_botInlineMessageMediaContact_param_vcard_type_string' => 'Vcard', + 'object_contacts.topPeersDisabled' => 'Top peers disabled', + 'object_draftMessageEmpty_param_date_type_int' => 'Date', + 'object_inputWebFileGeoPointLocation_param_access_hash_type_long' => 'Access hash', 'method_contacts.getContacts_param_hash_type_Vector t' => 'User IDs of previously cached contacts', 'method_contacts.getTopPeers_param_hash_type_Vector t' => 'Peer IDs of previously cached peers', 'method_messages.getDialogs_param_hash_type_Vector t' => 'IDs of previously fetched dialogs', 'method_messages.getHistory_param_hash_type_Vector t' => 'IDs of messages you already fetched', 'method_messages.search_param_hash_type_Vector t' => 'The IDs of messages you already fetched', 'method_messages.getStickers_param_hash_type_Vector t' => ' the hash parameter of the previous result of this method', - 'method_messages.getAllStickers_param_hash_type_Vector t' => 'the hash parameter of the previous result of this method', + 'method_messages.getAllStickers_param_hash_type_Vector t' => 'The hash parameter of the previous result of this method', 'method_messages.getSavedGifs_param_hash_type_Vector t' => ' the hash parameter of the previous result of this method', 'method_messages.getFeaturedStickers_param_hash_type_Vector t' => ' the hash parameter of the previous result of this method', 'method_messages.getRecentStickers_param_hash_type_Vector t' => 'IDs the hash parameter of the previous result of this method', @@ -8752,5 +9050,298 @@ class Lang 'method_messages.getRecentLocations_param_hash_type_Vector t' => 'IDs of locations you already fetched', 'method_messages.searchStickerSets_param_hash_type_Vector t' => 'The IDs of stickersets you already fetched', 'method_channels.getParticipants_param_hash_type_Vector t' => 'IDs of previously fetched participants', + 'method_auth.checkPassword_param_password_type_InputCheckPasswordSRP' => 'You cannot use this method directly, use the complete_2fa_login method instead (see https://docs.madelineproto.xyz for more info)', + 'method_account.getPasswordSettings_param_password_type_InputCheckPasswordSRP' => 'You cannot use this method directly; use $MadelineProto->update_2fa($params), instead (see https://docs.madelineproto.xyz for more info)', + 'method_account.updatePasswordSettings_param_password_type_InputCheckPasswordSRP' => 'You cannot use this method directly; use $MadelineProto->update_2fa($params), instead (see https://docs.madelineproto.xyz for more info)', + 'method_account.getTmpPassword_param_password_type_InputCheckPasswordSRP' => 'Password', + 'method_account.confirmPasswordEmail' => 'Confirm password recovery using email', + 'method_account.confirmPasswordEmail_param_code_type_string' => 'Code', + 'method_account.resendPasswordEmail' => 'Resend password recovery email', + 'method_account.cancelPasswordEmail' => 'Cancel password recovery email', + 'method_account.getContactSignUpNotification' => 'Contact signup notification setting value', + 'method_account.setContactSignUpNotification' => 'Set contact sign up notification', + 'method_account.setContactSignUpNotification_param_silent_type_Bool' => 'Silent?', + 'method_account.getNotifyExceptions' => 'Get notification exceptions', + 'method_account.getNotifyExceptions_param_compare_sound_type_true' => 'Compare sound?', + 'method_account.getNotifyExceptions_param_peer_type_InputNotifyPeer' => 'Peer', + 'method_contacts.getContactIDs' => 'Get contacts by IDs', + 'method_contacts.getContactIDs_param_hash_type_Vector t' => 'Previously fetched IDs', + 'method_contacts.deleteByPhones' => 'Delete contacts by phones', + 'method_contacts.deleteByPhones_param_phones_type_Vector t' => 'Phones', + 'method_messages.sendInlineBotResult_param_hide_via_type_true' => 'Hide "via @bot"', + 'method_messages.clearAllDrafts' => 'Clear all drafts', + 'method_messages.updatePinnedMessage' => 'Update pinned message (private chat only)', + 'method_messages.updatePinnedMessage_param_silent_type_true' => 'Silent?', + 'method_messages.updatePinnedMessage_param_peer_type_InputPeer' => 'Peer', + 'method_messages.updatePinnedMessage_param_id_type_int' => 'Message ID', + 'method_messages.sendVote' => 'Send vote', + 'method_messages.sendVote_param_peer_type_InputPeer' => 'Peer', + 'method_messages.sendVote_param_msg_id_type_int' => 'Message ID', + 'method_messages.sendVote_param_options_type_Vector t' => 'Options', + 'method_messages.getPollResults' => 'Get poll results', + 'method_messages.getPollResults_param_peer_type_InputPeer' => 'Peer', + 'method_messages.getPollResults_param_msg_id_type_int' => 'Message ID', + 'method_messages.getOnlines' => 'Get online users', + 'method_messages.getOnlines_param_peer_type_InputPeer' => 'Peer', + 'method_messages.getStatsURL' => 'Get stats URL', + 'method_messages.getStatsURL_param_peer_type_InputPeer' => 'Peer', + 'method_help.getAppUpdate_param_source_type_string' => 'Source', + 'method_help.getAppConfig' => 'Get app config', + 'method_help.getPassportConfig' => 'Get passport config', + 'method_help.getPassportConfig_param_hash_type_Vector t' => 'Hash', + 'method_help.getSupportName' => 'Get support name', + 'method_help.getUserInfo' => 'Get user info', + 'method_help.getUserInfo_param_user_id_type_InputUser' => 'User ID', + 'method_help.editUserInfo' => 'Edit user info', + 'method_help.editUserInfo_param_user_id_type_InputUser' => 'User ID', + 'method_help.editUserInfo_param_message_type_string' => 'Message', + 'method_help.editUserInfo_param_entities_type_Vector t' => 'Entities', + 'method_langpack.getLangPack_param_lang_pack_type_string' => 'Lang pack', + 'method_langpack.getStrings_param_lang_pack_type_string' => 'Lang pack', + 'method_langpack.getDifference_param_lang_code_type_string' => 'Lang code', + 'method_langpack.getLanguages_param_lang_pack_type_string' => 'Lang pack', + 'method_langpack.getLanguage' => 'Get language', + 'method_langpack.getLanguage_param_lang_pack_type_string' => 'Lang pack', + 'method_langpack.getLanguage_param_lang_code_type_string' => 'Lang code', + 'object_inputMediaGeoLive_param_stopped_type_true' => 'Stopped?', + 'object_inputMediaPoll' => 'Media poll', + 'object_inputMediaPoll_param_poll_type_Poll' => 'Poll', + 'object_inputPhoto_param_file_reference_type_bytes' => 'File reference', + 'object_inputFileLocation_param_file_reference_type_bytes' => 'File reference', + 'object_inputDocumentFileLocation_param_file_reference_type_bytes' => 'File reference', + 'object_fileLocation_param_file_reference_type_bytes' => 'File reference', + 'object_chatFull_param_pinned_msg_id_type_int' => 'Pinned msg ID', + 'object_channelFull_param_can_view_stats_type_true' => 'Can view stats?', + 'object_channelFull_param_online_count_type_int' => 'Online count', + 'object_message_param_from_scheduled_type_true' => 'From scheduled?', + 'object_messageMediaPoll' => 'Message media poll', + 'object_messageMediaPoll_param_poll_type_Poll' => 'Poll', + 'object_messageMediaPoll_param_results_type_PollResults' => 'Results', + 'object_messageActionContactSignUp' => 'Message action contact sign up', + 'object_photo_param_file_reference_type_bytes' => 'File reference', + 'object_inputNotifyBroadcasts' => 'Notify broadcasts', + 'object_inputReportReasonChildAbuse' => 'Report reason child abuse', + 'object_inputReportReasonCopyright' => 'Report reason copyright', + 'object_userFull_param_can_pin_message_type_true' => 'Can pin message?', + 'object_userFull_param_pinned_msg_id_type_int' => 'Pinned msg ID', + 'object_messages.channelMessages_param_inexact_type_true' => 'Inexact?', + 'object_updateLangPackTooLong_param_lang_code_type_string' => 'Lang code', + 'object_updateUserPinnedMessage' => 'Update user pinned message', + 'object_updateUserPinnedMessage_param_user_id_type_int' => 'User ID', + 'object_updateUserPinnedMessage_param_id_type_int' => 'ID', + 'object_updateChatPinnedMessage' => 'Update chat pinned message', + 'object_updateChatPinnedMessage_param_chat_id_type_int' => 'Chat ID', + 'object_updateChatPinnedMessage_param_id_type_int' => 'ID', + 'object_updateMessagePoll' => 'Update message poll', + 'object_updateMessagePoll_param_poll_id_type_long' => 'Poll ID', + 'object_updateMessagePoll_param_poll_type_Poll' => 'Poll', + 'object_updateMessagePoll_param_results_type_PollResults' => 'Results', + 'object_config_param_pfs_enabled_type_true' => 'Pfs enabled?', + 'object_config_param_base_lang_pack_version_type_int' => 'Base lang pack version', + 'object_help.appUpdate_param_popup_type_true' => 'Popup?', + 'object_help.appUpdate_param_version_type_string' => 'Version', + 'object_help.appUpdate_param_entities_type_Vector t' => 'Entities', + 'object_help.appUpdate_param_document_type_Document' => 'Document', + 'object_inputDocument_param_file_reference_type_bytes' => 'File reference', + 'object_document_param_file_reference_type_bytes' => 'File reference', + 'object_notifyBroadcasts' => 'Notify broadcasts', + 'object_inputPrivacyKeyPhoneP2P' => 'Privacy key phone p2p', + 'object_privacyKeyPhoneP2P' => 'Privacy key phone p2p', + 'object_authorization_param_current_type_true' => 'Current?', + 'object_authorization_param_official_app_type_true' => 'Official app?', + 'object_authorization_param_password_pending_type_true' => 'Password pending?', + 'object_account.password_param_has_password_type_true' => 'Has password?', + 'object_account.password_param_current_algo_type_PasswordKdfAlgo' => 'Current algo', + 'object_account.password_param_srp_B_type_bytes' => 'Srp b', + 'object_account.password_param_srp_id_type_long' => 'Srp ID', + 'object_account.password_param_new_algo_type_PasswordKdfAlgo' => 'New algo', + 'object_account.password_param_new_secure_algo_type_SecurePasswordKdfAlgo' => 'New secure algo', + 'object_account.passwordSettings_param_secure_settings_type_SecureSecretSettings' => 'Secure settings', + 'object_account.passwordInputSettings_param_new_algo_type_PasswordKdfAlgo' => 'New algo', + 'object_account.passwordInputSettings_param_new_secure_settings_type_SecureSecretSettings' => 'New secure settings', + 'object_textSubscript' => 'Text subscript', + 'object_textSubscript_param_text_type_RichText' => 'Text', + 'object_textSuperscript' => 'Text superscript', + 'object_textSuperscript_param_text_type_RichText' => 'Text', + 'object_textMarked' => 'Text marked', + 'object_textMarked_param_text_type_RichText' => 'Text', + 'object_textPhone' => 'Text phone', + 'object_textPhone_param_text_type_RichText' => 'Text', + 'object_textPhone_param_phone_type_string' => 'Phone', + 'object_textImage' => 'Text image', + 'object_textImage_param_document_id_type_long' => 'Document ID', + 'object_textImage_param_w_type_int' => 'Width', + 'object_textImage_param_h_type_int' => 'Height', + 'object_textAnchor' => 'Text anchor', + 'object_textAnchor_param_text_type_RichText' => 'Text', + 'object_textAnchor_param_name_type_string' => 'Name', + 'object_pageBlockPhoto_param_caption_type_PageCaption' => 'Caption', + 'object_pageBlockPhoto_param_url_type_string' => 'URL', + 'object_pageBlockPhoto_param_webpage_id_type_long' => 'Webpage ID', + 'object_pageBlockVideo_param_caption_type_PageCaption' => 'Caption', + 'object_pageBlockEmbed_param_caption_type_PageCaption' => 'Caption', + 'object_pageBlockEmbedPost_param_caption_type_PageCaption' => 'Caption', + 'object_pageBlockCollage_param_caption_type_PageCaption' => 'Caption', + 'object_pageBlockSlideshow_param_caption_type_PageCaption' => 'Caption', + 'object_pageBlockAudio_param_caption_type_PageCaption' => 'Caption', + 'object_pageBlockKicker' => 'Page block kicker', + 'object_pageBlockKicker_param_text_type_RichText' => 'Text', + 'object_pageBlockTable' => 'Page block table', + 'object_pageBlockTable_param_bordered_type_true' => 'Bordered?', + 'object_pageBlockTable_param_striped_type_true' => 'Striped?', + 'object_pageBlockTable_param_title_type_RichText' => 'Title', + 'object_pageBlockTable_param_rows_type_Vector t' => 'Rows', + 'object_pageBlockOrderedList' => 'Page block ordered list', + 'object_pageBlockOrderedList_param_items_type_Vector t' => 'Items', + 'object_pageBlockDetails' => 'Page block details', + 'object_pageBlockDetails_param_open_type_true' => 'Open?', + 'object_pageBlockDetails_param_blocks_type_Vector t' => 'Blocks', + 'object_pageBlockDetails_param_title_type_RichText' => 'Title', + 'object_pageBlockRelatedArticles' => 'Page block related articles', + 'object_pageBlockRelatedArticles_param_title_type_RichText' => 'Title', + 'object_pageBlockRelatedArticles_param_articles_type_Vector t' => 'Articles', + 'object_pageBlockMap' => 'Page block map', + 'object_pageBlockMap_param_geo_type_GeoPoint' => 'Geo', + 'object_pageBlockMap_param_zoom_type_int' => 'Zoom', + 'object_pageBlockMap_param_w_type_int' => 'Width', + 'object_pageBlockMap_param_h_type_int' => 'Height', + 'object_pageBlockMap_param_caption_type_PageCaption' => 'Caption', + 'object_phoneCall_param_p2p_allowed_type_true' => 'P2p allowed?', + 'object_langPackLanguage_param_official_type_true' => 'Official?', + 'object_langPackLanguage_param_rtl_type_true' => 'Rtl?', + 'object_langPackLanguage_param_beta_type_true' => 'Beta?', + 'object_langPackLanguage_param_base_lang_code_type_string' => 'Base lang code', + 'object_langPackLanguage_param_plural_code_type_string' => 'Plural code', + 'object_langPackLanguage_param_strings_count_type_int' => 'Strings count', + 'object_langPackLanguage_param_translated_count_type_int' => 'Translated count', + 'object_langPackLanguage_param_translations_url_type_string' => 'Translations URL', + 'object_secureValue_param_translation_type_Vector t' => 'Translation', + 'object_inputSecureValue_param_translation_type_Vector t' => 'Translation', + 'object_secureValueError' => 'Secure value error', + 'object_secureValueError_param_type_type_SecureValueType' => 'Type', + 'object_secureValueError_param_hash_type_bytes' => 'Hash', + 'object_secureValueError_param_text_type_string' => 'Text', + 'object_secureValueErrorTranslationFile' => 'Secure value error translation file', + 'object_secureValueErrorTranslationFile_param_type_type_SecureValueType' => 'Type', + 'object_secureValueErrorTranslationFile_param_file_hash_type_bytes' => 'File hash', + 'object_secureValueErrorTranslationFile_param_text_type_string' => 'Text', + 'object_secureValueErrorTranslationFiles' => 'Secure value error translation files', + 'object_secureValueErrorTranslationFiles_param_type_type_SecureValueType' => 'Type', + 'object_secureValueErrorTranslationFiles_param_file_hash_type_Vector t' => 'File hash', + 'object_secureValueErrorTranslationFiles_param_text_type_string' => 'Text', + 'object_passwordKdfAlgoUnknown' => 'Password kdf algo unknown', + 'object_passwordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow' => 'Password kdf algo sha256sha256pbkdf2hmacsh a512iter100000 sha256 mod pow', + 'object_passwordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow_param_salt1_type_bytes' => 'Salt1', + 'object_passwordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow_param_salt2_type_bytes' => 'Salt2', + 'object_passwordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow_param_g_type_int' => 'G', + 'object_passwordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow_param_p_type_bytes' => 'P', + 'object_securePasswordKdfAlgoUnknown' => 'Secure password kdf algo unknown', + 'object_securePasswordKdfAlgoPBKDF2HMACSHA512iter100000' => 'Secure password kdf algo pbkdf2hmacsh a512iter100000', + 'object_securePasswordKdfAlgoPBKDF2HMACSHA512iter100000_param_salt_type_bytes' => 'Salt', + 'object_securePasswordKdfAlgoSHA512' => 'Secure password kdf algo sha512', + 'object_securePasswordKdfAlgoSHA512_param_salt_type_bytes' => 'Salt', + 'object_secureSecretSettings' => 'Secure secret settings', + 'object_secureSecretSettings_param_secure_algo_type_SecurePasswordKdfAlgo' => 'Secure algo', + 'object_secureSecretSettings_param_secure_secret_type_bytes' => 'Secure secret', + 'object_secureSecretSettings_param_secure_secret_id_type_long' => 'Secure secret ID', + 'object_inputCheckPasswordEmpty' => 'Empty input check password', + 'object_inputCheckPasswordSRP' => 'Check password srp', + 'object_inputCheckPasswordSRP_param_srp_id_type_long' => 'Srp ID', + 'object_inputCheckPasswordSRP_param_A_type_bytes' => 'A', + 'object_inputCheckPasswordSRP_param_M1_type_bytes' => 'M1', + 'object_secureRequiredType' => 'Secure required type', + 'object_secureRequiredType_param_native_names_type_true' => 'Native names?', + 'object_secureRequiredType_param_selfie_required_type_true' => 'Selfie required?', + 'object_secureRequiredType_param_translation_required_type_true' => 'Translation required?', + 'object_secureRequiredType_param_type_type_SecureValueType' => 'Type', + 'object_secureRequiredTypeOneOf' => 'Secure required type one of', + 'object_secureRequiredTypeOneOf_param_types_type_Vector t' => 'Types', + 'object_help.passportConfigNotModified' => 'Passport config not modified', + 'object_help.passportConfig' => 'Passport config', + 'object_help.passportConfig_param_hash_type_int' => 'Hash', + 'object_help.passportConfig_param_countries_langs_type_DataJSON' => 'Countries langs', + 'object_inputAppEvent_param_data_type_JSONValue' => 'Data', + 'object_jsonObjectValue' => 'Json object value', + 'object_jsonObjectValue_param_key_type_string' => 'Key', + 'object_jsonObjectValue_param_value_type_JSONValue' => 'Value', + 'object_jsonNull' => 'Json null', + 'object_jsonBool' => 'Json bool', + 'object_jsonBool_param_value_type_Bool' => 'Value?', + 'object_jsonNumber' => 'Json number', + 'object_jsonNumber_param_value_type_double' => 'Value', + 'object_jsonString' => 'Json string', + 'object_jsonString_param_value_type_string' => 'Value', + 'object_jsonArray' => 'Json array', + 'object_jsonArray_param_value_type_Vector t' => 'Value', + 'object_jsonObject' => 'Json object', + 'object_jsonObject_param_value_type_Vector t' => 'Value', + 'object_pageTableCell' => 'Page table cell', + 'object_pageTableCell_param_header_type_true' => 'Header?', + 'object_pageTableCell_param_align_center_type_true' => 'Align center?', + 'object_pageTableCell_param_align_right_type_true' => 'Align right?', + 'object_pageTableCell_param_valign_middle_type_true' => 'Valign middle?', + 'object_pageTableCell_param_valign_bottom_type_true' => 'Valign bottom?', + 'object_pageTableCell_param_text_type_RichText' => 'Text', + 'object_pageTableCell_param_colspan_type_int' => 'Colspan', + 'object_pageTableCell_param_rowspan_type_int' => 'Rowspan', + 'object_pageTableRow' => 'Page table row', + 'object_pageTableRow_param_cells_type_Vector t' => 'Cells', + 'object_pageCaption' => 'Page caption', + 'object_pageCaption_param_text_type_RichText' => 'Text', + 'object_pageCaption_param_credit_type_RichText' => 'Credit', + 'object_pageListItemText' => 'Page list item text', + 'object_pageListItemText_param_text_type_RichText' => 'Text', + 'object_pageListItemBlocks' => 'Page list item blocks', + 'object_pageListItemBlocks_param_blocks_type_Vector t' => 'Blocks', + 'object_pageListOrderedItemText' => 'Page list ordered item text', + 'object_pageListOrderedItemText_param_num_type_string' => 'Num', + 'object_pageListOrderedItemText_param_text_type_RichText' => 'Text', + 'object_pageListOrderedItemBlocks' => 'Page list ordered item blocks', + 'object_pageListOrderedItemBlocks_param_num_type_string' => 'Num', + 'object_pageListOrderedItemBlocks_param_blocks_type_Vector t' => 'Blocks', + 'object_pageRelatedArticle' => 'Page related article', + 'object_pageRelatedArticle_param_url_type_string' => 'URL', + 'object_pageRelatedArticle_param_webpage_id_type_long' => 'Webpage ID', + 'object_pageRelatedArticle_param_title_type_string' => 'Title', + 'object_pageRelatedArticle_param_description_type_string' => 'Description', + 'object_pageRelatedArticle_param_photo_id_type_long' => 'Photo ID', + 'object_pageRelatedArticle_param_author_type_string' => 'Author', + 'object_pageRelatedArticle_param_published_date_type_int' => 'Published date', + 'object_page' => 'Page', + 'object_page_param_part_type_true' => 'Part?', + 'object_page_param_rtl_type_true' => 'Rtl?', + 'object_page_param_v2_type_true' => 'V2?', + 'object_page_param_url_type_string' => 'URL', + 'object_page_param_blocks_type_Vector t' => 'Blocks', + 'object_page_param_photos_type_Vector t' => 'Photos', + 'object_page_param_documents_type_Vector t' => 'Documents', + 'object_help.supportName' => 'Support name', + 'object_help.supportName_param_name_type_string' => 'Name', + 'object_help.userInfoEmpty' => 'Empty user info', + 'object_help.userInfo' => 'User info', + 'object_help.userInfo_param_message_type_string' => 'Message', + 'object_help.userInfo_param_entities_type_Vector t' => 'Entities', + 'object_help.userInfo_param_author_type_string' => 'Author', + 'object_help.userInfo_param_date_type_int' => 'Date', + 'object_pollAnswer' => 'Poll answer', + 'object_pollAnswer_param_text_type_string' => 'Text', + 'object_pollAnswer_param_option_type_bytes' => 'Option', + 'object_poll' => 'Poll', + 'object_poll_param_id_type_long' => 'ID', + 'object_poll_param_closed_type_true' => 'Closed?', + 'object_poll_param_question_type_string' => 'Question', + 'object_poll_param_answers_type_Vector t' => 'Answers', + 'object_pollAnswerVoters' => 'Poll answer voters', + 'object_pollAnswerVoters_param_chosen_type_true' => 'Chosen?', + 'object_pollAnswerVoters_param_option_type_bytes' => 'Option', + 'object_pollAnswerVoters_param_voters_type_int' => 'Voters', + 'object_pollResults' => 'Poll results', + 'object_pollResults_param_min_type_true' => 'Min?', + 'object_pollResults_param_results_type_Vector t' => 'Results', + 'object_pollResults_param_total_voters_type_int' => 'Total voters', + 'object_chatOnlines' => 'Chat onlines', + 'object_chatOnlines_param_onlines_type_int' => 'Onlines', + 'object_statsURL' => 'Stats URL', + 'object_statsURL_param_url_type_string' => 'URL', ); -} \ No newline at end of file +} diff --git a/src/danog/MadelineProto/Logger.php b/src/danog/MadelineProto/Logger.php index 37d1cbff..4c2bfd9c 100644 --- a/src/danog/MadelineProto/Logger.php +++ b/src/danog/MadelineProto/Logger.php @@ -1,21 +1,29 @@ . -*/ +/** + * Logger module. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see . + * + * @author Daniil Gentili + * @copyright 2016-2018 Daniil Gentili + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ /* * Logger class */ namespace danog\MadelineProto; +use Amp\ByteStream\ResourceOutputStream; + class Logger { const foreground = ['default' => 39, 'black' => 30, 'red' => 31, 'green' => 32, 'yellow' => 33, 'blue' => 34, 'magenta' => 35, 'cyan' => 36, 'light_gray' => 37, 'dark_gray' => 90, 'light_red' => 91, 'light_green' => 92, 'light_yellow' => 93, 'light_blue' => 94, 'light_magenta' => 95, 'light_cyan' => 96, 'white' => 97]; @@ -28,6 +36,7 @@ class Logger public $prefix = ''; public $level = 3; public $colors = []; + public $newline = "\n"; public static $default; public static $printed = false; @@ -82,6 +91,23 @@ class Logger $this->colors[self::WARNING] = implode(';', [self::foreground['white'], self::set['dim'], self::background['red']]); $this->colors[self::ERROR] = implode(';', [self::foreground['white'], self::set['bold'], self::background['red']]); $this->colors[self::FATAL_ERROR] = implode(';', [self::foreground['red'], self::set['bold'], self::background['light_gray']]); + $this->newline = PHP_EOL; + + if ($this->mode === 3) { + $this->stdout = new ResourceOutputStream(STDOUT); + if (php_sapi_name() !== 'cli') $this->newline = '
'.$this->newline; + } elseif ($this->mode === 2) { + $this->stdout = new ResourceOutputStream(fopen($this->optional, 'a+')); + } elseif ($this->mode === 1) { + $result = @ini_get('error_log'); + if ($result === 'syslog') { + $this->stdout = new ResourceOutputStream(STDERR); + } elseif ($result) { + $this->stdout = new ResourceOutputStream(fopen($result, 'a+')); + } else { + $this->stdout = new ResourceOutputStream(STDERR); + } + } } public static function log($param, $level = self::NOTICE) @@ -126,13 +152,10 @@ class Logger $param = str_pad($file.$prefix.': ', 16 + strlen($prefix))."\t".$param; switch ($this->mode) { case 1: - error_log($param); + $this->stdout->write($param.$this->newline); break; - case 2: - error_log($param.PHP_EOL, 3, $this->optional); - break; - case 3: - echo Magic::$isatty ? "\33[".$this->colors[$level].'m'.$param."\33[0m".PHP_EOL : $param.PHP_EOL; + default: + $this->stdout->write(Magic::$isatty ? "\33[".$this->colors[$level].'m'.$param."\33[0m".$this->newline : $param.$this->newline); break; } } diff --git a/src/danog/MadelineProto/Loop/Connection/CheckLoop.php b/src/danog/MadelineProto/Loop/Connection/CheckLoop.php new file mode 100644 index 00000000..619d8cbc --- /dev/null +++ b/src/danog/MadelineProto/Loop/Connection/CheckLoop.php @@ -0,0 +1,158 @@ +. + * + * @author Daniil Gentili + * @copyright 2016-2018 Daniil Gentili + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ + +namespace danog\MadelineProto\Loop\Connection; + +use Amp\Deferred; +use danog\MadelineProto\Logger; +use danog\MadelineProto\Loop\Impl\ResumableSignalLoop; +use function Amp\call; + +/** + * RPC call status check loop. + * + * @author Daniil Gentili + */ +class CheckLoop extends ResumableSignalLoop +{ + public function loop(): \Generator + { + $API = $this->API; + $datacenter = $this->datacenter; + $connection = $this->connection; + + $this->startedLoop(); + $API->logger->logger("Entered check loop in DC {$datacenter}", Logger::ULTRA_VERBOSE); + + $try_count = 0; + + $timeout = $API->settings['connection_settings'][isset($API->settings['connection_settings'][$datacenter]) ? $datacenter : 'all']['timeout']; + while (true) { + while (empty($connection->new_outgoing)) { + if (yield $this->waitSignal($this->pause())) { + $API->logger->logger('Exiting check loop'); + $this->exitedLoop(); + + return; + } + $try_count = 0; + } + + if ($connection->hasPendingCalls()) { + $last_recv = $connection->last_recv; + if ($connection->temp_auth_key !== null) { + $message_ids = array_values($connection->new_outgoing); + $deferred = new Deferred(); + $deferred->promise()->onResolve( + function ($e, $result) use ($message_ids, $API, $connection, $datacenter) { + if ($e) { + throw $e; + } + $reply = []; + foreach (str_split($result['info']) as $key => $chr) { + $message_id = $message_ids[$key]; + if (!isset($connection->outgoing_messages[$message_id])) { + $API->logger->logger('Already got response for and forgot about message ID '.($message_id)); + continue; + } + if (!isset($connection->new_outgoing[$message_id])) { + $API->logger->logger('Already got response for '.$connection->outgoing_messages[$message_id]['_'].' with message ID '.($message_id)); + continue; + } + $chr = ord($chr); + switch ($chr & 7) { + case 0: + $API->logger->logger('Wrong message status 0 for '.$connection->outgoing_messages[$message_id]['_'], \danog\MadelineProto\Logger::FATAL_ERROR); + break; + case 1: + case 2: + case 3: + if ($connection->outgoing_messages[$message_id]['_'] === 'msgs_state_req') { + break; + } + $API->logger->logger('Message '.$connection->outgoing_messages[$message_id]['_'].' with message ID '.($message_id).' not received by server, resending...', \danog\MadelineProto\Logger::ERROR); + $API->method_recall('', ['message_id' => $message_id, 'datacenter' => $datacenter, 'postpone' => true]); + break; + case 4: + if ($chr & 32) { + $API->logger->logger('Message '.$connection->outgoing_messages[$message_id]['_'].' with message ID '.($message_id).' received by server and is being processed, waiting...', \danog\MadelineProto\Logger::ERROR); + } elseif ($chr & 64) { + $API->logger->logger('Message '.$connection->outgoing_messages[$message_id]['_'].' with message ID '.($message_id).' received by server and was already processed, requesting reply...', \danog\MadelineProto\Logger::ERROR); + $reply[] = $message_id; + } elseif ($chr & 128) { + $API->logger->logger('Message '.$connection->outgoing_messages[$message_id]['_'].' with message ID '.($message_id).' received by server and was already sent, requesting reply...', \danog\MadelineProto\Logger::ERROR); + $reply[] = $message_id; + } else { + $API->logger->logger('Message '.$connection->outgoing_messages[$message_id]['_'].' with message ID '.($message_id).' received by server, requesting reply...', \danog\MadelineProto\Logger::ERROR); + $reply[] = $message_id; + } + } + } + if ($reply) { + $API->object_call('msg_resend_ans_req', ['msg_ids' => $reply], ['datacenter' => $datacenter, 'postpone' => true]); + } + $connection->writer->resume(); + } + ); + $list = ''; + foreach ($message_ids as $message_id) { + $list .= $connection->outgoing_messages[$message_id]['_'].', '; + } + $API->logger->logger("Still missing $list on DC $datacenter, sending state request", \danog\MadelineProto\Logger::ERROR); + yield $API->object_call_async('msgs_state_req', ['msg_ids' => $message_ids], ['datacenter' => $datacenter, 'promise' => $deferred]); + } else { + foreach ($connection->new_outgoing as $message_id) { + if (isset($connection->outgoing_messages[$message_id]['sent']) + && $connection->outgoing_messages[$message_id]['sent'] + $timeout < time() + && $connection->outgoing_messages[$message_id]['unencrypted'] + ) { + $API->logger->logger('Still missing '.$connection->outgoing_messages[$message_id]['_'].' with message id '.($message_id)." on DC $datacenter, resending", \danog\MadelineProto\Logger::ERROR); + $API->method_recall('', ['message_id' => $message_id, 'datacenter' => $datacenter, 'postpone' => true]); + } + } + $connection->writer->resume(); + } + //$t = time(); + if (yield $this->waitSignal($this->pause($timeout))) { + $API->logger->logger('Exiting check loop'); + $this->exitedLoop(); + + return; + } + //var_dumP("after ".(time() - $t).", with timeout ".$timeout); + + $try_count++; + if ($connection->last_recv === $last_recv) { + $API->logger->logger("Reconnecting and exiting check loop on DC $datacenter"); + $this->exitedLoop(); + yield $connection->reconnect(); + + return; + } + } else { + if (yield $this->waitSignal($this->pause($timeout))) { + $API->logger->logger('Exiting check loop'); + $this->exitedLoop(); + + return; + } + $try_count = 0; + } + } + } +} diff --git a/src/danog/MadelineProto/Loop/Connection/HttpWaitLoop.php b/src/danog/MadelineProto/Loop/Connection/HttpWaitLoop.php new file mode 100644 index 00000000..ae3b151f --- /dev/null +++ b/src/danog/MadelineProto/Loop/Connection/HttpWaitLoop.php @@ -0,0 +1,83 @@ +. + * + * @author Daniil Gentili + * @copyright 2016-2018 Daniil Gentili + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ + +namespace danog\MadelineProto\Loop\Connection; + +use Amp\Success; +use danog\MadelineProto\Logger; +use danog\MadelineProto\Loop\Impl\ResumableSignalLoop; +use danog\MadelineProto\Stream\MTProtoTransport\HttpsStream; +use danog\MadelineProto\Stream\MTProtoTransport\HttpStream; + +/** + * HttpWait loop. + * + * @author Daniil Gentili + */ +class HttpWaitLoop extends ResumableSignalLoop +{ + public function loop(): \Generator + { + $API = $this->API; + $datacenter = $this->datacenter; + $connection = $this->connection; + + if (!in_array($connection->getCtx()->getStreamName(), [HttpStream::getName(), HttpsStream::getName()])) { + yield new Success(0); + + return; + } + + $this->startedLoop(); + $API->logger->logger("Entered HTTP wait loop in DC {$datacenter}", Logger::ULTRA_VERBOSE); + + $timeout = $API->settings['connection_settings'][isset($API->settings['connection_settings'][$datacenter]) ? $datacenter : 'all']['timeout']; + while (true) { + //var_dump("http loop DC $datacenter"); + if ($a = yield $this->waitSignal($this->pause())) { + $API->logger->logger('Exiting HTTP wait loop'); + $this->exitedLoop(); + + return; + } + if (!in_array($connection->getCtx()->getStreamName(), [HttpStream::getName(), HttpsStream::getName()])) { + $this->exitedLoop(); + yield new Success(0); + + return; + } + while ($connection->temp_auth_key === null) { + if (yield $this->waitSignal($this->pause())) { + $API->logger->logger('Exiting HTTP wait loop'); + $this->exitedLoop(); + + return; + } + } + //if (time() - $connection->last_http_wait >= $timeout) { + $API->logger->logger("DC $datacenter: request {$connection->http_req_count}, response {$connection->http_res_count}"); + if ($connection->http_req_count === $connection->http_res_count && (!empty($connection->pending_outgoing) || (!empty($connection->new_outgoing) && !$connection->hasPendingCalls()))) { + yield $connection->sendMessage(['_' => 'http_wait', 'body' => ['max_wait' => 30000, 'wait_after' => 0, 'max_delay' => 0], 'content_related' => true, 'unencrypted' => false, 'method' => false]); + //var_dump('sent wait'); + } + $API->logger->logger("DC $datacenter: request {$connection->http_req_count}, response {$connection->http_res_count}"); + + //($connection->last_http_wait + $timeout) - time() + } + } +} diff --git a/src/danog/MadelineProto/Loop/Connection/ReadLoop.php b/src/danog/MadelineProto/Loop/Connection/ReadLoop.php new file mode 100644 index 00000000..12c49ad1 --- /dev/null +++ b/src/danog/MadelineProto/Loop/Connection/ReadLoop.php @@ -0,0 +1,220 @@ +. + * + * @author Daniil Gentili + * @copyright 2016-2018 Daniil Gentili + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ + +namespace danog\MadelineProto\Loop\Connection; + +use Amp\Loop; +use Amp\Promise; +use Amp\Websocket\ClosedException; +use danog\MadelineProto\Logger; +use danog\MadelineProto\Loop\Impl\SignalLoop; +use danog\MadelineProto\MTProtoTools\Crypt; +use danog\MadelineProto\NothingInTheSocketException; +use danog\MadelineProto\Tools; +use function Amp\call; + +/** + * Socket read loop. + * + * @author Daniil Gentili + */ +class ReadLoop extends SignalLoop +{ + use Tools; + use Crypt; + + public function loop(): \Generator + { + $API = $this->API; + $datacenter = $this->datacenter; + $connection = $this->connection; + + $this->startedLoop(); + $API->logger->logger("Entered read loop in DC {$datacenter}", Logger::ULTRA_VERBOSE); + $timeout = $API->settings['connection_settings'][isset($API->settings['connection_settings'][$datacenter]) ? $datacenter : 'all']['timeout']; + + while (true) { + try { + $error = yield $this->waitSignal($this->readMessage()); + } catch (NothingInTheSocketException $e) { + if (isset($connection->old)) { + $this->exitedLoop(); + $API->logger->logger("Exiting read loop in DC $datacenter"); + + return; + } + $API->logger->logger("Got nothing in the socket in DC {$datacenter}, reconnecting...", Logger::ERROR); + yield $connection->reconnect(); + continue; + } catch (ClosedException $e) { + $API->logger->logger($e->getMessage(), Logger::FATAL_ERROR); + + throw $e; + } + + if (is_int($error)) { + $this->exitedLoop(); + yield $connection->reconnect(); + + if ($error === -404) { + if ($connection->temp_auth_key !== null) { + $API->logger->logger("WARNING: Resetting auth key in DC {$datacenter}...", \danog\MadelineProto\Logger::WARNING); + $connection->temp_auth_key = null; + $connection->session_id = null; + foreach ($connection->new_outgoing as $message_id) { + $connection->outgoing_messages[$message_id]['sent'] = 0; + } + $API->init_authorization(); + } else { + //throw new \danog\MadelineProto\RPCErrorException($error, $error); + } + } elseif ($error === -1) { + $API->logger->logger("WARNING: Got quick ack from DC {$datacenter}", \danog\MadelineProto\Logger::WARNING); + } elseif ($error === 0) { + $API->logger->logger("Got NOOP from DC {$datacenter}", \danog\MadelineProto\Logger::WARNING); + } else { + throw new \danog\MadelineProto\RPCErrorException($error, $error); + } + + return; + } + + $connection->http_res_count++; + + try { + $API->handle_messages($datacenter); + } finally { + $this->exitedLoop(); + } + $this->startedLoop(); +// Loop::defer(function () use ($datacenter) { + if ($this->API->is_http($datacenter)) { + $this->API->datacenter->sockets[$datacenter]->waiter->resume(); + } // }); + } + } + + public function readMessage(): Promise + { + return call([$this, 'readMessageAsync']); + } + + public function readMessageAsync(): \Generator + { + $API = $this->API; + $datacenter = $this->datacenter; + $connection = $this->connection; + + try { + $buffer = yield $connection->stream->getReadBuffer($payload_length); + } catch (ClosedException $e) { + $API->logger->logger($e->getReason()); + if (strpos($e->getReason(), ' ') === 0) { + $payload = -substr($e->getReason(), 7); + $API->logger->logger("Received $payload from DC ".$datacenter, \danog\MadelineProto\Logger::ULTRA_VERBOSE); + + return $payload; + } + + throw $e; + } + + if ($payload_length === 4) { + $payload = $this->unpack_signed_int(yield $buffer->bufferRead(4)); + $API->logger->logger("Received $payload from DC ".$datacenter, \danog\MadelineProto\Logger::ULTRA_VERBOSE); + + return $payload; + } + $auth_key_id = yield $buffer->bufferRead(8); + if ($auth_key_id === "\0\0\0\0\0\0\0\0") { + $message_id = yield $buffer->bufferRead(8); + if (!in_array($message_id, [1, 0])) { + $connection->check_message_id($message_id, ['outgoing' => false, 'container' => false]); + } + $message_length = unpack('V', yield $buffer->bufferRead(4))[1]; + $message_data = yield $buffer->bufferRead($message_length); + $left = $payload_length - $message_length - 4 - 8 - 8; + if ($left) { + $API->logger->logger('Padded unencrypted message', \danog\MadelineProto\Logger::ULTRA_VERBOSE); + if ($left < (-$message_length & 15)) { + throw new \danog\MadelineProto\SecurityException('padding is too small'); + } + yield $buffer->bufferRead($left); + } + $connection->incoming_messages[$message_id] = []; + } elseif ($auth_key_id === $connection->temp_auth_key['id']) { + $message_key = yield $buffer->bufferRead(16); + list($aes_key, $aes_iv) = $this->aes_calculate($message_key, $connection->temp_auth_key['auth_key'], false); + $encrypted_data = yield $buffer->bufferRead($payload_length - 24); + $protocol_padding = strlen($encrypted_data) % 16; + if ($protocol_padding) { + $encrypted_data = substr($encrypted_data, 0, -$protocol_padding); + } + $decrypted_data = $this->ige_decrypt($encrypted_data, $aes_key, $aes_iv); + /* + $server_salt = substr($decrypted_data, 0, 8); + if ($server_salt != $connection->temp_auth_key['server_salt']) { + $API->logger->logger('WARNING: Server salt mismatch (my server salt '.$connection->temp_auth_key['server_salt'].' is not equal to server server salt '.$server_salt.').', \danog\MadelineProto\Logger::WARNING); + } + */ + $session_id = substr($decrypted_data, 8, 8); + if ($session_id != $connection->session_id) { + throw new \danog\MadelineProto\Exception('Session id mismatch.'); + } + $message_id = substr($decrypted_data, 16, 8); + $connection->check_message_id($message_id, ['outgoing' => false, 'container' => false]); + $seq_no = unpack('V', substr($decrypted_data, 24, 4))[1]; + + $message_data_length = unpack('V', substr($decrypted_data, 28, 4))[1]; + if ($message_data_length > strlen($decrypted_data)) { + throw new \danog\MadelineProto\SecurityException('message_data_length is too big'); + } + if (strlen($decrypted_data) - 32 - $message_data_length < 12) { + throw new \danog\MadelineProto\SecurityException('padding is too small'); + } + if (strlen($decrypted_data) - 32 - $message_data_length > 1024) { + throw new \danog\MadelineProto\SecurityException('padding is too big'); + } + if ($message_data_length < 0) { + throw new \danog\MadelineProto\SecurityException('message_data_length not positive'); + } + if ($message_data_length % 4 != 0) { + throw new \danog\MadelineProto\SecurityException('message_data_length not divisible by 4'); + } + $message_data = substr($decrypted_data, 32, $message_data_length); + if ($message_key != substr(hash('sha256', substr($connection->temp_auth_key['auth_key'], 96, 32).$decrypted_data, true), 8, 16)) { + throw new \danog\MadelineProto\SecurityException('msg_key mismatch'); + } + $connection->incoming_messages[$message_id] = ['seq_no' => $seq_no]; + } else { + throw new \danog\MadelineProto\Exception('Got unknown auth_key id'); + } + $deserialized = $API->deserialize($message_data, ['type' => '', 'datacenter' => $datacenter]); + $API->referenceDatabase->reset(); + + $connection->incoming_messages[$message_id]['content'] = $deserialized; + $connection->incoming_messages[$message_id]['response'] = -1; + $connection->new_incoming[$message_id] = $message_id; + $connection->last_recv = time(); + $connection->last_http_wait = 0; + + $API->logger->logger('Received payload from DC '.$datacenter, \danog\MadelineProto\Logger::ULTRA_VERBOSE); + + return true; + } +} diff --git a/src/danog/MadelineProto/Loop/Connection/UpdateLoop.php b/src/danog/MadelineProto/Loop/Connection/UpdateLoop.php new file mode 100644 index 00000000..fd1869d1 --- /dev/null +++ b/src/danog/MadelineProto/Loop/Connection/UpdateLoop.php @@ -0,0 +1,85 @@ +. + * + * @author Daniil Gentili + * @copyright 2016-2018 Daniil Gentili + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ + +namespace danog\MadelineProto\Loop\Connection; + +use Amp\Success; +use danog\MadelineProto\Logger; +use danog\MadelineProto\Loop\Impl\ResumableSignalLoop; + +/** + * Update loop. + * + * @author Daniil Gentili + */ +class UpdateLoop extends ResumableSignalLoop +{ + public function loop(): \Generator + { + $API = $this->API; + $datacenter = $this->datacenter; + $connection = $this->connection; + + if (!$this->API->settings['updates']['handle_updates']) { + yield new Success(0); + + return false; + } + + $this->startedLoop(); + $API->logger->logger("Entered updates loop in DC {$datacenter}", Logger::ULTRA_VERBOSE); + + $timeout = $API->settings['updates']['getdifference_interval']; + while (true) { + while (!$this->API->settings['updates']['handle_updates'] || !$this->has_all_auth()) { + if (yield $this->waitSignal($this->pause())) { + $API->logger->logger('Exiting update loop'); + $this->exitedLoop(); + + return; + } + } + if (time() - $API->last_getdifference > $timeout) { + if (!$API->get_updates_difference()) { + return false; + } + } + if (yield $this->waitSignal($this->pause(($API->last_getdifference + $timeout) - time()))) { + $API->logger->logger('Exiting update loop'); + $this->exitedLoop(); + + return; + } + } + } + + public function has_all_auth() + { + if ($this->API->isInitingAuthorization()) { + return false; + } + + foreach ($this->API->datacenter->sockets as $dc) { + if (!$dc->authorized || $dc->temp_auth_key === null) { + return false; + } + } + + return true; + } +} diff --git a/src/danog/MadelineProto/Loop/Connection/WriteLoop.php b/src/danog/MadelineProto/Loop/Connection/WriteLoop.php new file mode 100644 index 00000000..7048b534 --- /dev/null +++ b/src/danog/MadelineProto/Loop/Connection/WriteLoop.php @@ -0,0 +1,330 @@ +. + * + * @author Daniil Gentili + * @copyright 2016-2018 Daniil Gentili + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ + +namespace danog\MadelineProto\Loop\Connection; + +use Amp\Coroutine; +use Amp\Success; +use danog\MadelineProto\Connection; +use danog\MadelineProto\Logger; +use danog\MadelineProto\Loop\Impl\ResumableSignalLoop; +use danog\MadelineProto\MTProtoTools\Crypt; +use danog\MadelineProto\Tools; + +/** + * Socket write loop. + * + * @author Daniil Gentili + */ +class WriteLoop extends ResumableSignalLoop +{ + use Crypt; + use Tools; + + public function loop(): \Generator + { + $API = $this->API; + $datacenter = $this->datacenter; + $connection = $this->connection; + + $this->startedLoop(); + $API->logger->logger("Entered write loop in DC {$datacenter}", Logger::ULTRA_VERBOSE); + + while (true) { + if (empty($connection->pending_outgoing)) { + if (yield $this->waitSignal($this->pause())) { + $API->logger->logger('Exiting write loop'); + $this->exitedLoop(); + yield new Success(0); + + return; + } + } + + try { + if ($connection->temp_auth_key === null) { + $res = $this->unencryptedWriteLoopAsync(); + } else { + $res = $this->encryptedWriteLoopAsync(); + } + if ($res instanceof \Generator) { + yield new Coroutine($res); + } + } finally { + $this->exitedLoop(); + } + $this->startedLoop(); + + //$connection->waiter->resume(); + } + } + + public function unencryptedWriteLoopAsync(): \Generator + { + $API = $this->API; + $datacenter = $this->datacenter; + $connection = $this->connection; + + while ($connection->pending_outgoing) { + $skipped_all = true; + foreach ($connection->pending_outgoing as $k => $message) { + if ($connection->temp_auth_key !== null) { + return; + } + if (!$message['unencrypted']) { + continue; + } + $skipped_all = false; + + $body = $message['serialized_body']; + + $API->logger->logger("Sending {$message['_']} as unencrypted message to DC {$datacenter}", \danog\MadelineProto\Logger::ULTRA_VERBOSE); + + $message_id = isset($message['msg_id']) ? $message['msg_id'] : $connection->generate_message_id(); + $length = strlen($body); + + $pad_length = -$length & 15; + $pad_length += 16 * $this->random_int($modulus = 16); + + $pad = $this->random($pad_length); + $buffer = yield $connection->stream->getWriteBuffer(8 + 8 + 4 + $pad_length + $length); + + yield $buffer->bufferWrite("\0\0\0\0\0\0\0\0".$message_id.$this->pack_unsigned_int($length).$body.$pad); + + //var_dump("plain ".bin2hex($message_id)); + $connection->http_req_count++; + $connection->outgoing_messages[$message_id] = $message; + $connection->outgoing_messages[$message_id]['sent'] = time(); + $connection->outgoing_messages[$message_id]['tries'] = 0; + $connection->outgoing_messages[$message_id]['unencrypted'] = true; + $connection->new_outgoing[$message_id] = $message_id; + + unset($connection->pending_outgoing[$k]); + + $API->logger->logger("Sent {$message['_']} as unencrypted message to DC {$datacenter}!", \danog\MadelineProto\Logger::ULTRA_VERBOSE); + + $message['send_promise']->resolve(isset($message['promise']) ? $message['promise'] : true); + } + if ($skipped_all) { + break; + } + } + } + + public function encryptedWriteLoopAsync(): \Generator + { + $API = $this->API; + $datacenter = $this->datacenter; + $connection = $this->connection; + + do { + if ($connection->temp_auth_key === null) { + return; + } + if ($this->API->is_http($datacenter) && empty($connection->pending_outgoing)) { + return; + } + if (count($to_ack = $connection->ack_queue)) { + $connection->pending_outgoing[$connection->pending_outgoing_key++] = ['_' => 'msgs_ack', 'serialized_body' => $this->API->serialize_object(['type' => 'msgs_ack'], ['msg_ids' => $connection->ack_queue], 'msgs_ack'), 'content_related' => false, 'unencrypted' => false, 'method' => false]; + $connection->pending_outgoing_key %= Connection::PENDING_MAX; + } + + $has_http_wait = false; + $messages = []; + $keys = []; + + foreach ($connection->pending_outgoing as $message) { + if ($message['_'] === 'http_wait') { + $has_http_wait = true; + break; + } + } + + if ($API->is_http($datacenter) && !$has_http_wait) { + $dc_config_number = isset($API->settings['connection_settings'][$datacenter]) ? $datacenter : 'all'; + + //$connection->pending_outgoing[$connection->pending_outgoing_key++] = ['_' => 'http_wait', 'serialized_body' => $this->API->serialize_object(['type' => ''], ['_' => 'http_wait', 'max_wait' => $API->settings['connection_settings'][$dc_config_number]['timeout'] * 1000 - 100, 'wait_after' => 0, 'max_delay' => 0], 'http_wait'), 'content_related' => true, 'unencrypted' => false, 'method' => true]; + $connection->pending_outgoing[$connection->pending_outgoing_key++] = ['_' => 'http_wait', 'serialized_body' => $this->API->serialize_object(['type' => ''], ['_' => 'http_wait', 'max_wait' => 30000, 'wait_after' => 0, 'max_delay' => 1], 'http_wait'), 'content_related' => true, 'unencrypted' => false, 'method' => true]; + $connection->pending_outgoing_key %= Connection::PENDING_MAX; + + $has_http_wait = true; + } + + $total_length = 0; + $count = 0; + ksort($connection->pending_outgoing); + foreach ($connection->pending_outgoing as $k => $message) { + if ($message['unencrypted']) { + continue; + } + if (isset($message['container'])) { + unset($connection->pending_outgoing[$k]); + continue; + } + $body = $message['serialized_body']; + + $message_id = isset($message['msg_id']) ? $message['msg_id'] : $connection->generate_message_id($datacenter); + + $API->logger->logger("Sending {$message['_']} as encrypted message to DC {$datacenter}", \danog\MadelineProto\Logger::ULTRA_VERBOSE); + + $MTmessage = ['_' => 'MTmessage', 'msg_id' => $message_id, 'body' => $body, 'seqno' => $connection->generate_out_seq_no($message['content_related'])]; + + if (isset($message['method']) && $message['method'] && $message['_'] !== 'http_wait') { + if ((!isset($connection->temp_auth_key['connection_inited']) || $connection->temp_auth_key['connection_inited'] === false) && $message['_'] !== 'auth.bindTempAuthKey') { + $API->logger->logger(sprintf(\danog\MadelineProto\Lang::$current_lang['write_client_info'], $message['_']), \danog\MadelineProto\Logger::NOTICE); + $MTmessage['body'] = $API->serialize_method( + 'invokeWithLayer', + [ + 'layer' => $API->settings['tl_schema']['layer'], + 'query' => $API->serialize_method( + 'initConnection', + [ + 'api_id' => $API->settings['app_info']['api_id'], + 'api_hash' => $API->settings['app_info']['api_hash'], + 'device_model' => strpos($datacenter, 'cdn') === false ? $API->settings['app_info']['device_model'] : 'n/a', + 'system_version' => strpos($datacenter, 'cdn') === false ? $API->settings['app_info']['system_version'] : 'n/a', + 'app_version' => $API->settings['app_info']['app_version'], + 'system_lang_code' => $API->settings['app_info']['lang_code'], + 'lang_code' => $API->settings['app_info']['lang_code'], + 'lang_pack' => $API->settings['app_info']['lang_pack'], + 'query' => $MTmessage['body'], + ] + ), + ] + ); + } else { + if (isset($message['queue'])) { + if (!isset($connection->call_queue[$message['queue']])) { + $connection->call_queue[$message['queue']] = []; + } + $MTmessage['body'] = $API->serialize_method('invokeAfterMsgs', ['msg_ids' => $connection->call_queue[$message['queue']], 'query' => $MTmessage['body']]); + + $connection->call_queue[$message['queue']][$message_id] = $message_id; + if (count($connection->call_queue[$message['queue']]) > $API->settings['msg_array_limit']['call_queue']) { + reset($connection->call_queue[$message['queue']]); + $key = key($connection->call_queue[$message['queue']]); + unset($connection->call_queue[$message['queue']][$key]); + } + } + + /* if ($API->settings['requests']['gzip_encode_if_gt'] !== -1 && ($l = strlen($MTmessage['body'])) > $API->settings['requests']['gzip_encode_if_gt']) { + if (($g = strlen($gzipped = gzencode($MTmessage['body']))) < $l) { + $MTmessage['body'] = $API->serialize_object(['type' => 'gzip_packed'], ['packed_data' => $gzipped], 'gzipped data'); + $API->logger->logger('Using GZIP compression for ' . $message['_'] . ', saved ' . ($l - $g) . ' bytes of data, reduced call size by ' . $g * 100 / $l . '%', \danog\MadelineProto\Logger::ULTRA_VERBOSE); + } + unset($gzipped); + }*/ + } + } + $body_length = strlen($MTmessage['body']); + if ($total_length && $total_length + $body_length + 32 > 655360) { + $API->logger->logger('Length overflow, postponing part of payload', \danog\MadelineProto\Logger::NOTICE); + break; + } + $count++; + $total_length += $body_length + 32; + + $MTmessage['bytes'] = $body_length; + $messages[] = $MTmessage; + $keys[$k] = $message_id; + + if ($total_length && $total_length + 32 > 655360) { + $API->logger->logger('Length overflow, postponing part of payload', \danog\MadelineProto\Logger::NOTICE); + break; + } + } + + if (count($messages) > 1) { + $API->logger->logger("Wrapping in msg_container as encrypted message for DC {$datacenter}", \danog\MadelineProto\Logger::ULTRA_VERBOSE); + + $message_id = $connection->generate_message_id($datacenter); + $connection->pending_outgoing[$connection->pending_outgoing_key] = ['_' => 'msg_container', 'container' => array_values($keys), 'content_related' => false, 'method' => false]; + + //var_dumP("container ".bin2hex($message_id)); + $keys[$connection->pending_outgoing_key++] = $message_id; + $connection->pending_outgoing_key %= Connection::PENDING_MAX; + + $message_data = $API->serialize_object(['type' => ''], ['_' => 'msg_container', 'messages' => $messages], 'container'); + + $message_data_length = strlen($message_data); + $seq_no = $connection->generate_out_seq_no(false); + } elseif (count($messages)) { + $message = $messages[0]; + $message_data = $message['body']; + $message_data_length = $message['bytes']; + $message_id = $message['msg_id']; + $seq_no = $message['seqno']; + } else { + $API->logger->logger('NO MESSAGE SENT', \danog\MadelineProto\Logger::WARNING); + + return; + } + + unset($messages); + + $plaintext = $connection->temp_auth_key['server_salt'].$connection->session_id.$message_id.pack('VV', $seq_no, $message_data_length).$message_data; + $padding = $this->posmod(-strlen($plaintext), 16); + if ($padding < 12) { + $padding += 16; + } + $padding = $this->random($padding); + $message_key = substr(hash('sha256', substr($connection->temp_auth_key['auth_key'], 88, 32).$plaintext.$padding, true), 8, 16); + list($aes_key, $aes_iv) = $this->aes_calculate($message_key, $connection->temp_auth_key['auth_key']); + $message = $connection->temp_auth_key['id'].$message_key.$this->ige_encrypt($plaintext.$padding, $aes_key, $aes_iv); + + $buffer = yield $connection->stream->getWriteBuffer($len = strlen($message)); + + $t = microtime(true); + yield $buffer->bufferWrite($message); + + $connection->http_req_count++; + + $API->logger->logger("Sent encrypted payload to DC {$datacenter}, speed ".((($len * 8) / (microtime(true) - $t)) / 1000000).' mbps!', \danog\MadelineProto\Logger::ULTRA_VERBOSE); + + $sent = time(); + + if ($to_ack) { + $connection->ack_queue = []; + } + + if ($has_http_wait) { + $connection->last_http_wait = $sent; + } elseif ($API->isAltervista()) { + $connection->last_http_wait = PHP_INT_MAX; + } + + foreach ($keys as $key => $message_id) { + $connection->outgoing_messages[$message_id] = &$connection->pending_outgoing[$key]; + if (isset($connection->outgoing_messages[$message_id]['promise'])) { + $connection->new_outgoing[$message_id] = $message_id; + $connection->outgoing_messages[$message_id]['sent'] = $sent; + $connection->outgoing_messages[$message_id]['tries'] = 0; + } + if (isset($connection->outgoing_messages[$message_id]['send_promise'])) { + $connection->outgoing_messages[$message_id]['send_promise']->resolve(isset($connection->outgoing_messages[$message_id]['promise']) ? $connection->outgoing_messages[$message_id]['promise'] : true); + } + //var_dumP("encrypted ".bin2hex($message_id)." ".$connection->outgoing_messages[$message_id]['_']); + unset($connection->pending_outgoing[$key]); + } + + //if (!empty($connection->pending_outgoing)) $connection->select(); + } while (!empty($connection->pending_outgoing)); + + $connection->pending_outgoing_key = 0; + } +} diff --git a/src/danog/MadelineProto/Loop/Impl/Loop.php b/src/danog/MadelineProto/Loop/Impl/Loop.php new file mode 100644 index 00000000..fe3eb712 --- /dev/null +++ b/src/danog/MadelineProto/Loop/Impl/Loop.php @@ -0,0 +1,75 @@ +. + * + * @author Daniil Gentili + * @copyright 2016-2018 Daniil Gentili + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ + +namespace danog\MadelineProto\Loop\Impl; + +use Amp\Promise; +use danog\MadelineProto\Logger; +use danog\MadelineProto\Loop\LoopInterface; + +/** + * Loop helper trait. + * + * Wraps the asynchronous generator methods with asynchronous promise-based methods + * + * @author Daniil Gentili + */ +abstract class Loop implements LoopInterface +{ + use \danog\MadelineProto\Tools; + + private $count = 0; + + protected $API; + protected $connection; + protected $datacenter; + + public function __construct($API, $datacenter) + { + $this->API = $API; + $this->datacenter = $datacenter; + $this->connection = $API->datacenter->sockets[$datacenter]; + } + + public function start() + { + if ($this->count) { + $this->API->logger->logger("NOT entering check loop in DC {$this->datacenter} with running count {$this->count}", Logger::ERROR); + + return false; + } + Promise\rethrow($this->call($this->loop())); + + return true; + } + + public function exitedLoop() + { + $this->count--; + } + + public function startedLoop() + { + $this->count++; + } + + public function isRunning() + { + return $this->count; + } +} diff --git a/src/danog/MadelineProto/Loop/Impl/ResumableSignalLoop.php b/src/danog/MadelineProto/Loop/Impl/ResumableSignalLoop.php new file mode 100644 index 00000000..9a54369b --- /dev/null +++ b/src/danog/MadelineProto/Loop/Impl/ResumableSignalLoop.php @@ -0,0 +1,76 @@ +. + * + * @author Daniil Gentili + * @copyright 2016-2018 Daniil Gentili + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ + +namespace danog\MadelineProto\Loop\Impl; + +use Amp\Deferred; +use Amp\Loop; +use Amp\Promise; +use Amp\Success; +use danog\MadelineProto\Loop\ResumableLoopInterface; + +/** + * Resumable signal loop helper trait. + * + * @author Daniil Gentili + */ +abstract class ResumableSignalLoop extends SignalLoop implements ResumableLoopInterface +{ + private $resume; + private $resumeWatcher; + + public function pause($time = null): Promise + { + if (!is_null($time)) { + if ($time <= 0) { + return new Success(0); + } else { + $resume = microtime(true) + $time; + if ($this->resumeWatcher) { + Loop::cancel($this->resumeWatcher); + $this->resumeWatcher = null; + } + $this->resumeWatcher = Loop::delay($time * 1000, [$this, 'resume'], $resume); + //var_dump("resume {$this->resumeWatcher} ".get_class($this)." DC {$this->datacenter} after ", ($time * 1000), $resume); + } + } + $this->resume = new Deferred(); + + return $this->resume->promise(); + } + + public function resume($watcherId = null, $expected = 0) + { + if ($this->resumeWatcher) { + $storedWatcherId = $this->resumeWatcher; + Loop::cancel($storedWatcherId); + $this->resumeWatcher = null; + if ($watcherId && $storedWatcherId !== $watcherId) { + return; + } + } + if ($expected) { + //var_dump("=======", "resume $watcherId ".get_class($this)." DC {$this->datacenter} diff ".(microtime(true) - $expected).": expected $expected, actual ".microtime(true)); + } + if ($this->resume) { + $resume = $this->resume; + $this->resume = null; + $resume->resolve(); + } + } +} diff --git a/src/danog/MadelineProto/Loop/Impl/SignalLoop.php b/src/danog/MadelineProto/Loop/Impl/SignalLoop.php new file mode 100644 index 00000000..c8307f73 --- /dev/null +++ b/src/danog/MadelineProto/Loop/Impl/SignalLoop.php @@ -0,0 +1,62 @@ +. + * + * @author Daniil Gentili + * @copyright 2016-2018 Daniil Gentili + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ + +namespace danog\MadelineProto\Loop\Impl; + +use Amp\Deferred; +use Amp\Promise; +use danog\MadelineProto\Loop\SignalLoopInterface; + +/** + * Signal loop helper trait. + * + * @author Daniil Gentili + */ +abstract class SignalLoop extends Loop implements SignalLoopInterface +{ + private $signalDeferred; + + public function signal($what) + { + if ($this->signalDeferred) { + $deferred = $this->signalDeferred; + $this->signalDeferred = null; + if ($what instanceof \Exception || $what instanceof \Throwable) { + $deferred->fail($what); + } else { + $deferred->resolve($what); + } + } + } + + public function waitSignal(Promise $promise): Promise + { + $this->signalDeferred = new Deferred(); + $dpromise = $this->signalDeferred->promise(); + + $promise->onResolve(function () use ($promise) { + if ($this->signalDeferred !== null) { + $deferred = $this->signalDeferred; + $this->signalDeferred = null; + $deferred->resolve($promise); + } + }); + + return $dpromise; + } +} diff --git a/src/danog/MadelineProto/Loop/LoopInterface.php b/src/danog/MadelineProto/Loop/LoopInterface.php new file mode 100644 index 00000000..18d6b531 --- /dev/null +++ b/src/danog/MadelineProto/Loop/LoopInterface.php @@ -0,0 +1,41 @@ +. + * + * @author Daniil Gentili + * @copyright 2016-2018 Daniil Gentili + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ + +namespace danog\MadelineProto\Loop; + +/** + * Loop interface. + * + * @author Daniil Gentili + */ +interface LoopInterface +{ + /** + * Start the loop. + * + * @return void + */ + public function start(); + + /** + * The actual loop. + * + * @return void + */ + public function loop(): \Generator; +} diff --git a/src/danog/MadelineProto/Loop/ResumableLoopInterface.php b/src/danog/MadelineProto/Loop/ResumableLoopInterface.php new file mode 100644 index 00000000..d99d4338 --- /dev/null +++ b/src/danog/MadelineProto/Loop/ResumableLoopInterface.php @@ -0,0 +1,45 @@ +. + * + * @author Daniil Gentili + * @copyright 2016-2018 Daniil Gentili + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ + +namespace danog\MadelineProto\Loop; + +use Amp\Promise; + +/** + * Resumable loop interface. + * + * @author Daniil Gentili + */ +interface ResumableLoopInterface extends LoopInterface +{ + /** + * Pause the loop. + * + * @param int $time For how long to pause the loop + * + * @return Promise + */ + public function pause($time = null): Promise; + + /** + * Resume the loop. + * + * @return void + */ + public function resume(); +} diff --git a/src/danog/MadelineProto/Loop/SignalLoopInterface.php b/src/danog/MadelineProto/Loop/SignalLoopInterface.php new file mode 100644 index 00000000..747baa45 --- /dev/null +++ b/src/danog/MadelineProto/Loop/SignalLoopInterface.php @@ -0,0 +1,47 @@ +. + * + * @author Daniil Gentili + * @copyright 2016-2018 Daniil Gentili + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ + +namespace danog\MadelineProto\Loop; + +use Amp\Promise; + +/** + * Signal loop interface. + * + * @author Daniil Gentili + */ +interface SignalLoopInterface extends LoopInterface +{ + /** + * Resolve the promise or return|throw the signal. + * + * @param Promise $promise The origin promise + * + * @return Promise + */ + public function waitSignal(Promise $promise): Promise; + + /** + * Send a signal to the the loop. + * + * @param Exception|any $data Signal to send + * + * @return void + */ + public function signal($data); +} diff --git a/src/danog/MadelineProto/Lua.php b/src/danog/MadelineProto/Lua.php index bae6cb29..d25eada7 100644 --- a/src/danog/MadelineProto/Lua.php +++ b/src/danog/MadelineProto/Lua.php @@ -1,15 +1,21 @@ . -*/ +/** + * Lua module. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see . + * + * @author Daniil Gentili + * @copyright 2016-2018 Daniil Gentili + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ namespace danog\MadelineProto; @@ -27,6 +33,8 @@ class Lua } $this->MadelineProto = $MadelineProto; $this->MadelineProto->settings['updates']['handle_updates'] = true; + $this->MadelineProto->API->datacenter->sockets[$this->MadelineProto->settings['connection_settings']['default_dc']]->startUpdateLoop(); + $this->script = $script; $this->__wakeup(); } diff --git a/src/danog/MadelineProto/MTProto.php b/src/danog/MadelineProto/MTProto.php index e21e732e..d3d3951e 100644 --- a/src/danog/MadelineProto/MTProto.php +++ b/src/danog/MadelineProto/MTProto.php @@ -1,33 +1,41 @@ . -*/ +/** + * MTProto module. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see . + * + * @author Daniil Gentili + * @copyright 2016-2018 Daniil Gentili + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ namespace danog\MadelineProto; +use danog\MadelineProto\MTProtoTools\ReferenceDatabase; +use danog\MadelineProto\Stream\MTProtoTransport\HttpsStream; +use danog\MadelineProto\Stream\MTProtoTransport\HttpStream; +use danog\MadelineProto\TL\TLCallback; + /** * Manages all of the mtproto stuff. */ -class MTProto +class MTProto implements TLCallback { use \danog\Serializable; use \danog\MadelineProto\MTProtoTools\AckHandler; use \danog\MadelineProto\MTProtoTools\AuthKeyHandler; use \danog\MadelineProto\MTProtoTools\CallHandler; use \danog\MadelineProto\MTProtoTools\Crypt; - use \danog\MadelineProto\MTProtoTools\MessageHandler; - use \danog\MadelineProto\MTProtoTools\MsgIdHandler; use \danog\MadelineProto\MTProtoTools\PeerHandler; use \danog\MadelineProto\MTProtoTools\ResponseHandler; - use \danog\MadelineProto\MTProtoTools\SaltHandler; use \danog\MadelineProto\MTProtoTools\SeqNoHandler; use \danog\MadelineProto\MTProtoTools\UpdateHandler; use \danog\MadelineProto\MTProtoTools\Files; @@ -54,15 +62,16 @@ class MTProto use \danog\MadelineProto\Wrappers\TOS; /* - const V = 71; - */ - const V = 105; + const V = 71; + */ + const V = 118; + const RELEASE = '4.0'; const NOT_LOGGED_IN = 0; const WAITING_CODE = 1; const WAITING_SIGNUP = -1; const WAITING_PASSWORD = 2; const LOGGED_IN = 3; - const DISALLOWED_METHODS = ['messages.receivedQueue' => 'You cannot use this method directly', 'messages.getDhConfig' => 'You cannot use this method directly, instead use $MadelineProto->get_dh_config();', 'auth.bindTempAuthKey' => 'You cannot use this method directly, instead modify the PFS and default_temp_auth_key_expires_in settings, see https://docs.madelineproto.xyz/docs/SETTINGS.html for more info', 'auth.exportAuthorization' => 'You cannot use this method directly, use $MadelineProto->export_authorization() instead, see https://docs.madelineproto.xyz/docs/LOGIN.html', 'auth.importAuthorization' => 'You cannot use this method directly, use $MadelineProto->import_authorization($authorization) instead, see https://docs.madelineproto.xyz/docs/LOGIN.html', 'auth.logOut' => 'You cannot use this method directly, use the logout method instead (see https://docs.madelineproto.xyz for more info)', 'auth.importBotAuthorization' => 'You cannot use this method directly, use the bot_login method instead (see https://docs.madelineproto.xyz for more info)', 'auth.sendCode' => 'You cannot use this method directly, use the phone_login method instead (see https://docs.madelineproto.xyz for more info)', 'auth.signIn' => 'You cannot use this method directly, use the complete_phone_login method instead (see https://docs.madelineproto.xyz for more info)', 'auth.checkPassword' => 'You cannot use this method directly, use the complete_2fa_login method instead (see https://docs.madelineproto.xyz for more info)', 'auth.signUp' => 'You cannot use this method directly, use the complete_signup method instead (see https://docs.madelineproto.xyz for more info)', 'users.getFullUser' => 'You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://docs.madelineproto.xyz for more info)', 'channels.getFullChannel' => 'You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://docs.madelineproto.xyz for more info)', 'messages.getFullChat' => 'You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://docs.madelineproto.xyz for more info)', 'contacts.resolveUsername' => 'You cannot use this method directly, use the resolve_username, get_pwr_chat, get_info, get_full_info methods instead (see https://docs.madelineproto.xyz for more info)', 'messages.acceptEncryption' => 'You cannot use this method directly, see https://docs.madelineproto.xyz for more info on handling secret chats', 'messages.discardEncryption' => 'You cannot use this method directly, see https://docs.madelineproto.xyz for more info on handling secret chats', 'messages.requestEncryption' => 'You cannot use this method directly, see https://docs.madelineproto.xyz for more info on handling secret chats', 'phone.requestCall' => 'You cannot use this method directly, see https://docs.madelineproto.xyz#calls for more info on handling calls', 'phone.acceptCall' => 'You cannot use this method directly, see https://docs.madelineproto.xyz#calls for more info on handling calls', 'phone.confirmCall' => 'You cannot use this method directly, see https://docs.madelineproto.xyz#calls for more info on handling calls', 'phone.discardCall' => 'You cannot use this method directly, see https://docs.madelineproto.xyz#calls for more info on handling calls', 'updates.getChannelDifference' => 'You cannot use this method directly, see https://docs.madelineproto.xyz for more info on handling updates', 'updates.getDifference' => 'You cannot use this method directly, see https://docs.madelineproto.xyz for more info on handling updates', 'updates.getState' => 'You cannot use this method directly, see https://docs.madelineproto.xyz for more info on handling updates', 'upload.getCdnFile' => 'You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://docs.madelineproto.xyz for more info', 'upload.getFileHashes' => 'You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://docs.madelineproto.xyz for more info', 'upload.getCdnFileHashes' => 'You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://docs.madelineproto.xyz for more info', 'upload.reuploadCdnFile' => 'You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://docs.madelineproto.xyz for more info', 'upload.getFile' => 'You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://docs.madelineproto.xyz for more info', 'upload.saveFilePart' => 'You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://docs.madelineproto.xyz for more info', 'upload.saveBigFilePart' => 'You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://docs.madelineproto.xyz for more info']; + const DISALLOWED_METHODS = ['account.updatePasswordSettings' => 'You cannot use this method directly; use $MadelineProto->update_2fa($params), instead (see https://docs.madelineproto.xyz for more info)', 'account.getPasswordSettings' => 'You cannot use this method directly; use $MadelineProto->update_2fa($params), instead (see https://docs.madelineproto.xyz for more info)', 'messages.receivedQueue' => 'You cannot use this method directly', 'messages.getDhConfig' => 'You cannot use this method directly, instead use $MadelineProto->get_dh_config();', 'auth.bindTempAuthKey' => 'You cannot use this method directly, instead modify the PFS and default_temp_auth_key_expires_in settings, see https://docs.madelineproto.xyz/docs/SETTINGS.html for more info', 'auth.exportAuthorization' => 'You cannot use this method directly, use $MadelineProto->export_authorization() instead, see https://docs.madelineproto.xyz/docs/LOGIN.html', 'auth.importAuthorization' => 'You cannot use this method directly, use $MadelineProto->import_authorization($authorization) instead, see https://docs.madelineproto.xyz/docs/LOGIN.html', 'auth.logOut' => 'You cannot use this method directly, use the logout method instead (see https://docs.madelineproto.xyz for more info)', 'auth.importBotAuthorization' => 'You cannot use this method directly, use the bot_login method instead (see https://docs.madelineproto.xyz for more info)', 'auth.sendCode' => 'You cannot use this method directly, use the phone_login method instead (see https://docs.madelineproto.xyz for more info)', 'auth.signIn' => 'You cannot use this method directly, use the complete_phone_login method instead (see https://docs.madelineproto.xyz for more info)', 'auth.checkPassword' => 'You cannot use this method directly, use the complete_2fa_login method instead (see https://docs.madelineproto.xyz for more info)', 'auth.signUp' => 'You cannot use this method directly, use the complete_signup method instead (see https://docs.madelineproto.xyz for more info)', 'users.getFullUser' => 'You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://docs.madelineproto.xyz for more info)', 'channels.getFullChannel' => 'You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://docs.madelineproto.xyz for more info)', 'messages.getFullChat' => 'You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://docs.madelineproto.xyz for more info)', 'contacts.resolveUsername' => 'You cannot use this method directly, use the resolve_username, get_pwr_chat, get_info, get_full_info methods instead (see https://docs.madelineproto.xyz for more info)', 'messages.acceptEncryption' => 'You cannot use this method directly, see https://docs.madelineproto.xyz for more info on handling secret chats', 'messages.discardEncryption' => 'You cannot use this method directly, see https://docs.madelineproto.xyz for more info on handling secret chats', 'messages.requestEncryption' => 'You cannot use this method directly, see https://docs.madelineproto.xyz for more info on handling secret chats', 'phone.requestCall' => 'You cannot use this method directly, see https://docs.madelineproto.xyz#calls for more info on handling calls', 'phone.acceptCall' => 'You cannot use this method directly, see https://docs.madelineproto.xyz#calls for more info on handling calls', 'phone.confirmCall' => 'You cannot use this method directly, see https://docs.madelineproto.xyz#calls for more info on handling calls', 'phone.discardCall' => 'You cannot use this method directly, see https://docs.madelineproto.xyz#calls for more info on handling calls', 'updates.getChannelDifference' => 'You cannot use this method directly, see https://docs.madelineproto.xyz for more info on handling updates', 'updates.getDifference' => 'You cannot use this method directly, see https://docs.madelineproto.xyz for more info on handling updates', 'updates.getState' => 'You cannot use this method directly, see https://docs.madelineproto.xyz for more info on handling updates', 'upload.getCdnFile' => 'You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://docs.madelineproto.xyz for more info', 'upload.getFileHashes' => 'You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://docs.madelineproto.xyz for more info', 'upload.getCdnFileHashes' => 'You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://docs.madelineproto.xyz for more info', 'upload.reuploadCdnFile' => 'You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://docs.madelineproto.xyz for more info', 'upload.getFile' => 'You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://docs.madelineproto.xyz for more info', 'upload.saveFilePart' => 'You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://docs.madelineproto.xyz for more info', 'upload.saveBigFilePart' => 'You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://docs.madelineproto.xyz for more info']; const BAD_MSG_ERROR_CODES = [16 => 'msg_id too low (most likely, client time is wrong; it would be worthwhile to synchronize it using msg_id notifications and re-send the original message with the “correct” msg_id or wrap it in a container with a new msg_id if the original message had waited too long on the client to be transmitted)', 17 => 'msg_id too high (similar to the previous case, the client time has to be synchronized, and the message re-sent with the correct msg_id)', 18 => 'incorrect two lower order msg_id bits (the server expects client message msg_id to be divisible by 4)', 19 => 'container msg_id is the same as msg_id of a previously received message (this must never happen)', 20 => 'message too old, and it cannot be verified whether the server has received a message with this msg_id or not', 32 => 'msg_seqno too low (the server has already received a message with a lower msg_id but with either a higher or an equal and odd seqno)', 33 => 'msg_seqno too high (similarly, there is a message with a higher msg_id but with either a lower or an equal and odd seqno)', 34 => 'an even msg_seqno expected (irrelevant message), but odd received', 35 => 'odd msg_seqno expected (relevant message), but even received', 48 => 'incorrect server salt (in this case, the bad_server_salt response is received with the correct salt, and the message is to be re-sent with it)', 64 => 'invalid container.']; const MSGS_INFO_FLAGS = [1 => 'nothing is known about the message (msg_id too low, the other party may have forgotten it)', 2 => 'message not received (msg_id falls within the range of stored identifiers; however, the other party has certainly not received a message like that)', 3 => 'message not received (msg_id too high; however, the other party has certainly not received it yet)', 4 => 'message received (note that this response is also at the same time a receipt acknowledgment)', 8 => ' and message already acknowledged', 16 => ' and message not requiring acknowledgment', 32 => ' and RPC query contained in message being processed or processing already complete', 64 => ' and content-related response to message already generated', 128 => ' and other party knows for a fact that message is already received']; const REQUESTED = 0; @@ -72,6 +81,42 @@ class MTProto const TD_PARAMS_CONVERSION = ['updateNewMessage' => ['_' => 'updateNewMessage', 'disable_notification' => ['message', 'silent'], 'message' => ['message']], 'message' => ['_' => 'message', 'id' => ['id'], 'sender_user_id' => ['from_id'], 'chat_id' => ['to_id', 'choose_chat_id_from_botapi'], 'send_state' => ['choose_incoming_or_sent'], 'can_be_edited' => ['choose_can_edit'], 'can_be_deleted' => ['choose_can_delete'], 'is_post' => ['post'], 'date' => ['date'], 'edit_date' => ['edit_date'], 'forward_info' => ['fwd_info', 'choose_forward_info'], 'reply_to_message_id' => ['reply_to_msg_id'], 'ttl' => ['choose_ttl'], 'ttl_expires_in' => ['choose_ttl_expires_in'], 'via_bot_user_id' => ['via_bot_id'], 'views' => ['views'], 'content' => ['choose_message_content'], 'reply_markup' => ['reply_markup']], 'messages.sendMessage' => ['chat_id' => ['peer'], 'reply_to_message_id' => ['reply_to_msg_id'], 'disable_notification' => ['silent'], 'from_background' => ['background'], 'input_message_content' => ['choose_message_content'], 'reply_markup' => ['reply_markup']]]; const TD_REVERSE = ['sendMessage' => 'messages.sendMessage']; const TD_IGNORE = ['updateMessageID']; + const BOTAPI_PARAMS_CONVERSION = ['disable_web_page_preview' => 'no_webpage', 'disable_notification' => 'silent', 'reply_to_message_id' => 'reply_to_msg_id', 'chat_id' => 'peer', 'text' => 'message']; + const NOT_CONTENT_RELATED = [ + //'rpc_result', + //'rpc_error', + 'rpc_drop_answer', + 'rpc_answer_unknown', + 'rpc_answer_dropped_running', + 'rpc_answer_dropped', + 'get_future_salts', + 'future_salt', + 'future_salts', + 'ping', + 'pong', + 'ping_delay_disconnect', + 'destroy_session', + 'destroy_session_ok', + 'destroy_session_none', + //'new_session_created', + 'msg_container', + 'msg_copy', + 'gzip_packed', + 'http_wait', + 'msgs_ack', + 'bad_msg_notification', + 'bad_server_salt', + 'msgs_state_req', + 'msgs_state_info', + 'msgs_all_info', + 'msg_detailed_info', + 'msg_new_detailed_info', + 'msg_resend_req', + 'msg_resend_ans_req', + ]; + const DEFAULT_GETUPDATES_PARAMS = ['offset' => 0, 'limit' => null, 'timeout' => 0]; + + public $wrapper; public $hook_url = false; public $settings = []; private $config = ['expires' => -1]; @@ -99,6 +144,9 @@ class MTProto private $postpone_pwrchat = false; private $pending_pwrchat = []; private $altervista = false; + private $supportUser = 0; + public $referenceDatabase; + public $update_deferred; public function __magic_construct($settings = []) { @@ -117,7 +165,10 @@ class MTProto // Connect to servers $this->logger->logger(\danog\MadelineProto\Lang::$current_lang['inst_dc'], Logger::ULTRA_VERBOSE); if (!isset($this->datacenter)) { - $this->datacenter = new DataCenter($this->settings['connection'], $this->settings['connection_settings']); + $this->datacenter = new DataCenter($this, $this->settings['connection'], $this->settings['connection_settings']); + } + if (!isset($this->referenceDatabase)) { + $this->referenceDatabase = new ReferenceDatabase($this); } // Load rsa keys $this->logger->logger(\danog\MadelineProto\Lang::$current_lang['load_rsa'], Logger::ULTRA_VERBOSE); @@ -130,10 +181,10 @@ class MTProto * Define some needed numbers for BigInteger */ $this->logger->logger(\danog\MadelineProto\Lang::$current_lang['TL_translation'], Logger::ULTRA_VERBOSE); - $this->construct_TL($this->settings['tl_schema']['src']); + $this->construct_TL($this->settings['tl_schema']['src'], [$this, $this->referenceDatabase]); $this->connect_to_all_dcs(); $this->datacenter->curdc = 2; - if (!isset($this->authorization['user']['bot']) || !$this->authorization['user']['bot']) { + if ((!isset($this->authorization['user']['bot']) || !$this->authorization['user']['bot']) && $this->datacenter->sockets[$this->datacenter->curdc]->temp_auth_key !== null) { try { $nearest_dc = $this->method_call('help.getNearestDc', [], ['datacenter' => $this->datacenter->curdc]); $this->logger->logger(sprintf(\danog\MadelineProto\Lang::$current_lang['nearest_dc'], $nearest_dc['country'], $nearest_dc['nearest_dc']), Logger::NOTICE); @@ -154,7 +205,17 @@ class MTProto public function __sleep() { - return ['channel_participants', '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']; + return ['supportUser', 'referenceDatabase', 'channel_participants', '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', 'tl_callbacks', 'temp_requested_secret_chats', 'temp_rekeyed_secret_chats', 'secret_chats', 'hook_url', 'storage', 'authorized_dc', 'tos']; + } + + public function isAltervista() + { + return $this->altervista; + } + + public function isInitingAuthorization() + { + return $this->initing_authorization; } public function __wakeup() @@ -175,12 +236,17 @@ class MTProto if (!extension_loaded('xml')) { throw new Exception(['extension', 'xml']); } + + if (!isset($this->referenceDatabase)) { + $this->referenceDatabase = new ReferenceDatabase($this); + } + $this->update_callbacks([$this, $this->referenceDatabase]); $this->altervista = isset($_SERVER['SERVER_ADMIN']) && strpos($_SERVER['SERVER_ADMIN'], 'altervista.org'); $this->settings['connection_settings']['all']['ipv6'] = \danog\MadelineProto\Magic::$ipv6; /*if (isset($this->settings['pwr']['update_handler']) && $this->settings['pwr']['update_handler'] === $this->settings['updates']['callback']) { - unset($this->settings['pwr']['update_handler']); - $this->updates = []; + unset($this->settings['pwr']['update_handler']); + $this->updates = []; }*/ $keys = array_keys((array) get_object_vars($this)); if (count($keys) !== count(array_unique($keys))) { @@ -201,21 +267,23 @@ class MTProto } $this->postpone_updates = false; $this->postpone_pwrchat = false; + if ($this->event_handler && class_exists($this->event_handler) && is_subclass_of($this->event_handler, '\danog\MadelineProto\EventHandler')) { + $this->setEventHandler($this->event_handler); + } $force = false; $this->reset_session(); $backtrace = debug_backtrace(DEBUG_BACKTRACE_PROVIDE_OBJECT, 3); if (isset($backtrace[2]['function']) && isset($backtrace[2]['class']) && isset($backtrace[2]['args']) && $backtrace[2]['class'] === 'danog\\MadelineProto\\API' && $backtrace[2]['function'] === '__magic_construct') { if (count($backtrace[2]['args']) === 2) { - //$this->logger->logger('Updating settings on wakeup'); $this->parse_settings(array_replace_recursive($this->settings, $backtrace[2]['args'][1])); } - //$this->wrapper = $backtrace[2]['object']; } if (isset($this->settings['tl_schema']['src']['botAPI']) && $this->settings['tl_schema']['src']['botAPI'] !== __DIR__.'/TL_botAPI.tl') { unset($this->v); } + if (!isset($this->v) || $this->v !== self::V) { $this->logger->logger(\danog\MadelineProto\Lang::$current_lang['serialization_ofd'], Logger::WARNING); foreach ($this->datacenter->sockets as $dc_id => $socket) { @@ -269,9 +337,13 @@ class MTProto if (!isset($connection['pfs'])) { $connection['pfs'] = extension_loaded('gmp'); } + if ($connection['protocol'] === 'obfuscated2') { + $connection['protocol'] = 'tcp_intermediate_padded'; + $connection['obfuscated'] = true; + } } - if (!isset($settings['authorization']['rsa_key'])) { - unset($settings['authorization']['rsa_key']); + if ($settings['app_info']['api_id'] === 6) { + unset($settings['app_info']); } $this->reset_session(true, true); $this->config = ['expires' => -1]; @@ -287,12 +359,12 @@ class MTProto } } } + if (!$this->settings['updates']['handle_old_updates']) { $this->channels_state = []; $this->got_state = false; } $this->connect_to_all_dcs(); - //datacenter->__construct($this->settings['connection'], $this->settings['connection_settings']); foreach ($this->calls as $id => $controller) { if (!is_object($controller)) { unset($this->calls[$id]); @@ -317,6 +389,7 @@ class MTProto $this->logger->logger(\danog\MadelineProto\Lang::$current_lang['getupdates_deserialization'], Logger::NOTICE); $this->get_updates_difference(); } + $this->datacenter->sockets[$this->settings['connection_settings']['default_dc']]->updater->start(); } public function __destruct() @@ -335,6 +408,9 @@ class MTProto public function parse_settings($settings) { + if (isset($this->settings['connection_settings']['default_dc'])) { + $settings['connection_settings']['default_dc'] = $this->settings['connection_settings']['default_dc']; + } if (!isset($settings['app_info']['api_id']) || !$settings['app_info']['api_id']) { if (isset($this->settings['app_info']['api_id']) && $this->settings['app_info']['api_id']) { $settings['app_info']['api_id'] = $this->settings['app_info']['api_id']; @@ -349,12 +425,47 @@ class MTProto } catch (\danog\MadelineProto\Exception $e) { $device_model = 'Web server'; } + if ($settings['app_info']['api_id'] === 6) { + // TG DEV NOTICE: these app info spoofing measures were implemented for NON-MALICIOUS purposes. + // All accounts registered with a custom API ID require manual verification through recover@telegram.org, to avoid instant permabans. + // This makes usage of all MTProto libraries very difficult, at least for new users. + // To help a bit, when the android API ID is used, the android app infos are spoofed too. + // THE ANDROID API HASH IS NOT PRESENT IN THIS REPOSITORY, AND WILL NOT BE GIVEN TO EVERYONE. + // This measure was NOT created with the intent to aid spammers, flooders, and other scum. + // + // I understand that automated account registration through headless libraries may indicate the creation of a botnet, + // ...and I understand why these automatic bans were implemented in the first place. + // Manual requests to activate numbers through recover@telegram.org will still be required for the majority of users of this library, + // ...those that choose to user their own API ID for their application. + // + // To be honest, I wrote this feature just for me, since I honestly don't want to + // ...go through the hassle of registering => recovering => logging in to every account I use for my services (mainly webradios and test userbots) + $device_model = 'LGENexus 5'; + } // Detect system version try { $system_version = php_uname('r'); } catch (\danog\MadelineProto\Exception $e) { $system_version = phpversion(); } + if ($settings['app_info']['api_id'] === 6) { + // TG DEV NOTICE: these app info spoofing measures were implemented for NON-MALICIOUS purposes. + // All accounts registered with a custom API ID require manual verification through recover@telegram.org, to avoid instant permabans. + // This makes usage of all MTProto libraries very difficult, at least for new users. + // To help a bit, when the android API ID is used, the android app infos are spoofed too. + // THE ANDROID API HASH IS NOT PRESENT IN THIS REPOSITORY, AND WILL NOT BE GIVEN TO EVERYONE. + // This measure was NOT created with the intent to aid spammers, flooders, and other scum. + // + // I understand that automated account registration through headless libraries may indicate the creation of a botnet, + // ...and I understand why these automatic bans were implemented in the first place. + // Manual requests to activate numbers through recover@telegram.org will still be required for the majority of users of this library, + // ...and in particular those that choose to user their own API ID for their application. + // + // To be honest, I wrote this feature just for me, since I honestly don't want to + // ...go through the hassle of registering => recovering => logging in to every account I use for my services (mainly webradios and test userbots) + + $system_version = 'SDK 28'; + } // Detect language $lang_code = 'en'; Lang::$current_lang = &Lang::$lang[$lang_code]; @@ -366,6 +477,47 @@ class MTProto if (isset(Lang::$lang[$lang_code])) { Lang::$current_lang = &Lang::$lang[$lang_code]; } + // Detect language pack + $lang_pack = ''; + if ($settings['app_info']['api_id'] === 6) { + // TG DEV NOTICE: these app info spoofing measures were implemented for NON-MALICIOUS purposes. + // All accounts registered with a custom API ID require manual verification through recover@telegram.org, to avoid instant permabans. + // This makes usage of all MTProto libraries very difficult, at least for new users. + // To help a bit, when the android API ID is used, the android app infos are spoofed too. + // THE ANDROID API HASH IS NOT PRESENT IN THIS REPOSITORY, AND WILL NOT BE GIVEN TO EVERYONE. + // This measure was NOT created with the intent to aid spammers, flooders, and other scum. + // + // I understand that automated account registration through headless libraries may indicate the creation of a botnet, + // ...and I understand why these automatic bans were implemented in the first place. + // Manual requests to activate numbers through recover@telegram.org will still be required for the majority of users of this library, + // ...and in particular those that choose to user their own API ID for their application. + // + // To be honest, I wrote this feature just for me, since I honestly don't want to + // ...go through the hassle of registering => recovering => logging in to every account I use for my services (mainly webradios and test userbots) + + $lang_pack = 'android'; + } + // Detect app version + $app_version = self::RELEASE.' ('.self::V.', '.Magic::$revision.')'; + if ($settings['app_info']['api_id'] === 6) { + // TG DEV NOTICE: these app info spoofing measures were implemented for NON-MALICIOUS purposes. + // All accounts registered with a custom API ID require manual verification through recover@telegram.org, to avoid instant permabans. + // This makes usage of all MTProto libraries very difficult, at least for new users. + // To help a bit, when the android API ID is used, the android app infos are spoofed too. + // THE ANDROID API HASH IS NOT PRESENT IN THIS REPOSITORY, AND WILL NOT BE GIVEN TO EVERYONE. + // This measure was NOT created with the intent to aid spammers, flooders, and other scum. + // + // I understand that automated account registration through headless libraries may indicate the creation of a botnet, + // ...and I understand why these automatic bans were implemented in the first place. + // Manual requests to activate numbers through recover@telegram.org will still be required for the majority of users of this library, + // ...and in particular those that choose to user their own API ID for their application. + // + // To be honest, I wrote this feature just for me, since I honestly don't want to + // ...go through the hassle of registering => recovering => logging in to every account I use for my services (mainly webradios and test userbots) + + $app_version = '4.9.1 (13613)'; + } + $this->altervista = isset($_SERVER['SERVER_ADMIN']) && strpos($_SERVER['SERVER_ADMIN'], 'altervista.org'); // Set default settings $default_settings = ['authorization' => [ @@ -433,7 +585,7 @@ class MTProto // connection settings 'all' => [ // These settings will be applied on every datacenter that hasn't a custom settings subarray... - 'protocol' => 'tcp_abridged', + 'protocol' => $this->altervista ? 'http' : 'tcp_abridged', // can be tcp_full, tcp_abridged, tcp_intermediate, http, https, obfuscated2, udp (unsupported) 'test_mode' => false, // decides whether to connect to the main telegram servers or to the testing servers (deep telegram) @@ -445,7 +597,9 @@ class MTProto // The proxy class to use 'proxy_extra' => $this->altervista ? ['address' => 'localhost', 'port' => 80] : [], // Extra parameters to pass to the proxy class using setExtra - 'pfs' => extension_loaded('gmp'), + 'obfuscated' => false, + 'transport' => 'tcp', + 'pfs' => extension_loaded('gmp'), ], 'default_dc' => 2, ], 'app_info' => [ @@ -454,18 +608,19 @@ class MTProto //'api_hash' => you should put an API hash in the settings array you provide 'device_model' => $device_model, 'system_version' => $system_version, - 'app_version' => 'Unicorn', + 'app_version' => $app_version, // 🌚 // 'app_version' => self::V, 'lang_code' => $lang_code, + 'lang_pack' => $lang_pack, ], 'tl_schema' => [ // TL scheme files - 'layer' => 82, + 'layer' => 91, // layer version 'src' => [ - 'mtproto' => __DIR__.'/TL_mtproto_v1.json', + 'mtproto' => __DIR__.'/TL_mtproto_v1.tl', // mtproto TL scheme - 'telegram' => __DIR__.'/TL_telegram_v82.tl', + 'telegram' => __DIR__.'/TL_telegram_v91.tl', // telegram TL scheme 'secret' => __DIR__.'/TL_secret.tl', // secret chats TL scheme @@ -510,7 +665,7 @@ class MTProto 'full_fetch' => false, // Should madeline fetch the full member list of every group it meets? 'cache_all_peers_on_startup' => false, - ], 'requests' => ['gzip_encode_if_gt' => 500], 'updates' => [ + ], 'requests' => ['gzip_encode_if_gt' => 1024 * 1024], 'updates' => [ 'handle_updates' => false, // Should I handle updates? 'handle_old_updates' => true, @@ -518,6 +673,8 @@ class MTProto 'getdifference_interval' => 10, // Getdifference manual polling interval 'callback' => 'get_updates_update_handler', + // Update callback + 'run_callback' => true, ], 'secret_chats' => ['accept_chats' => true], 'serialization' => ['serialization_interval' => 30], 'threading' => [ 'allow_threading' => false, // Should I use threading, if it is enabled? @@ -526,7 +683,8 @@ class MTProto 'allow_automatic_upload' => true, 'part_size' => 512 * 1024, ], 'download' => [ - 'part_size' => 1024 * 1024, + 'report_broken_media' => true, + 'part_size' => 1024 * 1024, ], 'pwr' => [ 'pwr' => false, // Need info ? @@ -536,6 +694,7 @@ class MTProto // Need info ? 'requests' => true, ]]; + if (!is_array($settings)) { $settings = []; } @@ -544,8 +703,8 @@ class MTProto Lang::$current_lang = &Lang::$lang[$settings['app_info']['lang_code']]; } /*if ($settings['app_info']['api_id'] < 20) { - $settings['connection_settings']['all']['protocol'] = 'obfuscated2'; - }*/ + $settings['connection_settings']['all']['protocol'] = 'obfuscated2'; + }*/ switch ($settings['logger']['logger_level']) { case 'ULTRA_VERBOSE': $settings['logger']['logger_level'] = 5; @@ -605,47 +764,65 @@ class MTProto if ($auth_key) { $socket->temp_auth_key = null; } - $socket->incoming_messages = []; - $socket->outgoing_messages = []; - $socket->new_outgoing = []; - $socket->new_incoming = []; + /* + $socket->incoming_messages = []; + $socket->outgoing_messages = []; + $socket->new_outgoing = []; + $socket->new_incoming = []; + */ } } public function is_http($datacenter) { - return in_array($this->datacenter->sockets[$datacenter]->protocol, ['http', 'https', 'https_proxied']); + return in_array($this->datacenter->sockets[$datacenter]->getCtx()->getStreamName(), [HttpStream::getName(), HttpsStream::getName()]); } public function close_and_reopen($datacenter) { - $this->datacenter->sockets[$datacenter]->close_and_reopen(); + $this->wait($this->datacenter->sockets[$datacenter]->reconnect()); /*if ($this->is_http($datacenter) && $this->datacenter->sockets[$datacenter]->temp_auth_key !== null && isset($this->datacenter->sockets[$datacenter]->temp_auth_key['connection_inited']) && $this->datacenter->sockets[$datacenter]->temp_auth_key['connection_inited'] === true) { - $this->method_call('ping', ['ping_id' => 0], ['datacenter' => $datacenter]); - }*/ + $this->method_call('ping', ['ping_id' => 0], ['datacenter' => $datacenter]); + }*/ } // Connects to all datacenters and if necessary creates authorization keys, binds them and writes client info public function connect_to_all_dcs() { - $this->datacenter->__construct($this->settings['connection'], $this->settings['connection_settings']); + return $this->wait($this->connect_to_all_dcs_async()); + } + + public function connect_to_all_dcs_async(): \Generator + { + $this->datacenter->__construct($this, $this->settings['connection'], $this->settings['connection_settings']); + $dcs = []; foreach ($this->datacenter->get_dcs() as $new_dc) { - $this->datacenter->dc_connect($new_dc); + $dcs[] = $this->datacenter->dc_connect_async($new_dc); } - $this->init_authorization(); + yield $dcs; + yield $this->init_authorization_async(); + $dcs = []; foreach ($this->datacenter->get_dcs(false) as $new_dc) { - $this->datacenter->dc_connect($new_dc); + $dcs[] = $this->datacenter->dc_connect_async($new_dc); } - $this->init_authorization(); + yield $dcs; + yield $this->init_authorization_async(); } public function get_config($config = [], $options = []) + { + return $this->wait($this->get_config_async($config, $options)); + } + + public function get_config_async($config = [], $options = []) { if ($this->config['expires'] > time()) { - return; + return $this->config; } - $this->config = empty($config) ? $this->method_call('help.getConfig', $config, $options) : $config; - $this->parse_config(); + $this->config = empty($config) ? yield $this->method_call_async_read('help.getConfig', $config, $options) : $config; + yield $this->parse_config(); + + return $this->config; } public function get_cdn_config($datacenter) @@ -667,7 +844,7 @@ class MTProto public function parse_config() { if (isset($this->config['dc_options'])) { - $this->parse_dc_options($this->config['dc_options']); + yield $this->parse_dc_options($this->config['dc_options']); unset($this->config['dc_options']); } $this->logger->logger(\danog\MadelineProto\Lang::$current_lang['config_updated'], Logger::NOTICE); @@ -700,7 +877,7 @@ class MTProto } $curdc = $this->datacenter->curdc; $this->logger->logger('Got new DC options, reconnecting'); - $this->connect_to_all_dcs(); + yield $this->connect_to_all_dcs(); $this->datacenter->curdc = $curdc; } @@ -717,5 +894,48 @@ class MTProto return $this->authorization['user']; } - const ALL_MIMES = ['png' => [0 => 'image/png', 1 => 'image/x-png'], 'bmp' => [0 => 'image/bmp', 1 => 'image/x-bmp', 2 => 'image/x-bitmap', 3 => 'image/x-xbitmap', 4 => 'image/x-win-bitmap', 5 => 'image/x-windows-bmp', 6 => 'image/ms-bmp', 7 => 'image/x-ms-bmp', 8 => 'application/bmp', 9 => 'application/x-bmp', 10 => 'application/x-win-bitmap'], 'gif' => [0 => 'image/gif'], 'jpeg' => [0 => 'image/jpeg', 1 => 'image/pjpeg'], 'xspf' => [0 => 'application/xspf+xml'], 'vlc' => [0 => 'application/videolan'], 'wmv' => [0 => 'video/x-ms-wmv', 1 => 'video/x-ms-asf'], 'au' => [0 => 'audio/x-au'], 'ac3' => [0 => 'audio/ac3'], 'flac' => [0 => 'audio/x-flac'], 'ogg' => [0 => 'audio/ogg', 1 => 'video/ogg', 2 => 'application/ogg'], 'kmz' => [0 => 'application/vnd.google-earth.kmz'], 'kml' => [0 => 'application/vnd.google-earth.kml+xml'], 'rtx' => [0 => 'text/richtext'], 'rtf' => [0 => 'text/rtf'], 'jar' => [0 => 'application/java-archive', 1 => 'application/x-java-application', 2 => 'application/x-jar'], 'zip' => [0 => 'application/x-zip', 1 => 'application/zip', 2 => 'application/x-zip-compressed', 3 => 'application/s-compressed', 4 => 'multipart/x-zip'], '7zip' => [0 => 'application/x-compressed'], 'xml' => [0 => 'application/xml', 1 => 'text/xml'], 'svg' => [0 => 'image/svg+xml'], '3g2' => [0 => 'video/3gpp2'], '3gp' => [0 => 'video/3gp', 1 => 'video/3gpp'], 'mp4' => [0 => 'video/mp4'], 'm4a' => [0 => 'audio/x-m4a'], 'f4v' => [0 => 'video/x-f4v'], 'flv' => [0 => 'video/x-flv'], 'webm' => [0 => 'video/webm'], 'aac' => [0 => 'audio/x-acc'], 'm4u' => [0 => 'application/vnd.mpegurl'], 'pdf' => [0 => 'application/pdf', 1 => 'application/octet-stream'], 'pptx' => [0 => 'application/vnd.openxmlformats-officedocument.presentationml.presentation'], 'ppt' => [0 => 'application/powerpoint', 1 => 'application/vnd.ms-powerpoint', 2 => 'application/vnd.ms-office', 3 => 'application/msword'], 'docx' => [0 => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'], 'xlsx' => [0 => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 1 => 'application/vnd.ms-excel'], 'xl' => [0 => 'application/excel'], 'xls' => [0 => 'application/msexcel', 1 => 'application/x-msexcel', 2 => 'application/x-ms-excel', 3 => 'application/x-excel', 4 => 'application/x-dos_ms_excel', 5 => 'application/xls', 6 => 'application/x-xls'], 'xsl' => [0 => 'text/xsl'], 'mpeg' => [0 => 'video/mpeg'], 'mov' => [0 => 'video/quicktime'], 'avi' => [0 => 'video/x-msvideo', 1 => 'video/msvideo', 2 => 'video/avi', 3 => 'application/x-troff-msvideo'], 'movie' => [0 => 'video/x-sgi-movie'], 'log' => [0 => 'text/x-log'], 'txt' => [0 => 'text/plain'], 'css' => [0 => 'text/css'], 'html' => [0 => 'text/html'], 'wav' => [0 => 'audio/x-wav', 1 => 'audio/wave', 2 => 'audio/wav'], 'xhtml' => [0 => 'application/xhtml+xml'], 'tar' => [0 => 'application/x-tar'], 'tgz' => [0 => 'application/x-gzip-compressed'], 'psd' => [0 => 'application/x-photoshop', 1 => 'image/vnd.adobe.photoshop'], 'exe' => [0 => 'application/x-msdownload'], 'js' => [0 => 'application/x-javascript'], 'mp3' => [0 => 'audio/mpeg', 1 => 'audio/mpg', 2 => 'audio/mpeg3', 3 => 'audio/mp3'], 'rar' => [0 => 'application/x-rar', 1 => 'application/rar', 2 => 'application/x-rar-compressed'], 'gzip' => [0 => 'application/x-gzip'], 'hqx' => [0 => 'application/mac-binhex40', 1 => 'application/mac-binhex', 2 => 'application/x-binhex40', 3 => 'application/x-mac-binhex40'], 'cpt' => [0 => 'application/mac-compactpro'], 'bin' => [0 => 'application/macbinary', 1 => 'application/mac-binary', 2 => 'application/x-binary', 3 => 'application/x-macbinary'], 'oda' => [0 => 'application/oda'], 'ai' => [0 => 'application/postscript'], 'smil' => [0 => 'application/smil'], 'mif' => [0 => 'application/vnd.mif'], 'wbxml' => [0 => 'application/wbxml'], 'wmlc' => [0 => 'application/wmlc'], 'dcr' => [0 => 'application/x-director'], 'dvi' => [0 => 'application/x-dvi'], 'gtar' => [0 => 'application/x-gtar'], 'php' => [0 => 'application/x-httpd-php', 1 => 'application/php', 2 => 'application/x-php', 3 => 'text/php', 4 => 'text/x-php', 5 => 'application/x-httpd-php-source'], 'swf' => [0 => 'application/x-shockwave-flash'], 'sit' => [0 => 'application/x-stuffit'], 'z' => [0 => 'application/x-compress'], 'mid' => [0 => 'audio/midi'], 'aif' => [0 => 'audio/x-aiff', 1 => 'audio/aiff'], 'ram' => [0 => 'audio/x-pn-realaudio'], 'rpm' => [0 => 'audio/x-pn-realaudio-plugin'], 'ra' => [0 => 'audio/x-realaudio'], 'rv' => [0 => 'video/vnd.rn-realvideo'], 'jp2' => [0 => 'image/jp2', 1 => 'video/mj2', 2 => 'image/jpx', 3 => 'image/jpm'], 'tiff' => [0 => 'image/tiff'], 'eml' => [0 => 'message/rfc822'], 'pem' => [0 => 'application/x-x509-user-cert', 1 => 'application/x-pem-file'], 'p10' => [0 => 'application/x-pkcs10', 1 => 'application/pkcs10'], 'p12' => [0 => 'application/x-pkcs12'], 'p7a' => [0 => 'application/x-pkcs7-signature'], 'p7c' => [0 => 'application/pkcs7-mime', 1 => 'application/x-pkcs7-mime'], 'p7r' => [0 => 'application/x-pkcs7-certreqresp'], 'p7s' => [0 => 'application/pkcs7-signature'], 'crt' => [0 => 'application/x-x509-ca-cert', 1 => 'application/pkix-cert'], 'crl' => [0 => 'application/pkix-crl', 1 => 'application/pkcs-crl'], 'pgp' => [0 => 'application/pgp'], 'gpg' => [0 => 'application/gpg-keys'], 'rsa' => [0 => 'application/x-pkcs7'], 'ics' => [0 => 'text/calendar'], 'zsh' => [0 => 'text/x-scriptzsh'], 'cdr' => [0 => 'application/cdr', 1 => 'application/coreldraw', 2 => 'application/x-cdr', 3 => 'application/x-coreldraw', 4 => 'image/cdr', 5 => 'image/x-cdr', 6 => 'zz-application/zz-winassoc-cdr'], 'wma' => [0 => 'audio/x-ms-wma'], 'vcf' => [0 => 'text/x-vcard'], 'srt' => [0 => 'text/srt'], 'vtt' => [0 => 'text/vtt'], 'ico' => [0 => 'image/x-icon', 1 => 'image/x-ico', 2 => 'image/vnd.microsoft.icon'], 'csv' => [0 => 'text/x-comma-separated-values', 1 => 'text/comma-separated-values', 2 => 'application/vnd.msexcel'], 'json' => [0 => 'application/json', 1 => 'text/json']]; + public function getMethodCallbacks(): array + { + return []; + } + + public function getMethodBeforeCallbacks(): array + { + return []; + } + + public function getConstructorCallbacks(): array + { + return array_merge( + array_fill_keys(['chat', 'chatEmpty', 'chatForbidden', 'channel', 'channelEmpty', 'channelForbidden'], [[$this, 'add_chat']]), + array_fill_keys(['user', 'userEmpty'], [[$this, 'add_user']]), + ['help.support' => [[$this, 'add_support']]] + ); + } + + public function getConstructorBeforeCallbacks(): array + { + return []; + } + + public function getConstructorSerializeCallbacks(): array + { + return []; + } + + public function getTypeMismatchCallbacks(): array + { + return array_merge( + array_fill_keys(['User', 'InputUser', 'Chat', 'InputChannel', 'Peer', 'InputPeer', 'InputDialogPeer', 'InputNotifyPeer'], [$this, 'get_info']), + array_fill_keys(['InputMedia', 'InputDocument', 'InputPhoto'], [$this, 'get_file_info']), + array_fill_keys(['InputFileLocation'], [$this, 'get_download_info']) + ); + } + + public function __debugInfo() + { + return ['MadelineProto instance '.spl_object_hash($this)]; + } + + const ALL_MIMES = ['webp' => [0 => 'image/webp'], 'png' => [0 => 'image/png', 1 => 'image/x-png'], 'bmp' => [0 => 'image/bmp', 1 => 'image/x-bmp', 2 => 'image/x-bitmap', 3 => 'image/x-xbitmap', 4 => 'image/x-win-bitmap', 5 => 'image/x-windows-bmp', 6 => 'image/ms-bmp', 7 => 'image/x-ms-bmp', 8 => 'application/bmp', 9 => 'application/x-bmp', 10 => 'application/x-win-bitmap'], 'gif' => [0 => 'image/gif'], 'jpeg' => [0 => 'image/jpeg', 1 => 'image/pjpeg'], 'xspf' => [0 => 'application/xspf+xml'], 'vlc' => [0 => 'application/videolan'], 'wmv' => [0 => 'video/x-ms-wmv', 1 => 'video/x-ms-asf'], 'au' => [0 => 'audio/x-au'], 'ac3' => [0 => 'audio/ac3'], 'flac' => [0 => 'audio/x-flac'], 'ogg' => [0 => 'audio/ogg', 1 => 'video/ogg', 2 => 'application/ogg'], 'kmz' => [0 => 'application/vnd.google-earth.kmz'], 'kml' => [0 => 'application/vnd.google-earth.kml+xml'], 'rtx' => [0 => 'text/richtext'], 'rtf' => [0 => 'text/rtf'], 'jar' => [0 => 'application/java-archive', 1 => 'application/x-java-application', 2 => 'application/x-jar'], 'zip' => [0 => 'application/x-zip', 1 => 'application/zip', 2 => 'application/x-zip-compressed', 3 => 'application/s-compressed', 4 => 'multipart/x-zip'], '7zip' => [0 => 'application/x-compressed'], 'xml' => [0 => 'application/xml', 1 => 'text/xml'], 'svg' => [0 => 'image/svg+xml'], '3g2' => [0 => 'video/3gpp2'], '3gp' => [0 => 'video/3gp', 1 => 'video/3gpp'], 'mp4' => [0 => 'video/mp4'], 'm4a' => [0 => 'audio/x-m4a'], 'f4v' => [0 => 'video/x-f4v'], 'flv' => [0 => 'video/x-flv'], 'webm' => [0 => 'video/webm'], 'aac' => [0 => 'audio/x-acc'], 'm4u' => [0 => 'application/vnd.mpegurl'], 'pdf' => [0 => 'application/pdf', 1 => 'application/octet-stream'], 'pptx' => [0 => 'application/vnd.openxmlformats-officedocument.presentationml.presentation'], 'ppt' => [0 => 'application/powerpoint', 1 => 'application/vnd.ms-powerpoint', 2 => 'application/vnd.ms-office', 3 => 'application/msword'], 'docx' => [0 => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'], 'xlsx' => [0 => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 1 => 'application/vnd.ms-excel'], 'xl' => [0 => 'application/excel'], 'xls' => [0 => 'application/msexcel', 1 => 'application/x-msexcel', 2 => 'application/x-ms-excel', 3 => 'application/x-excel', 4 => 'application/x-dos_ms_excel', 5 => 'application/xls', 6 => 'application/x-xls'], 'xsl' => [0 => 'text/xsl'], 'mpeg' => [0 => 'video/mpeg'], 'mov' => [0 => 'video/quicktime'], 'avi' => [0 => 'video/x-msvideo', 1 => 'video/msvideo', 2 => 'video/avi', 3 => 'application/x-troff-msvideo'], 'movie' => [0 => 'video/x-sgi-movie'], 'log' => [0 => 'text/x-log'], 'txt' => [0 => 'text/plain'], 'css' => [0 => 'text/css'], 'html' => [0 => 'text/html'], 'wav' => [0 => 'audio/x-wav', 1 => 'audio/wave', 2 => 'audio/wav'], 'xhtml' => [0 => 'application/xhtml+xml'], 'tar' => [0 => 'application/x-tar'], 'tgz' => [0 => 'application/x-gzip-compressed'], 'psd' => [0 => 'application/x-photoshop', 1 => 'image/vnd.adobe.photoshop'], 'exe' => [0 => 'application/x-msdownload'], 'js' => [0 => 'application/x-javascript'], 'mp3' => [0 => 'audio/mpeg', 1 => 'audio/mpg', 2 => 'audio/mpeg3', 3 => 'audio/mp3'], 'rar' => [0 => 'application/x-rar', 1 => 'application/rar', 2 => 'application/x-rar-compressed'], 'gzip' => [0 => 'application/x-gzip'], 'hqx' => [0 => 'application/mac-binhex40', 1 => 'application/mac-binhex', 2 => 'application/x-binhex40', 3 => 'application/x-mac-binhex40'], 'cpt' => [0 => 'application/mac-compactpro'], 'bin' => [0 => 'application/macbinary', 1 => 'application/mac-binary', 2 => 'application/x-binary', 3 => 'application/x-macbinary'], 'oda' => [0 => 'application/oda'], 'ai' => [0 => 'application/postscript'], 'smil' => [0 => 'application/smil'], 'mif' => [0 => 'application/vnd.mif'], 'wbxml' => [0 => 'application/wbxml'], 'wmlc' => [0 => 'application/wmlc'], 'dcr' => [0 => 'application/x-director'], 'dvi' => [0 => 'application/x-dvi'], 'gtar' => [0 => 'application/x-gtar'], 'php' => [0 => 'application/x-httpd-php', 1 => 'application/php', 2 => 'application/x-php', 3 => 'text/php', 4 => 'text/x-php', 5 => 'application/x-httpd-php-source'], 'swf' => [0 => 'application/x-shockwave-flash'], 'sit' => [0 => 'application/x-stuffit'], 'z' => [0 => 'application/x-compress'], 'mid' => [0 => 'audio/midi'], 'aif' => [0 => 'audio/x-aiff', 1 => 'audio/aiff'], 'ram' => [0 => 'audio/x-pn-realaudio'], 'rpm' => [0 => 'audio/x-pn-realaudio-plugin'], 'ra' => [0 => 'audio/x-realaudio'], 'rv' => [0 => 'video/vnd.rn-realvideo'], 'jp2' => [0 => 'image/jp2', 1 => 'video/mj2', 2 => 'image/jpx', 3 => 'image/jpm'], 'tiff' => [0 => 'image/tiff'], 'eml' => [0 => 'message/rfc822'], 'pem' => [0 => 'application/x-x509-user-cert', 1 => 'application/x-pem-file'], 'p10' => [0 => 'application/x-pkcs10', 1 => 'application/pkcs10'], 'p12' => [0 => 'application/x-pkcs12'], 'p7a' => [0 => 'application/x-pkcs7-signature'], 'p7c' => [0 => 'application/pkcs7-mime', 1 => 'application/x-pkcs7-mime'], 'p7r' => [0 => 'application/x-pkcs7-certreqresp'], 'p7s' => [0 => 'application/pkcs7-signature'], 'crt' => [0 => 'application/x-x509-ca-cert', 1 => 'application/pkix-cert'], 'crl' => [0 => 'application/pkix-crl', 1 => 'application/pkcs-crl'], 'pgp' => [0 => 'application/pgp'], 'gpg' => [0 => 'application/gpg-keys'], 'rsa' => [0 => 'application/x-pkcs7'], 'ics' => [0 => 'text/calendar'], 'zsh' => [0 => 'text/x-scriptzsh'], 'cdr' => [0 => 'application/cdr', 1 => 'application/coreldraw', 2 => 'application/x-cdr', 3 => 'application/x-coreldraw', 4 => 'image/cdr', 5 => 'image/x-cdr', 6 => 'zz-application/zz-winassoc-cdr'], 'wma' => [0 => 'audio/x-ms-wma'], 'vcf' => [0 => 'text/x-vcard'], 'srt' => [0 => 'text/srt'], 'vtt' => [0 => 'text/vtt'], 'ico' => [0 => 'image/x-icon', 1 => 'image/x-ico', 2 => 'image/vnd.microsoft.icon'], 'csv' => [0 => 'text/x-comma-separated-values', 1 => 'text/comma-separated-values', 2 => 'application/vnd.msexcel'], 'json' => [0 => 'application/json', 1 => 'text/json']]; } diff --git a/src/danog/MadelineProto/MTProtoTools/AckHandler.php b/src/danog/MadelineProto/MTProtoTools/AckHandler.php index b83eedaf..eb090333 100644 --- a/src/danog/MadelineProto/MTProtoTools/AckHandler.php +++ b/src/danog/MadelineProto/MTProtoTools/AckHandler.php @@ -1,15 +1,21 @@ . -*/ +/** + * AckHandler module. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see . + * + * @author Daniil Gentili + * @copyright 2016-2018 Daniil Gentili + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ namespace danog\MadelineProto\MTProtoTools; @@ -26,24 +32,47 @@ trait AckHandler return false; } + //$this->logger->logger("Ack-ed ".$this->datacenter->sockets[$datacenter]->outgoing_messages[$message_id]['_']." with message ID $message_id on DC $datacenter"); + /* + if (isset($this->datacenter->sockets[$datacenter]->outgoing_messages[$message_id]['body'])) { + unset($this->datacenter->sockets[$datacenter]->outgoing_messages[$message_id]['body']); + } + if (isset($this->datacenter->sockets[$datacenter]->new_outgoing[$message_id])) { + unset($this->datacenter->sockets[$datacenter]->new_outgoing[$message_id]); + }*/ + return true; + } - return $this->datacenter->sockets[$datacenter]->outgoing_messages[$message_id]['ack'] = true; + public function got_response_for_outgoing_message_id($message_id, $datacenter) + { + // The server acknowledges that it received my message + if (!isset($this->datacenter->sockets[$datacenter]->outgoing_messages[$message_id])) { + $this->logger->logger("WARNING: Couldn't find message id ".$message_id.' in the array of outgoing messages. Maybe try to increase its size?', \danog\MadelineProto\Logger::WARNING); + + return false; + } + if (isset($this->datacenter->sockets[$datacenter]->outgoing_messages[$message_id]['body'])) { + unset($this->datacenter->sockets[$datacenter]->outgoing_messages[$message_id]['body']); + } + if (isset($this->datacenter->sockets[$datacenter]->new_outgoing[$message_id])) { + unset($this->datacenter->sockets[$datacenter]->new_outgoing[$message_id]); + } + + return true; } public function ack_incoming_message_id($message_id, $datacenter) { // I let the server know that I received its message if (!isset($this->datacenter->sockets[$datacenter]->incoming_messages[$message_id])) { - $this->logger->logger("WARNING: Couldn't find message id ".$message_id.' in the array of incomgoing messages. Maybe try to increase its size?', \danog\MadelineProto\Logger::WARNING); - //throw new \danog\MadelineProto\Exception("Couldn't find message id ".$message_id.' in the array of incoming message ids. Maybe try to increase its size?'); - } - if ($this->datacenter->sockets[$datacenter]->temp_auth_key['id'] === null || $this->datacenter->sockets[$datacenter]->temp_auth_key['id'] === "\0\0\0\0\0\0\0\0") { - // || (isset($this->datacenter->sockets[$datacenter]->incoming_messages[$message_id]['ack']) && $this->datacenter->sockets[$datacenter]->incoming_messages[$message_id]['ack'])) { - return; + $this->logger->logger("WARNING: Couldn't find message id ".$message_id.' in the array of incoming messages. Maybe try to increase its size?', \danog\MadelineProto\Logger::WARNING); } + /*if ($this->datacenter->sockets[$datacenter]->temp_auth_key['id'] === null || $this->datacenter->sockets[$datacenter]->temp_auth_key['id'] === "\0\0\0\0\0\0\0\0") { + // || (isset($this->datacenter->sockets[$datacenter]->incoming_messages[$message_id]['ack']) && $this->datacenter->sockets[$datacenter]->incoming_messages[$message_id]['ack'])) { + return; + }*/ $this->datacenter->sockets[$datacenter]->ack_queue[$message_id] = $message_id; - //$this->object_call('msgs_ack', ['msg_ids' => [$message_id]], ['datacenter' => $datacenter]); + return true; - //$this->datacenter->sockets[$datacenter]->incoming_messages[$message_id]['ack'] = true; } } diff --git a/src/danog/MadelineProto/MTProtoTools/AuthKeyHandler.php b/src/danog/MadelineProto/MTProtoTools/AuthKeyHandler.php index c3cf6469..8fa3777c 100644 --- a/src/danog/MadelineProto/MTProtoTools/AuthKeyHandler.php +++ b/src/danog/MadelineProto/MTProtoTools/AuthKeyHandler.php @@ -1,15 +1,21 @@ . -*/ +/** + * AuthKeyHandler module. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see . + * + * @author Daniil Gentili + * @copyright 2016-2018 Daniil Gentili + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ namespace danog\MadelineProto\MTProtoTools; @@ -21,7 +27,10 @@ namespace danog\MadelineProto\MTProtoTools; */ trait AuthKeyHandler { - public function create_auth_key($expires_in, $datacenter) + private $init_auth_dcs = []; + private $pending_auth = false; + + public function create_auth_key_async($expires_in, $datacenter): \Generator { $req_pq = strpos($datacenter, 'cdn') ? 'req_pq' : 'req_pq_multi'; for ($retry_id_total = 1; $retry_id_total <= $this->settings['max_tries']['authorization']; $retry_id_total++) { @@ -34,18 +43,18 @@ trait AuthKeyHandler * @method req_pq * * @param [ - * int128 $nonce : The value of nonce is selected randomly by the client (random number) and identifies the client within this communication + * int128 $nonce : The value of nonce is selected randomly by the client (random number) and identifies the client within this communication * ] * * @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); - $ResPQ = $this->method_call($req_pq, ['nonce' => $nonce], ['datacenter' => $datacenter]); + $ResPQ = yield $this->method_call_async_read($req_pq, ['nonce' => $nonce], ['datacenter' => $datacenter]); /* * *********************************************************************** * Check if the client's nonce and the server's nonce are the same @@ -135,7 +144,7 @@ trait AuthKeyHandler } if (!$pq->equals($p->multiply($q))) { - throw new \danog\MadelineProto\SecurityException("couldn't compute p and q. Original pq: {$pq}, computed p: {$p}, computed q: {$q}, computed pq: ".$p->multiply($q)); + throw new \danog\MadelineProto\SecurityException("Couldn't compute p and q, install prime.madelineproto.xyz to fix. Original pq: {$pq}, computed p: {$p}, computed q: {$q}, computed pq: ".$p->multiply($q)); } } } @@ -151,7 +160,7 @@ trait AuthKeyHandler $p_bytes = $p->toBytes(); $q_bytes = $q->toBytes(); $new_nonce = $this->random(32); - $data_unserialized = ['pq' => $pq_bytes, 'p' => $p_bytes, 'q' => $q_bytes, 'nonce' => $nonce, 'server_nonce' => $server_nonce, 'new_nonce' => $new_nonce, 'expires_in' => $expires_in]; + $data_unserialized = ['pq' => $pq_bytes, 'p' => $p_bytes, 'q' => $q_bytes, 'nonce' => $nonce, 'server_nonce' => $server_nonce, 'new_nonce' => $new_nonce, 'expires_in' => $expires_in, 'dc' => preg_replace('|_.*|', '', $datacenter)]; $p_q_inner_data = $this->serialize_object(['type' => 'p_q_inner_data'.($expires_in < 0 ? '' : '_temp')], $data_unserialized, 'p_q_inner_data'); /* * *********************************************************************** @@ -167,22 +176,22 @@ trait AuthKeyHandler * Starting Diffie Hellman key exchange, Server authentication * @method req_DH_params * @param [ - * int128 $nonce : The value of nonce is selected randomly by the client (random number) and identifies the client within this communication - * int128 $server_nonce : The value of server_nonce is selected randomly by the server - * string $p : The value of BigInteger - * string $q : The value of BigInteger - * long $public_key_fingerprint : This is our key in the server_public_key_fingerprints vector - * string $encrypted_data + * int128 $nonce : The value of nonce is selected randomly by the client (random number) and identifies the client within this communication + * int128 $server_nonce : The value of server_nonce is selected randomly by the server + * string $p : The value of BigInteger + * string $q : The value of BigInteger + * long $public_key_fingerprint : This is our key in the server_public_key_fingerprints vector + * string $encrypted_data * ] * @return Server_DH_Params [ - * 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 $new_nonce_hash : Return this value if server responds with server_DH_params_fail - * string $encrypted_answer : Return this value if server responds with server_DH_params_ok + * 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 $new_nonce_hash : Return this value if server responds with server_DH_params_fail + * string $encrypted_answer : Return this value if server responds with server_DH_params_ok * ] */ // - $server_dh_params = $this->method_call('req_DH_params', ['nonce' => $nonce, 'server_nonce' => $server_nonce, 'p' => $p_bytes, 'q' => $q_bytes, 'public_key_fingerprint' => $key->fp, 'encrypted_data' => $encrypted_data], ['datacenter' => $datacenter]); + $server_dh_params = yield $this->method_call_async_read('req_DH_params', ['nonce' => $nonce, 'server_nonce' => $server_nonce, 'p' => $p_bytes, 'q' => $q_bytes, 'public_key_fingerprint' => $key->fp, 'encrypted_data' => $encrypted_data], ['datacenter' => $datacenter]); /* * *********************************************************************** * Check if the client's nonce and the server's nonce are the same @@ -223,12 +232,12 @@ trait AuthKeyHandler * *********************************************************************** * Deserialize answer * @return Server_DH_inner_data [ - * int128 $nonce : The value of nonce is selected randomly by the client (random number) and identifies the client within this communication - * int128 $server_nonce : The value of server_nonce is selected randomly by the server - * int $g - * string $dh_prime - * string $g_a - * int $server_time + * int128 $nonce : The value of nonce is selected randomly by the client (random number) and identifies the client within this communication + * int128 $server_nonce : The value of server_nonce is selected randomly by the server + * int $g + * string $dh_prime + * string $g_a + * int $server_time * ] */ $server_DH_inner_data = $this->deserialize($answer, ['type' => '']); @@ -280,10 +289,10 @@ trait AuthKeyHandler * serialize client_DH_inner_data * @method client_DH_inner_data * @param Server_DH_inner_data [ - * int128 $nonce : The value of nonce is selected randomly by the client (random number) and identifies the client within this communication - * int128 $server_nonce : The value of server_nonce is selected randomly by the server - * long $retry_id : First attempt - * string $g_b : g^b mod dh_prime + * int128 $nonce : The value of nonce is selected randomly by the client (random number) and identifies the client within this communication + * int128 $server_nonce : The value of server_nonce is selected randomly by the server + * long $retry_id : First attempt + * string $g_b : g^b mod dh_prime * ] */ $data = $this->serialize_object(['type' => 'client_DH_inner_data'], ['nonce' => $nonce, 'server_nonce' => $server_nonce, 'retry_id' => $retry_id, 'g_b' => $g_b_str], 'client_DH_inner_data'); @@ -300,19 +309,19 @@ trait AuthKeyHandler * Send set_client_DH_params query * @method set_client_DH_params * @param Server_DH_inner_data [ - * int128 $nonce : The value of nonce is selected randomly by the client (random number) and identifies the client within this communication - * int128 $server_nonce : The value of server_nonce is selected randomly by the server - * string $encrypted_data + * int128 $nonce : The value of nonce is selected randomly by the client (random number) and identifies the client within this communication + * int128 $server_nonce : The value of server_nonce is selected randomly by the server + * string $encrypted_data * ] * @return Set_client_DH_params_answer [ - * string $_ : This value is dh_gen_ok, dh_gen_retry OR dh_gen_fail - * int128 $server_nonce : The value of server_nonce is selected randomly by the server - * int128 $new_nonce_hash1 : Return this value if server responds with dh_gen_ok - * int128 $new_nonce_hash2 : Return this value if server responds with dh_gen_retry - * int128 $new_nonce_hash2 : Return this value if server responds with dh_gen_fail + * string $_ : This value is dh_gen_ok, dh_gen_retry OR dh_gen_fail + * int128 $server_nonce : The value of server_nonce is selected randomly by the server + * int128 $new_nonce_hash1 : Return this value if server responds with dh_gen_ok + * int128 $new_nonce_hash2 : Return this value if server responds with dh_gen_retry + * int128 $new_nonce_hash2 : Return this value if server responds with dh_gen_fail * ] */ - $Set_client_DH_params_answer = $this->method_call('set_client_DH_params', ['nonce' => $nonce, 'server_nonce' => $server_nonce, 'encrypted_data' => $encrypted_data], ['datacenter' => $datacenter]); + $Set_client_DH_params_answer = yield $this->method_call_async_read('set_client_DH_params', ['nonce' => $nonce, 'server_nonce' => $server_nonce, 'encrypted_data' => $encrypted_data], ['datacenter' => $datacenter]); /* * *********************************************************************** * Generate auth_key @@ -380,13 +389,7 @@ trait AuthKeyHandler $this->logger->logger('An exception occurred while generating the authorization key: '.$e->getMessage().' in '.basename($e->getFile(), '.php').' on line '.$e->getLine().'. Retrying...', \danog\MadelineProto\Logger::WARNING); $req_pq = $req_pq === 'req_pq_multi' ? 'req_pq' : 'req_pq_multi'; } catch (\danog\MadelineProto\RPCErrorException $e) { - if ($e->rpc === 'RPC_CALL_FAIL') { - throw $e; - } $this->logger->logger('An RPCErrorException occurred while generating the authorization key: '.$e->getMessage().' Retrying (try number '.$retry_id_total.')...', \danog\MadelineProto\Logger::WARNING); - } finally { - $this->datacenter->sockets[$datacenter]->new_outgoing = []; - $this->datacenter->sockets[$datacenter]->new_incoming = []; } } if (strpos($datacenter, 'cdn') === false) { @@ -403,11 +406,11 @@ trait AuthKeyHandler */ $this->logger->logger('Executing g_a check (1/2)...', \danog\MadelineProto\Logger::VERBOSE); if ($g_a->compare(\danog\MadelineProto\Magic::$one) <= 0 || $g_a->compare($p->subtract(\danog\MadelineProto\Magic::$one)) >= 0) { - throw new \danog\MadelineProto\SecurityException('g_a is invalid (1 < g_a < dh_prime - 1 is false).'); + throw new \danog\MadelineProto\SecurityException('g_a is invalid (1 < g_a < p - 1 is false).'); } $this->logger->logger('Executing g_a check (2/2)...', \danog\MadelineProto\Logger::VERBOSE); if ($g_a->compare(\danog\MadelineProto\Magic::$twoe1984) < 0 || $g_a->compare($p->subtract(\danog\MadelineProto\Magic::$twoe1984)) >= 0) { - throw new \danog\MadelineProto\SecurityException('g_a is invalid (2^1984 < gA < dh_prime - 2^1984 is false).'); + throw new \danog\MadelineProto\SecurityException('g_a is invalid (2^1984 < g_a < p - 2^1984 is false).'); } return true; @@ -434,9 +437,9 @@ trait AuthKeyHandler /* $this->logger->logger('Executing p/g checks (2/3)...', \danog\MadelineProto\Logger::VERBOSE); if (!$p->subtract(\danog\MadelineProto\Magic::$one)->divide(\danog\MadelineProto\Magic::$two)[0]->isPrime()) { - throw new \danog\MadelineProto\SecurityException("p isn't a safe 2048-bit prime ((p - 1) / 2 isn't a prime)."); + throw new \danog\MadelineProto\SecurityException("p isn't a safe 2048-bit prime ((p - 1) / 2 isn't a prime)."); } - */ + */ /* * *********************************************************************** * Check validity of p @@ -480,7 +483,7 @@ trait AuthKeyHandler return $this->dh_config = $dh_config; } - public function bind_temp_auth_key($expires_in, $datacenter) + public function bind_temp_auth_key_async($expires_in, $datacenter) { for ($retry_id_total = 1; $retry_id_total <= $this->settings['max_tries']['authorization']; $retry_id_total++) { try { @@ -491,14 +494,14 @@ trait AuthKeyHandler $perm_auth_key_id = $this->datacenter->sockets[$datacenter]->auth_key['id']; $temp_session_id = $this->datacenter->sockets[$datacenter]->session_id; $message_data = $this->serialize_object(['type' => 'bind_auth_key_inner'], ['nonce' => $nonce, 'temp_auth_key_id' => $temp_auth_key_id, 'perm_auth_key_id' => $perm_auth_key_id, 'temp_session_id' => $temp_session_id, 'expires_at' => $expires_at], 'bind_temp_auth_key_inner'); - $message_id = $this->generate_message_id($datacenter); + $message_id = $this->datacenter->sockets[$datacenter]->generate_message_id(); $seq_no = 0; $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)); 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]); + $res = yield $this->method_call_async_read('auth.bindTempAuthKey', ['perm_auth_key_id' => $perm_auth_key_id, 'nonce' => $nonce, 'expires_at' => $expires_at, 'encrypted_message' => $encrypted_message], ['msg_id' => $message_id, 'datacenter' => $datacenter]); if ($res === true) { $this->logger->logger('Successfully binded temporary and permanent authorization keys, DC '.$datacenter, \danog\MadelineProto\Logger::NOTICE); @@ -510,9 +513,6 @@ trait AuthKeyHandler $this->logger->logger('An exception occurred while generating the authorization key: '.$e->getMessage().' Retrying (try number '.$retry_id_total.')...', \danog\MadelineProto\Logger::WARNING); } catch (\danog\MadelineProto\RPCErrorException $e) { $this->logger->logger('An RPCErrorException occurred while generating the authorization key: '.$e->getMessage().' Retrying (try number '.$retry_id_total.')...', \danog\MadelineProto\Logger::WARNING); - } finally { - $this->datacenter->sockets[$datacenter]->new_outgoing = []; - $this->datacenter->sockets[$datacenter]->new_incoming = []; } } @@ -522,70 +522,130 @@ trait AuthKeyHandler // Creates authorization keys public function init_authorization() { + return $this->wait($this->init_authorization_async()); + } + + public function init_authorization_async() + { + if ($this->pending_auth) { + return; + } + $initing = $this->initing_authorization; + $this->initing_authorization = true; $this->updates_state['sync_loading'] = true; $this->postpone_updates = true; try { + $dcs = []; + $postpone = []; foreach ($this->datacenter->sockets as $id => $socket) { - if ($socket->session_id === null) { - $socket->session_id = $this->random(8); - $socket->session_in_seq_no = 0; - $socket->session_out_seq_no = 0; + if (strpos($id, 'media') !== false) { + $oid = intval($id); + if (isset($dcs[$oid])) { + $postpone[$id] = $socket; + } + continue; } - $cdn = strpos($id, 'cdn'); - $media = strpos($id, 'media'); + if (isset($this->init_auth_dcs[$id])) { + $this->pending_auth = true; + continue; + } + $dcs[$id] = function () use ($id, $socket) { + return $this->init_authorization_socket($id, $socket); + }; + } + yield array_shift($dcs)(); + foreach ($dcs as &$dc) { + $dc = $dc(); + } + yield $dcs; - if ($socket->temp_auth_key === null || $socket->auth_key === null) { - $dc_config_number = isset($this->settings['connection_settings'][$id]) ? $id : 'all'; - if ($socket->auth_key === null && !$cdn && !$media) { - $this->logger->logger(sprintf(\danog\MadelineProto\Lang::$current_lang['gen_perm_auth_key'], $id), \danog\MadelineProto\Logger::NOTICE); - $socket->auth_key = $this->create_auth_key(-1, $id); - $socket->authorized = false; - } elseif ($socket->auth_key === null && $media) { - $socket->auth_key = $this->datacenter->sockets[intval($id)]->auth_key; - $socket->authorized = &$this->datacenter->sockets[intval($id)]->authorized; - } - if ($media) { - $socket->authorized = &$this->datacenter->sockets[intval($id)]->authorized; - } - if ($this->settings['connection_settings'][$dc_config_number]['pfs']) { - if (!$cdn) { - $this->logger->logger(sprintf(\danog\MadelineProto\Lang::$current_lang['gen_temp_auth_key'], $id), \danog\MadelineProto\Logger::NOTICE); - $socket->temp_auth_key = null; - $socket->temp_auth_key = $this->create_auth_key($this->settings['authorization']['default_temp_auth_key_expires_in'], $id); - $this->bind_temp_auth_key($this->settings['authorization']['default_temp_auth_key_expires_in'], $id); - $config = $this->method_call('help.getConfig', [], ['datacenter' => $id]); - $this->sync_authorization($id); - $this->get_config($config); - } elseif ($socket->temp_auth_key === null) { - $this->logger->logger(sprintf(\danog\MadelineProto\Lang::$current_lang['gen_temp_auth_key'], $id), \danog\MadelineProto\Logger::NOTICE); - $socket->temp_auth_key = $this->create_auth_key($this->settings['authorization']['default_temp_auth_key_expires_in'], $id); - } - } else { - if (!$cdn) { - $socket->temp_auth_key = $socket->auth_key; - $config = $this->method_call('help.getConfig', [], ['datacenter' => $id]); - $this->sync_authorization($id); - $this->get_config($config); - } elseif ($socket->temp_auth_key === null) { - $this->logger->logger(sprintf(\danog\MadelineProto\Lang::$current_lang['gen_temp_auth_key'], $id), \danog\MadelineProto\Logger::NOTICE); - $socket->temp_auth_key = $this->create_auth_key($this->settings['authorization']['default_temp_auth_key_expires_in'], $id); - } - } - } elseif (!$cdn) { - $this->sync_authorization($id); - } + foreach ($postpone as $id => $socket) { + yield $this->init_authorization_socket($id, $socket); + } + //foreach ($dcs as $dc) { yield $dc; } + + if ($this->pending_auth && empty($this->init_auth_dcs)) { + $this->pending_auth = false; + yield $this->init_authorization_async(); } } finally { + $this->pending_auth = false; $this->postpone_updates = false; - $this->initing_authorization = false; + $this->initing_authorization = $initing; $this->updates_state['sync_loading'] = false; $this->handle_pending_updates(); } } - public function sync_authorization($id) + public function init_authorization_socket($id, $socket) + { + $this->init_auth_dcs[$id] = true; + + try { + if ($socket->session_id === null) { + $socket->session_id = $this->random(8); + $socket->session_in_seq_no = 0; + $socket->session_out_seq_no = 0; + } + $cdn = strpos($id, 'cdn'); + $media = strpos($id, 'media'); + + if ($socket->temp_auth_key === null || $socket->auth_key === null) { + $dc_config_number = isset($this->settings['connection_settings'][$id]) ? $id : 'all'; + if ($socket->auth_key === null && !$cdn && !$media) { + $this->logger->logger(sprintf(\danog\MadelineProto\Lang::$current_lang['gen_perm_auth_key'], $id), \danog\MadelineProto\Logger::NOTICE); + $socket->auth_key = yield $this->create_auth_key_async(-1, $id); + $socket->authorized = false; + } elseif ($socket->auth_key === null && $media) { + $socket->auth_key = $this->datacenter->sockets[intval($id)]->auth_key; + $socket->authorized = &$this->datacenter->sockets[intval($id)]->authorized; + } + if ($media) { + $socket->authorized = &$this->datacenter->sockets[intval($id)]->authorized; + } + if ($this->settings['connection_settings'][$dc_config_number]['pfs']) { + if (!$cdn) { + $this->logger->logger(sprintf(\danog\MadelineProto\Lang::$current_lang['gen_temp_auth_key'], $id), \danog\MadelineProto\Logger::NOTICE); + + //$authorized = $socket->authorized; + //$socket->authorized = false; + + $socket->temp_auth_key = null; + $socket->temp_auth_key = yield $this->create_auth_key_async($this->settings['authorization']['default_temp_auth_key_expires_in'], $id); + yield $this->bind_temp_auth_key_async($this->settings['authorization']['default_temp_auth_key_expires_in'], $id); + + //$socket->authorized = $authorized; + + $config = yield $this->method_call_async_read('help.getConfig', [], ['datacenter' => $id]); + + yield $this->sync_authorization_async($id); + yield $this->get_config_async($config); + } elseif ($socket->temp_auth_key === null) { + $this->logger->logger(sprintf(\danog\MadelineProto\Lang::$current_lang['gen_temp_auth_key'], $id), \danog\MadelineProto\Logger::NOTICE); + $socket->temp_auth_key = yield $this->create_auth_key_async($this->settings['authorization']['default_temp_auth_key_expires_in'], $id); + } + } else { + if (!$cdn) { + $socket->temp_auth_key = $socket->auth_key; + $config = yield $this->method_call_async_read('help.getConfig', [], ['datacenter' => $id]); + yield $this->sync_authorization_async($id); + yield $this->get_config_async($config); + } elseif ($socket->temp_auth_key === null) { + $this->logger->logger(sprintf(\danog\MadelineProto\Lang::$current_lang['gen_temp_auth_key'], $id), \danog\MadelineProto\Logger::NOTICE); + $socket->temp_auth_key = yield $this->create_auth_key_async($this->settings['authorization']['default_temp_auth_key_expires_in'], $id); + } + } + } elseif (!$cdn) { + yield $this->sync_authorization_async($id); + } + } finally { + unset($this->init_auth_dcs[$id]); + } + } + + public function sync_authorization_async($id) { if (!isset($this->datacenter->sockets[$id])) { return false; @@ -599,8 +659,8 @@ trait AuthKeyHandler if ($authorized_socket->temp_auth_key !== null && $authorized_socket->auth_key !== null && $authorized_socket->authorized === true && $this->authorized === self::LOGGED_IN && $socket->authorized === false && strpos($authorized_dc_id, 'cdn') === false) { try { $this->logger->logger('Trying to copy authorization from dc '.$authorized_dc_id.' to dc '.$id); - $exported_authorization = $this->method_call('auth.exportAuthorization', ['dc_id' => preg_replace('|_.*|', '', $id)], ['datacenter' => $authorized_dc_id]); - $authorization = $this->method_call('auth.importAuthorization', $exported_authorization, ['datacenter' => $id]); + $exported_authorization = yield $this->method_call_async_read('auth.exportAuthorization', ['dc_id' => preg_replace('|_.*|', '', $id)], ['datacenter' => $authorized_dc_id]); + $authorization = yield $this->method_call_async_read('auth.importAuthorization', $exported_authorization, ['datacenter' => $id]); $socket->authorized = true; break; } catch (\danog\MadelineProto\Exception $e) { diff --git a/src/danog/MadelineProto/MTProtoTools/CallHandler.php b/src/danog/MadelineProto/MTProtoTools/CallHandler.php index a970f91f..ef0e2252 100644 --- a/src/danog/MadelineProto/MTProtoTools/CallHandler.php +++ b/src/danog/MadelineProto/MTProtoTools/CallHandler.php @@ -1,96 +1,109 @@ . -*/ +/** + * CallHandler module. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see . + * + * @author Daniil Gentili + * @copyright 2016-2018 Daniil Gentili + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ namespace danog\MadelineProto\MTProtoTools; +use Amp\Deferred; +use Amp\Promise; +use danog\MadelineProto\Async\Parameters; +use function Amp\call; +use function Amp\Promise\all; + /** * Manages method and object calls. */ trait CallHandler { - public $wrapper; - - public function method_call($method, $args = [], $aargs = ['message_id' => null, 'heavy' => false]) + /* + public function select() { - if (!is_array($args)) { - throw new \danog\MadelineProto\Exception("Arguments aren't an array."); - } - if (!is_array($aargs)) { - throw new \danog\MadelineProto\Exception("Additonal arguments aren't an array."); - } - if (isset($args['id']['_']) && isset($args['id']['dc_id']) && $args['id']['_'] === 'inputBotInlineMessageID') { - $aargs['datacenter'] = $args['id']['dc_id']; - } - if (!isset($aargs['datacenter'])) { - throw new \danog\MadelineProto\Exception('No datacenter provided'); - } - if (isset($aargs['apifactory']) && array_key_exists($method, self::DISALLOWED_METHODS)) { - throw new \danog\MadelineProto\Exception(self::DISALLOWED_METHODS[$method], 0, null, 'MadelineProto', 1); - } - if ($this->wrapper instanceof \danog\MadelineProto\API && isset($this->wrapper->session) && !is_null($this->wrapper->session) && time() - $this->wrapper->serialized > $this->settings['serialization']['serialization_interval']) { - $this->logger->logger("Didn't serialize in a while, doing that now..."); - $this->wrapper->serialize($this->wrapper->session); - } - if (isset($aargs['file']) && $aargs['file'] && isset($this->datacenter->sockets[$aargs['datacenter'].'_media'])) { - \danog\MadelineProto\Logger::log('Using media DC'); - $aargs['datacenter'] .= '_media'; - } - if (isset($args['message']) && is_string($args['message']) && $this->mb_strlen($args['message']) > $this->config['message_length_max']) { - $arg_chunks = $this->split_to_chunks($args); - $args = array_shift($arg_chunks); - } - $args = $this->botAPI_to_MTProto($args); - if (isset($args['ping_id']) && is_int($args['ping_id'])) { - $args['ping_id'] = $this->pack_signed_long($args['ping_id']); - } - if (isset($args['chat_id']) && in_array($method, ['messages.addChatUser', 'messages.deleteChatUser', 'messages.editChatAdmin', 'messages.editChatPhoto', 'messages.editChatTitle', 'messages.getFullChat', 'messages.exportChatInvite', 'messages.editChatAdmin', 'messages.migrateChat']) && (!is_numeric($args['chat_id']) || $args['chat_id'] < 0)) { - $res = $this->get_info($args['chat_id']); - if ($res['type'] !== 'chat') { - throw new \danog\MadelineProto\Exception('chat_id is not a chat id (only normal groups allowed, not supergroups)!'); + $result = []; + + try { + /* + if ($this->is_http($this->settings['connection_settings']['default_dc']) || $this->altervista) { + $this->logger->logger("Initial HTTP short poll"); + $waiting = $this->datacenter->select(0.1); + $result = $this->handle_select($waiting, $result); + }/ + $tries = 10; // TODO add setting + $this->logger->logger('Long poll'); + $t = microtime(true); + $waiting = $this->datacenter->select(); + $t = microtime(true) - $t; + $this->logger->logger("Long poll took $t"); + + $result = $this->handle_select($waiting, $result); + + do { + $this->logger->logger('Short poll'); + $waiting = $this->datacenter->select($this->is_http($this->settings['connection_settings']['default_dc']) || $this->altervista ? $this->settings['connection_settings']['all']['timeout'] / 10 : true); + $result = $this->handle_select($waiting, $result); + } while ($tries-- && $waiting); + } catch (\danog\MadelineProto\NothingInTheSocketException $e) { + $this->logger->logger('Nothing in the socket while selecting', \danog\MadelineProto\Logger::ULTRA_VERBOSE); + foreach ($this->datacenter->sockets as $dc => $socket) { + $this->close_and_reopen($dc); + $this->send_messages($dc); } - $args['chat_id'] = $res['chat_id']; } - if (in_array($method, ['messages.setEncryptedTyping', 'messages.readEncryptedHistory', 'messages.sendEncrypted', 'messages.sendEncryptedFile', 'messages.sendEncryptedService', 'messages.receivedQueue'])) { - $aargs['queue'] = 'secret'; - } - if (isset($aargs['queue'])) { - $queue = $aargs['queue']; - if (!isset($this->datacenter->sockets[$aargs['datacenter']]->call_queue[$queue])) { - $this->datacenter->sockets[$aargs['datacenter']]->call_queue[$queue] = []; + + return $result; + } + + public $did = []; + + public function handle_select($waiting, $result) + { + foreach ($waiting as $dc) { + $error = $this->recv_message($dc); + if ($error !== true) { + $this->close_and_reopen($dc); + if ($error === -404) { + if ($this->datacenter->sockets[$dc]->temp_auth_key !== null) { + $this->logger->logger('WARNING: Resetting auth key...', \danog\MadelineProto\Logger::WARNING); + $this->datacenter->sockets[$dc]->temp_auth_key = null; + $this->init_authorization(); + + return $result; + } + } + + throw new \danog\MadelineProto\RPCErrorException($error, $error); + } + $result[$dc] = $this->handle_messages($dc) && (isset($result[$dc]) ? $result[$dc] : true); + if (($this->is_http($dc) || $this->altervista) && $this->datacenter->sockets[$dc]->new_outgoing) { + $this->send_messages($dc); } - unset($aargs['queue']); } - if (isset($aargs['serialized'])) { - $serialized = $args['serialized']; - } else { - $serialized = $this->serialize_method($method, $args); - } - if ($this->datacenter->sockets[$aargs['datacenter']]->temp_auth_key !== null && (!isset($this->datacenter->sockets[$aargs['datacenter']]->temp_auth_key['connection_inited']) || $this->datacenter->sockets[$aargs['datacenter']]->temp_auth_key['connection_inited'] === false)) { - $this->logger->logger(sprintf(\danog\MadelineProto\Lang::$current_lang['write_client_info'], $method), \danog\MadelineProto\Logger::NOTICE); - $serialized = $this->serialize_method('invokeWithLayer', ['layer' => $this->settings['tl_schema']['layer'], 'query' => $this->serialize_method('initConnection', ['api_id' => $this->settings['app_info']['api_id'], 'api_hash' => $this->settings['app_info']['api_hash'], 'device_model' => strpos($aargs['datacenter'], 'cdn') === false ? $this->settings['app_info']['device_model'] : 'n/a', 'system_version' => strpos($aargs['datacenter'], 'cdn') === false ? $this->settings['app_info']['system_version'] : 'n/a', 'app_version' => $this->settings['app_info']['app_version'], 'system_lang_code' => $this->settings['app_info']['lang_code'], 'lang_code' => $this->settings['app_info']['lang_code'], 'lang_pack' => '', 'query' => $serialized])]); - } - $content_related = $this->content_related($method); - $type = $this->methods->find_by_method($method)['type']; - if (isset($queue)) { - $serialized = $this->serialize_method('invokeAfterMsgs', ['msg_ids' => $this->datacenter->sockets[$aargs['datacenter']]->call_queue[$queue], 'query' => $serialized]); - } - if ($this->settings['requests']['gzip_encode_if_gt'] !== -1 && ($l = strlen($serialized)) > $this->settings['requests']['gzip_encode_if_gt'] && ($g = strlen($gzipped = gzencode($serialized))) < $l) { - $serialized = $this->serialize_object(['type' => 'gzip_packed'], ['packed_data' => $gzipped], 'gzipped data'); - $this->logger->logger('Using GZIP compression for '.$method.', saved '.($l - $g).' bytes of data, reduced call size by '.$g * 100 / $l.'%', \danog\MadelineProto\Logger::ULTRA_VERBOSE); - } - $to_ack = []; - $last_recv = $this->datacenter->sockets[$aargs['datacenter']]->last_recv; - for ($count = 1; $count <= $this->settings['max_tries']['query']; $count++) { + + return $result; + } + public function iorun($updates) + { + do { + if ($updates && time() - $this->last_getdifference > $this->settings['updates']['getdifference_interval']) { + $this->get_updates_difference(); + + return; + } + if ($canunset = !$this->updates_state['sync_loading']) { $this->updates_state['sync_loading'] = true; } @@ -101,240 +114,395 @@ trait CallHandler $this->postpone_pwrchat = true; } - try { - $this->logger->logger('Calling method (try number '.$count.' for '.$method.')...', \danog\MadelineProto\Logger::ULTRA_VERBOSE); - if ($this->datacenter->sockets[$aargs['datacenter']]->temp_auth_key !== null) { - if (isset($message_id)) { - $this->logger->logger('Clearing old method call', \danog\MadelineProto\Logger::ULTRA_VERBOSE); - if (isset($this->datacenter->sockets[$aargs['datacenter']]->outgoing_messages[$message_id])) { - unset($this->datacenter->sockets[$aargs['datacenter']]->outgoing_messages[$message_id]); - } - if (isset($this->datacenter->sockets[$aargs['datacenter']]->new_outgoing[$message_id])) { - unset($this->datacenter->sockets[$aargs['datacenter']]->new_outgoing[$message_id]); - } - } + if (($this->is_http($this->settings['connection_settings']['default_dc']) || $this->altervista) && $updates) { + $this->send_messages($this->settings['connection_settings']['default_dc']); + } + foreach ($this->datacenter->sockets as $id => $datacenter) { + if ($datacenter->pending_outgoing) { + $this->send_messages($id); + } + } - $this->datacenter->sockets[$aargs['datacenter']]->object_queue[] = ['_' => $method, 'body' => $serialized, 'content_related' => $content_related, 'msg_id' => $message_id = isset($aargs['message_id']) ? $aargs['message_id'] : $this->generate_message_id($aargs['datacenter'])]; - if (count($to_ack = $this->datacenter->sockets[$aargs['datacenter']]->ack_queue)) { - $this->datacenter->sockets[$aargs['datacenter']]->object_queue[] = ['_' => 'msgs_ack', 'body' => $this->serialize_object(['type' => 'msgs_ack'], ['msg_ids' => $this->datacenter->sockets[$aargs['datacenter']]->ack_queue], 'msgs_ack'), 'content_related' => false, 'msg_id' => $this->generate_message_id($aargs['datacenter'])]; + $this->logger->logger('Polling for ' . ($updates ? 'updates' : 'replies') . ': selecting', \danog\MadelineProto\Logger::ULTRA_VERBOSE); + $t = microtime(true); + $only_updates = $this->select(); + $t = microtime(true) - $t; + $this->logger->logger('Polling for ' . ($updates ? 'updates' : 'replies') . ': selecting took ' . $t, \danog\MadelineProto\Logger::ULTRA_VERBOSE); + $response_result = $this->has_pending_calls(); + + $repeat = 0; + foreach ($this->datacenter->sockets as $id => $datacenter) { + if ($updates) { + if (isset($only_updates[$id])) { + if ($only_updates[$id]) { + $this->logger->logger("Polling for updates: got only updates for DC $id", \danog\MadelineProto\Logger::VERBOSE); + } else { + $this->logger->logger("Polling for updates: got also RPC replies for DC $id", \danog\MadelineProto\Logger::NOTICE); + } + if ($response_result[$id]) { + $this->logger->logger("Polling for updates: still pending requests, resending for DC $id", \danog\MadelineProto\Logger::WARNING); + $this->send_messages($id); + } + } else { + if ($response_result[$id] || $id === $this->settings['connection_settings']['default_dc']) { + $this->logger->logger("Polling for updates: got nothing for DC $id", \danog\MadelineProto\Logger::ERROR); + + if ($this->is_http($id) || $this->altervista) { + $this->logger->logger("Polling for updates: closing and reopening DC $id since we're on HTTP, and we polled"); + $this->close_and_reopen($id); + $datacenter->last_http_wait = 0; + $repeat |= 1; + $this->logger->logger("Polling for updates: and now repolling for DC $id"); + $this->send_messages($id); + } + } } - if ($this->is_http($aargs['datacenter']) && $method !== 'http_wait') { - $this->datacenter->sockets[$aargs['datacenter']]->object_queue[] = ['_' => 'http_wait', 'body' => $this->serialize_method('http_wait', ['max_wait' => 500, 'wait_after' => 150, 'max_delay' => 500]), 'content_related' => false, 'msg_id' => $this->generate_message_id($aargs['datacenter'])]; - } - $this->send_messages($aargs['datacenter']); } else { - $this->send_unencrypted_message($method, $serialized, $message_id = isset($aargs['message_id']) ? $aargs['message_id'] : $this->generate_message_id($aargs['datacenter']), $aargs['datacenter']); - $aargs['message_id'] = $message_id; - } + if (isset($only_updates[$id])) { + if ($only_updates[$id]) { + $this->logger->logger("Polling for replies: got only updates for DC $id", \danog\MadelineProto\Logger::WARNING); - if (isset($queue)) { - $this->datacenter->sockets[$aargs['datacenter']]->call_queue[$queue][] = $message_id; - if (count($this->datacenter->sockets[$aargs['datacenter']]->call_queue[$queue]) > $this->settings['msg_array_limit']['call_queue']) { - reset($this->datacenter->sockets[$aargs['datacenter']]->call_queue[$queue]); - $key = key($this->datacenter->sockets[$aargs['datacenter']]->call_queue[$queue]); - if ($key[0] === "\0") { - $key = $key; - } - unset($this->datacenter->sockets[$aargs['datacenter']]->call_queue[$queue][$key]); - } - } - if ($method === 'http_wait' || isset($aargs['noResponse']) && $aargs['noResponse']) { - return true; - } - //$this->datacenter->sockets[$aargs['datacenter']]->outgoing_messages[$message_id]['content'] = ['method' => $method, 'args' => $args]; - $this->datacenter->sockets[$aargs['datacenter']]->new_outgoing[$message_id] = ['msg_id' => $message_id, 'method' => $method, 'type' => $type]; - $res_count = 0; - $server_answer = null; - $update_count = 0; - $only_updates = false; - $response_tries = $this->settings['max_tries']['response'] + 1; - if ($last_recv) { - $additional = (int) floor((time() - $last_recv) / 10); - if ($additional > $this->settings['max_tries']['response'] * 2) { - $additional = $this->settings['max_tries']['response'] * 2; - } - $response_tries += $additional; - } - while ($server_answer === null && $res_count++ < $response_tries) { - // Loop until we get a response, loop for a max of $this->settings['max_tries']['response'] times - try { - $this->logger->logger('Getting response (try number '.$res_count.' for '.$method.')...', \danog\MadelineProto\Logger::ULTRA_VERBOSE); - if (!isset($this->datacenter->sockets[$aargs['datacenter']]->outgoing_messages[$message_id]['response']) || !isset($this->datacenter->sockets[$aargs['datacenter']]->incoming_messages[$this->datacenter->sockets[$aargs['datacenter']]->outgoing_messages[$message_id]['response']]['content'])) { - // Checks if I have received the response to the called method, if not continue looping - if ($only_updates) { - if ($update_count > 50) { - $update_count = 0; - } else { - $res_count--; - $update_count++; - } + if ($response_result[$id]) { + $this->logger->logger("Polling for replies: still pending requests, repolling for DC $id", \danog\MadelineProto\Logger::WARNING); + $this->send_messages($id); + $repeat |= 1; + } else { + $this->logger->logger("Polling for replies: got all RPC replies for DC $id", \danog\MadelineProto\Logger::ULTRA_VERBOSE); } } else { - $server_answer = $this->datacenter->sockets[$aargs['datacenter']]->incoming_messages[$this->datacenter->sockets[$aargs['datacenter']]->outgoing_messages[$message_id]['response']]['content']; - $this->datacenter->sockets[$aargs['datacenter']]->incoming_messages[$this->datacenter->sockets[$aargs['datacenter']]->outgoing_messages[$message_id]['response']]['content'] = ''; - break; + if ($response_result[$id]) { + $this->logger->logger("Polling for replies: still pending requests, repolling for DC $id", \danog\MadelineProto\Logger::WARNING); + $this->send_messages($id); + } else { + $this->logger->logger("Polling for replies: got all RPC replies for DC $id", \danog\MadelineProto\Logger::NOTICE); + } } - if (($error = $this->recv_message($aargs['datacenter'])) !== true) { - if ($error === -404) { - if ($this->datacenter->sockets[$aargs['datacenter']]->temp_auth_key !== null) { - $this->logger->logger('WARNING: Resetting auth key...', \danog\MadelineProto\Logger::WARNING); - $this->datacenter->sockets[$aargs['datacenter']]->temp_auth_key = null; - $this->init_authorization(); + } else { + if ($response_result[$id]) { + $this->logger->logger("Polling for replies: got nothing for DC $id", \danog\MadelineProto\Logger::ERROR); + $this->logger->logger("Polling for replies: closing and reopening DC $id", \danog\MadelineProto\Logger::ERROR); + $this->close_and_reopen($id); + $datacenter->last_http_wait = 0; + $repeat |= 1; + $this->logger->logger("Polling for replies: resending for DC $id", \danog\MadelineProto\Logger::WARNING); + $this->send_messages($id); + } else { + $this->logger->logger("Polling for replies: got all RPC replies for DC $id", \danog\MadelineProto\Logger::ULTRA_VERBOSE); + } + } + } + } + $this->logger->logger('Running guzzle promise queue'); + \GuzzleHttp\Promise\queue()->run(); - throw new \danog\MadelineProto\Exception('I had to recreate the temporary authorization key'); + if ($repeat) { + $this->logger->logger('Repeat iowait'); + } + } while ($repeat); + + if ($canunset) { + $this->updates_state['sync_loading'] = false; + } + if ($canunsetpostponepwrchat) { + $this->postpone_pwrchat = false; + $this->handle_pending_pwrchat(); + } + if ($canunsetpostponeupdates) { + $this->postpone_updates = false; + $this->handle_pending_updates(); + } + } + + */ + + public function has_pending_calls() + { + $result = []; + foreach ($this->datacenter->sockets as $id => $socket) { + $result[$id] = $this->has_pending_calls_dc($id); + } + + return $result; + } + + public function has_pending_calls_dc($datacenter) + { + //$result = 0; + $dc_config_number = isset($this->settings['connection_settings'][$datacenter]) ? $datacenter : 'all'; + foreach ($this->datacenter->sockets[$datacenter]->new_outgoing as $message_id) { + if (isset($this->datacenter->sockets[$datacenter]->outgoing_messages[$message_id]['sent']) && ($this->datacenter->sockets[$datacenter]->outgoing_messages[$message_id]['sent'] + $this->settings['connection_settings'][$dc_config_number]['timeout'] < time()) && ($this->datacenter->sockets[$datacenter]->temp_auth_key === null) === (isset($this->datacenter->sockets[$datacenter]->outgoing_messages[$message_id]['unencrypted']) && $this->datacenter->sockets[$datacenter]->outgoing_messages[$message_id]['unencrypted']) && $this->datacenter->sockets[$datacenter]->outgoing_messages[$message_id]['_'] !== 'msgs_state_req') { + return true; + //$result |= 1; + } + } + + return false; //(bool) $result; + } + + public function check_pending_calls() + { + foreach ($this->datacenter->sockets as $datacenter => $socket) { + $this->check_pending_calls_dc($datacenter); + } + } + + public function check_pending_calls_dc($datacenter) + { + if (!empty($this->datacenter->sockets[$datacenter]->new_outgoing)) { + if ($this->has_pending_calls_dc($datacenter)) { + if ($this->datacenter->sockets[$datacenter]->temp_auth_key !== null) { + $message_ids = array_values($this->datacenter->sockets[$datacenter]->new_outgoing); + $deferred = new \danog\MadelineProto\ImmediatePromise(); + $deferred->then( + function ($result) use ($datacenter, $message_ids) { + $reply = []; + foreach (str_split($result['info']) as $key => $chr) { + $message_id = $message_ids[$key]; + if (!isset($this->datacenter->sockets[$datacenter]->outgoing_messages[$message_id])) { + $this->logger->logger('Already got response for and forgot about message ID '.$this->unpack_signed_long($message_id)); + continue; + } + if (!isset($this->datacenter->sockets[$datacenter]->new_outgoing[$message_id])) { + $this->logger->logger('Already got response for '.$this->datacenter->sockets[$datacenter]->outgoing_messages[$message_id]['_'].' with message ID '.$this->unpack_signed_long($message_id)); + continue; + } + $chr = ord($chr); + switch ($chr & 7) { + case 0: + $this->logger->logger('Wrong message status 0 for '.$this->datacenter->sockets[$datacenter]->outgoing_messages[$message_id]['_'], \danog\MadelineProto\Logger::FATAL_ERROR); + break; + case 1: + case 2: + case 3: + $this->logger->logger('Message '.$this->datacenter->sockets[$datacenter]->outgoing_messages[$message_id]['_'].' with message ID '.$this->unpack_signed_long($message_id).' not received by server, resending...', \danog\MadelineProto\Logger::ERROR); + $this->method_recall($message_id, $datacenter, false, true); + break; + case 4: + if ($chr & 32) { + $this->logger->logger('Message '.$this->datacenter->sockets[$datacenter]->outgoing_messages[$message_id]['_'].' with message ID '.$this->unpack_signed_long($message_id).' received by server and is being processed, waiting...', \danog\MadelineProto\Logger::ERROR); + } elseif ($chr & 64) { + $this->logger->logger('Message '.$this->datacenter->sockets[$datacenter]->outgoing_messages[$message_id]['_'].' with message ID '.$this->unpack_signed_long($message_id).' received by server and was already processed, requesting reply...', \danog\MadelineProto\Logger::ERROR); + $reply[] = $message_id; + } elseif ($chr & 128) { + $this->logger->logger('Message '.$this->datacenter->sockets[$datacenter]->outgoing_messages[$message_id]['_'].' with message ID '.$this->unpack_signed_long($message_id).' received by server and was already sent, requesting reply...', \danog\MadelineProto\Logger::ERROR); + $reply[] = $message_id; + } else { + $this->logger->logger('Message '.$this->datacenter->sockets[$datacenter]->outgoing_messages[$message_id]['_'].' with message ID '.$this->unpack_signed_long($message_id).' received by server, requesting reply...', \danog\MadelineProto\Logger::ERROR); + $reply[] = $message_id; + } } } - - throw new \danog\MadelineProto\RPCErrorException($error, $error); - } - $only_updates = $this->handle_messages($aargs['datacenter']); - // This method receives data from the socket, and parses stuff - } catch (\danog\MadelineProto\Exception $e) { - $last_error = $e->getMessage().' in '.basename($e->getFile(), '.php').' on line '.$e->getLine(); - if (in_array($e->getMessage(), ['Resend query', 'I had to recreate the temporary authorization key', 'Got bad message notification']) || $e->getCode() === 404) { - continue 2; - } - $this->logger->logger('An error getting response of method '.$method.': '.$e->getMessage().' in '.basename($e->getFile(), '.php').' on line '.$e->getLine().'. Retrying...', \danog\MadelineProto\Logger::WARNING); - $this->logger->logger('Full trace '.$e, \danog\MadelineProto\Logger::WARNING); - continue; - } catch (\danog\MadelineProto\NothingInTheSocketException $e) { - $last_error = 'Nothing in the socket'; - $this->logger->logger('An error getting response of method '.$method.': '.$e->getMessage().' in '.basename($e->getFile(), '.php').' on line '.$e->getLine().'. Retrying...', \danog\MadelineProto\Logger::WARNING); - $only_updates = false; - if ($last_recv === $this->datacenter->sockets[$aargs['datacenter']]->last_recv) { // the socket is dead, resend request - $this->close_and_reopen($aargs['datacenter']); - if ($this->altervista) { - continue 2; + if ($reply) { + $this->object_call('msg_resend_ans_req', ['msg_ids' => $reply], ['datacenter' => $datacenter, 'postpone' => true]); } + $this->send_messages($datacenter); + }, + function ($error) use ($datacenter) { + throw $error; + } + ); + $this->logger->logger("Still missing something on DC $datacenter, sending state request", \danog\MadelineProto\Logger::ERROR); + $this->object_call('msgs_state_req', ['msg_ids' => $message_ids], ['datacenter' => $datacenter, 'promise' => $deferred]); + } else { + $dc_config_number = isset($this->settings['connection_settings'][$datacenter]) ? $datacenter : 'all'; + foreach ($this->datacenter->sockets[$datacenter]->new_outgoing as $message_id) { + if (isset($this->datacenter->sockets[$datacenter]->outgoing_messages[$message_id]['sent']) && $this->datacenter->sockets[$datacenter]->outgoing_messages[$message_id]['sent'] + $this->settings['connection_settings'][$dc_config_number]['timeout'] < time() && $this->datacenter->sockets[$datacenter]->outgoing_messages[$message_id]['unencrypted']) { + $this->logger->logger('Still missing '.$this->datacenter->sockets[$datacenter]->outgoing_messages[$message_id]['_'].' with message id '.$this->unpack_signed_long($message_id)." on DC $datacenter, resending", \danog\MadelineProto\Logger::ERROR); + $this->method_recall($message_id, $datacenter, false, true); } - //if ($this->datacenter->sockets[$aargs['datacenter']]->last_recv < time() - 1 && $this->is_http($aargs['datacenter'])) { - // $this->close_and_reopen($aargs['datacenter']); - // continue 2; - //} - continue; //2; } } - if ($canunset) { - $this->updates_state['sync_loading'] = false; - } - if ($canunsetpostponepwrchat) { - $this->postpone_pwrchat = false; - $this->handle_pending_pwrchat(); - } - if ($canunsetpostponeupdates) { - $this->postpone_updates = false; - $this->handle_pending_updates(); - } - foreach ($to_ack as $msg_id) { - $this->datacenter->sockets[$aargs['datacenter']]->incoming_messages[$msg_id]['ack'] = true; - if (isset($this->datacenter->sockets[$aargs['datacenter']]->ack_queue[$msg_id])) { - unset($this->datacenter->sockets[$aargs['datacenter']]->ack_queue[$msg_id]); - } - } - if ($server_answer === null) { - throw new \danog\MadelineProto\Exception("Couldn't get response"); - } - if (!isset($server_answer['_'])) { - return $server_answer; - } - switch ($server_answer['_']) { - case 'rpc_error': - $this->handle_rpc_error($server_answer, $aargs); - break; - case 'bad_server_salt': - case 'bad_msg_notification': - throw new \danog\MadelineProto\RPCErrorException('Received bad_msg_notification: '.self::BAD_MSG_ERROR_CODES[$server_answer['error_code']], $server_answer['error_code']); - case 'boolTrue': - case 'boolFalse': - $server_answer = $server_answer['_'] === 'boolTrue'; - break; - } - if (isset($aargs['botAPI']) && $aargs['botAPI']) { - $server_answer = $this->MTProto_to_botAPI($server_answer, $args); - } - } catch (\danog\MadelineProto\Exception $e) { - $last_error = $e->getMessage().' in '.basename($e->getFile(), '.php').' on line '.$e->getLine(); - if (strpos($e->getMessage(), 'Received request to switch to DC ') === 0) { - if (($method === 'users.getUsers' && $args = ['id' => [['_' => 'inputUserSelf']]]) || $method === 'auth.exportAuthorization' || $method === 'updates.getDifference') { - $this->settings['connection_settings']['default_dc'] = $this->authorized_dc = $this->datacenter->curdc; - } - $last_recv = $this->datacenter->sockets[$aargs['datacenter']]->last_recv; - $this->logger->logger($e->getMessage(), \danog\MadelineProto\Logger::WARNING); - continue; - } - $this->close_and_reopen($aargs['datacenter']); - if ($e->getMessage() === 'Re-executing query after server error...') { - return $this->method_call($method, $args, $aargs); - } - continue; - } catch (\RuntimeException $e) { - $last_error = $e->getMessage().' in '.basename($e->getFile(), '.php').' on line '.$e->getLine(); - $this->logger->logger('An error occurred while calling method '.$method.': '.$last_error.'. Recreating connection and retrying to call method...', \danog\MadelineProto\Logger::WARNING); - $this->close_and_reopen($aargs['datacenter']); - continue; - } finally { - if (isset($aargs['heavy']) && $aargs['heavy'] && isset($message_id)) { - //$this->datacenter->sockets[$aargs['datacenter']]->outgoing_messages[$message_id]['args'] = []; - unset($this->datacenter->sockets[$aargs['datacenter']]->outgoing_messages[$message_id]); - unset($this->datacenter->sockets[$aargs['datacenter']]->new_outgoing[$message_id]); - } - if (isset($message_id) && $method === 'req_pq') { - unset($this->datacenter->sockets[$aargs['datacenter']]->outgoing_messages[$message_id]); - unset($this->datacenter->sockets[$aargs['datacenter']]->new_outgoing[$message_id]); - } - if ($canunset) { - $this->updates_state['sync_loading'] = false; - } - if ($canunsetpostponepwrchat) { - $this->postpone_pwrchat = false; - $this->handle_pending_pwrchat(); - } - if ($canunsetpostponeupdates) { - $this->postpone_updates = false; - $this->handle_pending_updates(); - } } - if ($server_answer === null) { - if ($last_recv === $this->datacenter->sockets[$aargs['datacenter']]->last_recv && $this->datacenter->sockets[$aargs['datacenter']]->temp_auth_key !== null) { - $this->logger->logger('WARNING: Resetting auth key...', \danog\MadelineProto\Logger::WARNING); - $this->datacenter->sockets[$aargs['datacenter']]->temp_auth_key = null; - $this->init_authorization(); - - return $this->method_call($method, $args, $aargs); - } - - throw new \danog\MadelineProto\Exception('An error occurred while calling method '.$method.' ('.$last_error.').'); - } - $this->logger->logger('Got response for method '.$method.' @ try '.$count.' (response try '.$res_count.')', \danog\MadelineProto\Logger::ULTRA_VERBOSE); - if ($this->datacenter->sockets[$aargs['datacenter']]->temp_auth_key !== null && (!isset($this->datacenter->sockets[$aargs['datacenter']]->temp_auth_key['connection_inited']) || $this->datacenter->sockets[$aargs['datacenter']]->temp_auth_key['connection_inited'] === false)) { - $this->datacenter->sockets[$aargs['datacenter']]->temp_auth_key['connection_inited'] = true; - } - $this->datacenter->sockets[$aargs['datacenter']]->outgoing_messages[$message_id] = []; - if (isset($arg_chunks) && count($arg_chunks)) { - $server_answer = [$server_answer]; - foreach ($arg_chunks as $args) { - $server_answer[] = $this->method_call($method, $args, $aargs); - } - } - - return $server_answer; } - if ($method === 'req_pq') { - throw new \danog\MadelineProto\RPCErrorException('RPC_CALL_FAIL'); - } - - throw new \danog\MadelineProto\Exception('An error occurred while calling method '.$method.' ('.$last_error.').'); } - public function object_call($object, $args = [], $aargs = ['message_id' => null, 'heavy' => false]) + public function method_recall($watcherId, $args) { - if (!is_array($args)) { - throw new \danog\MadelineProto\Exception("Arguments aren't an array."); + $message_id = $args['message_id']; + $new_datacenter = $args['datacenter']; + $old_datacenter = $new_datacenter; + if (isset($args['old_datacenter'])) { + $old_datacenter = $args['old_datacenter']; } - if (!isset($aargs['datacenter'])) { - throw new \danog\MadelineProto\Exception('No datacenter provided'); + $postpone = false; + if (isset($args['postpone'])) { + $postpone = $args['postpone']; + } + + if (isset($this->datacenter->sockets[$old_datacenter]->outgoing_messages[$message_id]['container'])) { + $message_ids = $this->datacenter->sockets[$old_datacenter]->outgoing_messages[$message_id]['container']; + } else { + $message_ids = [$message_id]; + } + + foreach ($message_ids as $message_id) { + if (isset($this->datacenter->sockets[$old_datacenter]->outgoing_messages[$message_id]['body'])) { + $this->datacenter->sockets[$new_datacenter]->sendMessage($this->datacenter->sockets[$old_datacenter]->outgoing_messages[$message_id], false); + $this->ack_outgoing_message_id($message_id, $old_datacenter); + $this->got_response_for_outgoing_message_id($message_id, $old_datacenter); + } + } + if (!$postpone) { + $this->datacenter->sockets[$new_datacenter]->writer->resume(); } - $serialized = $this->serialize_object(['type' => $object], $args, $object); - $this->datacenter->sockets[$aargs['datacenter']]->object_queue[] = ['_' => $object, 'body' => $serialized, 'content_related' => $this->content_related($object), 'msg_id' => $this->generate_message_id($aargs['datacenter'])]; } + + public function method_call($method, $args = [], $aargs = ['msg_id' => null, 'heavy' => false]) + { + $promise = $this->method_call_async_read($method, $args, $aargs); + + return $this->wait($promise); + } + + public function method_call_async_read($method, $args = [], $aargs = ['msg_id' => null, 'heavy' => false]): Promise + { + $deferred = new Deferred(); + $this->method_call_async_write($method, $args, $aargs)->onResolve(function ($e, $read_deferred) use ($deferred) { + if ($e) { + $deferred->fail($e); + } else { + if (is_array($read_deferred)) { + $read_deferred = array_map(function ($value) { + return $value->promise(); + }, $read_deferred); + $deferred->resolve(all($read_deferred)); + } else { + $deferred->resolve($read_deferred->promise()); + } + } + }); + + return isset($aargs['noResponse']) && $aargs['noResponse'] ? new \Amp\Success(0) : $deferred->promise(); + } + + public function method_call_async_write($method, $args = [], $aargs = ['msg_id' => null, 'heavy' => false]): Promise + { + return call([$this, 'method_call_async_write_generator'], $method, $args, $aargs); + } + + public function method_call_async_write_generator($method, $args = [], $aargs = ['msg_id' => null, 'heavy' => false]): \Generator + { + if (is_array($args) && isset($args['id']['_']) && isset($args['id']['dc_id']) && $args['id']['_'] === 'inputBotInlineMessageID') { + $aargs['datacenter'] = $args['id']['dc_id']; + } + if ($this->wrapper instanceof \danog\MadelineProto\API && isset($this->wrapper->session) && !is_null($this->wrapper->session) && time() - $this->wrapper->serialized > $this->settings['serialization']['serialization_interval']) { + $this->logger->logger("Didn't serialize in a while, doing that now..."); + $this->wrapper->serialize($this->wrapper->session); + } + if (isset($aargs['file']) && $aargs['file'] && isset($this->datacenter->sockets[$aargs['datacenter'].'_media'])) { + \danog\MadelineProto\Logger::log('Using media DC'); + $aargs['datacenter'] .= '_media'; + } + if (in_array($method, ['messages.setEncryptedTyping', 'messages.readEncryptedHistory', 'messages.sendEncrypted', 'messages.sendEncryptedFile', 'messages.sendEncryptedService', 'messages.receivedQueue'])) { + $aargs['queue'] = 'secret'; + } + + if (is_array($args)) { + if (isset($args['message']) && is_string($args['message']) && $this->mb_strlen($args['message']) > $this->config['message_length_max']) { + $arg_chunks = $this->split_to_chunks($args); + $promises = []; + $new_aargs = $aargs; + $new_aargs['postpone'] = true; + $new_aargs['queue'] = $method; + + foreach ($arg_chunks as $args) { + $promises[] = $this->method_call_async_write($method, $args, $new_aargs); + } + + if (!isset($aargs['postpone'])) { + $this->datacenter->sockets[$aargs['datacenter']]->writer->resume(); + } + + return yield $promises; + } + $args = $this->botAPI_to_MTProto($args); + if (isset($args['ping_id']) && is_int($args['ping_id'])) { + $args['ping_id'] = $this->pack_signed_long($args['ping_id']); + } + } + + $deferred = new Deferred(); + $message = ['_' => $method, 'type' => $this->methods->find_by_method($method)['type'], 'content_related' => $this->content_related($method), 'promise' => $deferred, 'method' => true, 'unencrypted' => $this->datacenter->sockets[$aargs['datacenter']]->temp_auth_key === null && strpos($method, '.') === false]; + + if (is_object($args) && $args instanceof Parameters) { + $message['body'] = call([$args, 'fetchParameters']); + } else { + $message['body'] = $args; + } + + if (isset($aargs['msg_id'])) { + $message['msg_id'] = $aargs['msg_id']; + } + if (isset($aargs['queue'])) { + $message['queue'] = $aargs['queue']; + } + if (isset($aargs['file'])) { + $message['file'] = $aargs['file']; + } + if (isset($aargs['botAPI'])) { + $message['botAPI'] = $aargs['botAPI']; + } + if (($method === 'users.getUsers' && $args === ['id' => [['_' => 'inputUserSelf']]]) || $method === 'auth.exportAuthorization' || $method === 'updates.getDifference') { + $message['user_related'] = true; + } + + $write_deferred = yield $this->datacenter->sockets[$aargs['datacenter']]->sendMessage($message, isset($aargs['postpone']) ? !$aargs['postpone'] : true); + + $deferred = new Deferred(); + $write_promise = $write_deferred->promise(); + $write_promise->onResolve( + function ($e, $result) use ($aargs, $deferred) { + //$this->datacenter->sockets[$aargs['datacenter']]->checker->resume(); + if ($e) { + return $deferred->fail($e); + } + $deferred->resolve($result); + } + ); + + $this->datacenter->sockets[$aargs['datacenter']]->checker->resume(); + + return $deferred; + } + + public function object_call($object, $args = [], $aargs = ['msg_id' => null, 'heavy' => false]) + { + return $this->wait($this->object_call_async($object, $args, $aargs)); + } + + public function object_call_async($object, $args = [], $aargs = ['msg_id' => null, 'heavy' => false]): Promise + { + $message = ['_' => $object, 'body' => $args, 'content_related' => $this->content_related($object), 'unencrypted' => $this->datacenter->sockets[$aargs['datacenter']]->temp_auth_key === null, 'method' => false]; + if (isset($aargs['promise'])) { + $message['promise'] = $aargs['promise']; + } + + return $this->datacenter->sockets[$aargs['datacenter']]->sendMessage($message, isset($aargs['postpone']) ? !$aargs['postpone'] : true); + } + + /* +$message = [ +// only in outgoing messages +'body' => 'serialized body', (optional if container) +'content_related' => bool, +'_' => 'predicate', +'promise' => deferred promise that gets resolved when a response to the message is received (optional), +'send_promise' => deferred promise that gets resolved when the message is sent (optional), +'file' => bool (optional), +'type' => 'type' (optional), +'queue' => queue ID (optional), +'container' => [message ids] (optional), + +// only in incoming messages +'content' => deserialized body, +'seq_no' => number (optional), +'from_container' => bool (optional), + +// can be present in both +'response' => message id (optional), +'msg_id' => message id (optional), +'sent' => timestamp, +'tries' => number +]; + */ } diff --git a/src/danog/MadelineProto/MTProtoTools/Crypt.php b/src/danog/MadelineProto/MTProtoTools/Crypt.php index e4c2123b..365c583e 100644 --- a/src/danog/MadelineProto/MTProtoTools/Crypt.php +++ b/src/danog/MadelineProto/MTProtoTools/Crypt.php @@ -1,15 +1,21 @@ . -*/ +/** + * Crypt module. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see . + * + * @author Daniil Gentili + * @copyright 2016-2018 Daniil Gentili + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ namespace danog\MadelineProto\MTProtoTools; diff --git a/src/danog/MadelineProto/MTProtoTools/Files.php b/src/danog/MadelineProto/MTProtoTools/Files.php index e15191f3..5b9be598 100644 --- a/src/danog/MadelineProto/MTProtoTools/Files.php +++ b/src/danog/MadelineProto/MTProtoTools/Files.php @@ -1,24 +1,36 @@ . -*/ +/** + * Files module. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see . + * + * @author Daniil Gentili + * @copyright 2016-2018 Daniil Gentili + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ namespace danog\MadelineProto\MTProtoTools; +use danog\MadelineProto\Async\AsyncParameters; +use danog\MadelineProto\Exception; +use danog\MadelineProto\Logger; +use danog\MadelineProto\RPCErrorException; +use function Amp\call; + /** * Manages upload and download of files. */ trait Files { - public function upload($file, $file_name = '', $cb = null, $encrypted = false, $datacenter = null) + public function upload_async($file, $file_name = '', $cb = null, $encrypted = false, $datacenter = null): \Generator { if (is_object($file)) { if (!isset(class_implements($file)['danog\MadelineProto\FileCallbackInterface'])) { @@ -34,7 +46,10 @@ trait Files if (empty($file_name)) { $file_name = basename($file); } - $datacenter = is_null($datacenter) ? $this->datacenter->curdc : $datacenter; + $datacenter = is_null($datacenter) ? $this->settings['connection_settings']['default_dc'] : $datacenter; + if (isset($this->datacenter->sockets[$datacenter.'_media'])) { + $datacenter .= '_media'; + } $file_size = filesize($file); if ($file_size > 512 * 1024 * 3000) { throw new \danog\MadelineProto\Exception('Given file is too big!'); @@ -51,7 +66,12 @@ trait Files $constructor = 'input'.($encrypted === true ? 'Encrypted' : '').($file_size > 10 * 1024 * 1024 ? 'FileBig' : 'File').($encrypted === true ? 'Uploaded' : ''); $file_id = $this->random(8); $f = fopen($file, 'r'); - fseek($f, 0); + + $seekable = stream_get_meta_data($f)['seekable']; + if ($seekable) { + fseek($f, 0); + } + $ige = null; if ($encrypted === true) { $key = $this->random(32); $iv = $this->random(32); @@ -63,35 +83,69 @@ trait Files $ige->enableContinuousBuffer(); } $ctx = hash_init('md5'); - while (ftell($f) !== $file_size) { - $bytes = stream_get_contents($f, $part_size); - if ($encrypted === true) { - $bytes = $ige->encrypt(str_pad($bytes, $part_size, chr(0))); - } - hash_update($ctx, $bytes); - if (!$this->method_call($method, ['file_id' => $file_id, 'file_part' => $part_num++, 'file_total_parts' => $part_total_num, 'bytes' => $bytes], ['heavy' => true, 'file' => true, 'datacenter' => &$datacenter])) { - throw new \danog\MadelineProto\Exception('An error occurred while uploading file part '.$part_num); - } - $cb(ftell($f) * 100 / $file_size); + $promises = []; + $cur_part_num = 0; + + while ($part_num < $part_total_num) { + $t = microtime(true); + $read_deferred = yield $this->method_call_async_write( + $method, + new AsyncParameters( + static function () use ($file_id, $part_num, $part_total_num, $part_size, $f, $ctx, $ige, $seekable) { + if ($seekable) { + fseek($f, $part_num * $part_size); + } + $bytes = stream_get_contents($f, $part_size); + if ($ige) { + $bytes = $ige->encrypt(str_pad($bytes, $part_size, chr(0))); + } + hash_update($ctx, $bytes); + + return ['file_id' => $file_id, 'file_part' => $part_num, 'file_total_parts' => $part_total_num, 'bytes' => $bytes]; + }, + $seekable + ), + ['heavy' => true, 'file' => true, 'datacenter' => $datacenter] + ); + $this->logger->logger('Speed for chunk: '.(($part_size * 8 / 1000000) / (microtime(true) - $t))); + $part_num++; + $promises[] = $read_deferred->promise(); } - fclose($f); - $constructor = ['_' => $constructor, 'id' => $file_id, 'parts' => $part_total_num, 'name' => $file_name, 'md5_checksum' => hash_final($ctx), 'mime_type' => mime_content_type($file)]; + + $result = yield $promises; + foreach ($result as $key => $result) { + if (!$result) { + throw new \danog\MadelineProto\Exception('Upload of part '.$key.' failed'); + } + } + + $constructor = ['_' => $constructor, 'id' => $file_id, 'parts' => $part_total_num, 'name' => $file_name, 'mime_type' => $this->get_mime_from_file($file)]; if ($encrypted === true) { $constructor['key_fingerprint'] = $fingerprint; $constructor['key'] = $key; $constructor['iv'] = $iv; - $constructor['md5_checksum'] = ''; } + fclose($f); + return $constructor; } + public function upload($file, $file_name = '', $cb = null, $encrypted = false, $datacenter = null) + { + $t = microtime(true); + $res = $this->wait(call([$this, 'upload_async'], $file, $file_name, $cb, $encrypted, $datacenter)); + $this->logger->logger('Speed: '.((filesize($file) * 8) / (microtime(true) - $t) / 1000000)); + + return $res; + } + public function upload_encrypted($file, $file_name = '', $cb = null) { return $this->upload($file, $file_name, $cb, true); } - public function gen_all_file($media) + public function gen_all_file($media, $regenerate) { $res = [$this->constructors->find_by_predicate($media['_'])['type'] => $media]; switch ($media['_']) { @@ -100,7 +154,7 @@ trait Files throw new \danog\MadelineProto\Exception('No access hash'); } $res['Photo'] = $media['photo']; - $res['InputPhoto'] = ['_' => 'inputPhoto', 'id' => $media['photo']['id'], 'access_hash' => $media['photo']['access_hash']]; + $res['InputPhoto'] = ['_' => 'inputPhoto', 'id' => $media['photo']['id'], 'access_hash' => $media['photo']['access_hash'], 'file_reference' => $this->wait($this->referenceDatabase->getReference(ReferenceDatabase::PHOTO_LOCATION, $media['photo']))]; $res['InputMedia'] = ['_' => 'inputMediaPhoto', 'id' => $res['InputPhoto']]; if (isset($media['ttl_seconds'])) { $res['InputMedia']['ttl_seconds'] = $media['ttl_seconds']; @@ -111,7 +165,7 @@ trait Files throw new \danog\MadelineProto\Exception('No access hash'); } $res['Document'] = $media['document']; - $res['InputDocument'] = ['_' => 'inputDocument', 'id' => $media['document']['id'], 'access_hash' => $media['document']['access_hash']]; + $res['InputDocument'] = ['_' => 'inputDocument', 'id' => $media['document']['id'], 'access_hash' => $media['document']['access_hash'], 'file_reference' => $this->wait($this->referenceDatabase->getReference(ReferenceDatabase::DOCUMENT_LOCATION, $media['document']))]; $res['InputMedia'] = ['_' => 'inputMediaDocument', 'id' => $res['InputDocument']]; if (isset($media['ttl_seconds'])) { $res['InputMedia']['ttl_seconds'] = $media['ttl_seconds']; @@ -121,7 +175,7 @@ trait Files if (!isset($media['access_hash'])) { throw new \danog\MadelineProto\Exception('No access hash'); } - $res['InputDocument'] = ['_' => 'inputDocument', 'id' => $media['id'], 'access_hash' => $media['access_hash']]; + $res['InputDocument'] = ['_' => 'inputDocument', 'id' => $media['id'], 'access_hash' => $media['access_hash'], 'file_reference' => $this->wait($this->referenceDatabase->getReference(ReferenceDatabase::DOCUMENT_LOCATION, $media))]; $res['InputMedia'] = ['_' => 'inputMediaDocument', 'id' => $res['InputDocument']]; $res['MessageMedia'] = ['_' => 'messageMediaDocument', 'document' => $media]; break; @@ -129,8 +183,8 @@ trait Files if (!isset($media['access_hash'])) { throw new \danog\MadelineProto\Exception('No access hash'); } - $res['InputDocument'] = ['_' => 'inputDocument', 'id' => $media['id'], 'access_hash' => $media['access_hash']]; - $res['InputMedia'] = ['_' => 'inputMediaDocument', 'id' => $res['InputDocument']]; + $res['InputPhoto'] = ['_' => 'inputPhoto', 'id' => $media['id'], 'access_hash' => $media['access_hash'], 'file_reference' => $this->wait($this->referenceDatabase->getReference(ReferenceDatabase::PHOTO_LOCATION, $media))]; + $res['InputMedia'] = ['_' => 'inputMediaPhoto', 'id' => $res['InputPhoto']]; $res['MessageMedia'] = ['_' => 'messageMediaPhoto', 'photo' => $media]; break; default: @@ -140,7 +194,7 @@ trait Files return $res; } - public function get_file_info($constructor) + public function get_file_info($constructor, $regenerate = false) { if (is_string($constructor)) { $constructor = $this->unpack_file_id($constructor)['MessageMedia']; @@ -148,13 +202,13 @@ trait Files switch ($constructor['_']) { case 'updateNewMessage': case 'updateNewChannelMessage': - $constructor = $constructor['message']; + $constructor = $constructor['message']; case 'message': - $constructor = $constructor['media']; + $constructor = $constructor['media']; } - return $this->gen_all_file($constructor); + return $this->gen_all_file($constructor, $regenerate); } public function get_download_info($message_media) @@ -167,13 +221,16 @@ trait Files } $res = []; switch ($message_media['_']) { + // Updates case 'updateNewMessage': case 'updateNewChannelMessage': - $message_media = $message_media['message']; + $message_media = $message_media['message']; case 'message': return $this->get_download_info($message_media['media']); case 'updateNewEncryptedMessage': - $message_media = $message_media['message']; + $message_media = $message_media['message']; + + // Secret media case 'encryptedMessage': if ($message_media['decrypted_message']['media']['_'] === 'decryptedMessageMediaExternalDocument') { return $this->get_download_info($message_media['decrypted_message']['media']); @@ -218,13 +275,22 @@ trait Files } } if (!isset($res['ext'])) { - $res['ext'] = $this->get_extension_from_location($res['InputFileLocation'], $this->get_extension_from_mime($res['mime'])); + $res['ext'] = $this->get_extension_from_location($res['InputFileLocation'], $this->get_extension_from_mime(isset($res['mime']) ? $res['mime'] : 'image/jpeg')); + } + if (!isset($res['mime'])) { + $res['mime'] = $this->get_mime_from_extension($res['ext'], 'image/jpeg'); } if (!isset($res['name'])) { $res['name'] = $message_media['file']['access_hash']; } return $res; + // Wallpapers + case 'wallPaper': + $photo = end($message_media['sizes']); + + return array_merge($res, $this->get_download_info($photo)); + // Photos case 'photo': case 'messageMediaPhoto': if ($message_media['_'] == 'photo') { @@ -234,32 +300,45 @@ trait Files $res['MessageMedia'] = $message_media; $photo = end($message_media['photo']['sizes']); } - $res['name'] = $photo['location']['volume_id'].'_'.$photo['location']['local_id']; - $res['InputFileLocation'] = ['_' => 'inputFileLocation', 'volume_id' => $photo['location']['volume_id'], 'local_id' => $photo['location']['local_id'], 'secret' => $photo['location']['secret'], 'dc_id' => $photo['location']['dc_id']]; - $res['ext'] = $this->get_extension_from_location($res['InputFileLocation'], '.jpg'); - $res['mime'] = 'image/jpeg'; - if (isset($photo['location']['size'])) { - $res['size'] = $photo['location']['size']; - } - if (isset($photo['location']['bytes'])) { - $res['size'] = strlen($photo['location']['bytes']); + + return array_merge($res, $this->get_download_info($photo)); + + case 'userProfilePhoto': + case 'chatPhoto': + return array_merge($res, $this->get_download_info($message_media['photo_big'])); + + case 'photoCachedSize': + $res['size'] = strlen($message_media['bytes']); + $res['data'] = $message_media['bytes']; + + if ($message_media['location']['_'] === 'fileLocationUnavailable') { + $res['name'] = $message_media['volume_id'].'_'.$message_media['local_id']; + $res['mime'] = $this->get_mime_from_buffer($res['data']); + $res['ext'] = $this->get_extension_from_mime($res['mime']); + } else { + $res = array_merge($res, $this->get_download_info($message_media['location'])); } return $res; case 'photoSize': - case 'photoCachedSize': - $res['name'] = $message_media['location']['volume_id'].'_'.$message_media['location']['local_id']; - $res['InputFileLocation'] = ['_' => 'inputFileLocation', 'volume_id' => $message_media['location']['volume_id'], 'local_id' => $message_media['location']['local_id'], 'secret' => $message_media['location']['secret'], 'dc_id' => $message_media['location']['dc_id']]; - $res['ext'] = $this->get_extension_from_location($res['InputFileLocation'], '.jpg'); - $res['mime'] = 'image/jpeg'; - if (isset($photo['location']['size'])) { - $res['size'] = $photo['location']['size']; - } - if (isset($photo['location']['bytes'])) { - $res['size'] = strlen($photo['location']['bytes']); + $res = $this->get_download_info($message_media['location']); + if (isset($message_media['size'])) { + $res['size'] = $message_media['size']; } return $res; + + case 'fileLocationUnavailable': + throw new \danog\MadelineProto\Exception('File location unavailable'); + case 'fileLocation': + $res['name'] = $message_media['volume_id'].'_'.$message_media['local_id']; + $res['InputFileLocation'] = ['_' => 'inputFileLocation', 'volume_id' => $message_media['volume_id'], 'local_id' => $message_media['local_id'], 'secret' => $message_media['secret'], 'dc_id' => $message_media['dc_id'], 'file_reference' => $this->wait($this->referenceDatabase->getReference(ReferenceDatabase::PHOTO_LOCATION_LOCATION, $message_media))]; + $res['ext'] = $this->get_extension_from_location($res['InputFileLocation'], '.jpg'); + $res['mime'] = $this->get_mime_from_extension($res['ext'], 'image/jpeg'); + + return $res; + + // Documents case 'decryptedMessageMediaExternalDocument': case 'document': $message_media = ['_' => 'messageMediaDocument', 'ttl_seconds' => 0, 'document' => $message_media]; @@ -286,7 +365,7 @@ trait Files $res['name'] .= ' - '.$audio['performer']; } } - $res['InputFileLocation'] = ['_' => 'inputDocumentFileLocation', 'id' => $message_media['document']['id'], 'access_hash' => $message_media['document']['access_hash'], 'version' => isset($message_media['document']['version']) ? $message_media['document']['version'] : 0, 'dc_id' => $message_media['document']['dc_id']]; + $res['InputFileLocation'] = ['_' => 'inputDocumentFileLocation', 'id' => $message_media['document']['id'], 'access_hash' => $message_media['document']['access_hash'], 'version' => isset($message_media['document']['version']) ? $message_media['document']['version'] : 0, 'dc_id' => $message_media['document']['dc_id'], 'file_reference' => $this->wait($this->referenceDatabase->getReference(ReferenceDatabase::DOCUMENT_LOCATION_LOCATION, $message_media['document']))]; if (!isset($res['ext'])) { $res['ext'] = $this->get_extension_from_location($res['InputFileLocation'], $this->get_extension_from_mime($message_media['document']['mime_type'])); } @@ -330,11 +409,12 @@ trait Files $file = realpath($file); $message_media = $this->get_download_info($message_media); $stream = fopen($file, 'r+b'); + $size = fstat($stream)['size']; $this->logger->logger('Waiting for lock of file to download...'); flock($stream, LOCK_EX); try { - $this->download_to_stream($message_media, $stream, $cb, filesize($file), -1); + $this->download_to_stream($message_media, $stream, $cb, $size, -1); } finally { flock($stream, LOCK_UN); fclose($stream); @@ -372,7 +452,10 @@ trait Files $size = $end - $offset; $part_size = $this->settings['download']['part_size']; $percent = 0; - $datacenter = isset($message_media['InputFileLocation']['dc_id']) ? $message_media['InputFileLocation']['dc_id'] : $this->datacenter->curdc; + $datacenter = isset($message_media['InputFileLocation']['dc_id']) ? $message_media['InputFileLocation']['dc_id'] : $this->settings['connection_settings']['default_dc']; + if (isset($this->datacenter->sockets[$datacenter.'_media'])) { + $datacenter .= '_media'; + } if (isset($message_media['key'])) { $digest = hash('md5', $message_media['key'].$message_media['iv'], true); $fingerprint = $this->unpack_signed_int(substr($digest, 0, 4) ^ substr($digest, 4, 4)); @@ -396,7 +479,16 @@ trait Files $res = $cdn ? $this->method_call('upload.getCdnFile', ['file_token' => $message_media['file_token'], 'offset' => $offset, 'limit' => $part_size], ['heavy' => true, 'file' => true, 'datacenter' => $datacenter]) : $this->method_call('upload.getFile', ['location' => $message_media['InputFileLocation'], 'offset' => $offset, 'limit' => $part_size], ['heavy' => true, 'file' => true, 'datacenter' => &$datacenter]); } catch (\danog\MadelineProto\RPCErrorException $e) { if (strpos($e->rpc, 'FLOOD_WAIT_') === 0) { - //if (isset($message_media['MessageMedia']) && !$this->get_self()['bot']) $this->method_call('messages.sendMedia', ['peer' => '@danogentili', 'media' => $message_media['MessageMedia'], 'message' => 'This is broken'], ['datacenter' => $this->datacenter->curdc]); + if (isset($message_media['MessageMedia']) && !$this->authorization['user']['bot'] && $this->settings['download']['report_broken_media']) { + try { + $this->method_call('messages.sendMedia', ['peer' => 'support', 'media' => $message_media['MessageMedia'], 'message' => "I can't download this file, could you please help?"], ['datacenter' => $this->datacenter->curdc]); + } catch (RPCErrorException $e) { + $this->logger->logger('An error occurred while reporting the broken file: '.$e->rpc, Logger::FATAL_ERROR); + } catch (Exception $e) { + $this->logger->logger('An error occurred while reporting the broken file: '.$e->getMessage(), Logger::FATAL_ERROR); + } + } + throw new \danog\MadelineProto\Exception('The media server where this file is hosted is offline/overloaded, please try again later. Send the media to the telegram devs or to @danogentili to fix this.'); } switch ($e->rpc) { diff --git a/src/danog/MadelineProto/MTProtoTools/MessageHandler.php b/src/danog/MadelineProto/MTProtoTools/MessageHandler.php deleted file mode 100644 index e6d4592b..00000000 --- a/src/danog/MadelineProto/MTProtoTools/MessageHandler.php +++ /dev/null @@ -1,161 +0,0 @@ -. -*/ - -namespace danog\MadelineProto\MTProtoTools; - -/** - * Manages packing and unpacking of messages, and the list of sent and received messages. - */ -trait MessageHandler -{ - public function send_unencrypted_message($type, $message_data, $message_id, $datacenter) - { - $this->logger->logger("Sending $type as unencrypted message to DC $datacenter", \danog\MadelineProto\Logger::ULTRA_VERBOSE); - $message_data = "\0\0\0\0\0\0\0\0".$message_id.$this->pack_unsigned_int(strlen($message_data)).$message_data; - $this->datacenter->sockets[$datacenter]->outgoing_messages[$message_id] = ['response' => -1]; - $this->datacenter->sockets[$datacenter]->send_message($message_data); - } - - public function send_messages($datacenter) - { - //$has_ack = false; - - if (count($this->datacenter->sockets[$datacenter]->object_queue) > 1) { - $messages = []; - $this->logger->logger("Sending msg_container as encrypted message to DC $datacenter", \danog\MadelineProto\Logger::ULTRA_VERBOSE); - - foreach ($this->datacenter->sockets[$datacenter]->object_queue as $message) { - $message['seqno'] = $this->generate_out_seq_no($datacenter, $message['content_related']); - $message['bytes'] = strlen($message['body']); - //$has_ack = $has_ack || $message['_'] === 'msgs_ack'; - $this->logger->logger("Inside of msg_container, sending {$message['_']} as encrypted message to DC $datacenter", \danog\MadelineProto\Logger::ULTRA_VERBOSE); - $message['_'] = 'MTmessage'; - $messages[] = $message; - $this->datacenter->sockets[$datacenter]->outgoing_messages[$message['msg_id']] = ['seq_no' => $message['seqno'], 'response' => -1]; //, 'content' => $this->deserialize($message['body'], ['type' => '', 'datacenter' => $datacenter])]; - } - $message_data = $this->serialize_object(['type' => ''], ['_' => 'msg_container', 'messages' => $messages], 'lol'); - $message_id = $this->generate_message_id($datacenter); - $seq_no = $this->generate_out_seq_no($datacenter, false); - } elseif (count($this->datacenter->sockets[$datacenter]->object_queue)) { - $message = array_shift($this->datacenter->sockets[$datacenter]->object_queue); - $this->logger->logger("Sending {$message['_']} as encrypted message to DC $datacenter", \danog\MadelineProto\Logger::ULTRA_VERBOSE); - $message_data = $message['body']; - $message_id = $message['msg_id']; - $seq_no = $this->generate_out_seq_no($datacenter, $message['content_related']); - } else { - return; - } - $plaintext = $this->datacenter->sockets[$datacenter]->temp_auth_key['server_salt'].$this->datacenter->sockets[$datacenter]->session_id.$message_id.pack('VV', $seq_no, strlen($message_data)).$message_data; - $padding = $this->posmod(-strlen($plaintext), 16); - if ($padding < 12) { - $padding += 16; - } - $padding = $this->random($padding); - $message_key = substr(hash('sha256', substr($this->datacenter->sockets[$datacenter]->temp_auth_key['auth_key'], 88, 32).$plaintext.$padding, true), 8, 16); - list($aes_key, $aes_iv) = $this->aes_calculate($message_key, $this->datacenter->sockets[$datacenter]->temp_auth_key['auth_key']); - $message = $this->datacenter->sockets[$datacenter]->temp_auth_key['id'].$message_key.$this->ige_encrypt($plaintext.$padding, $aes_key, $aes_iv); - $this->datacenter->sockets[$datacenter]->outgoing_messages[$message_id] = ['seq_no' => $seq_no, 'response' => -1]; - $this->datacenter->sockets[$datacenter]->send_message($message); - $this->datacenter->sockets[$datacenter]->object_queue = []; - - /*if ($has_ack) { - foreach ($this->datacenter->sockets[$datacenter]->ack_queue as $msg_id) { - $this->datacenter->sockets[$datacenter]->incoming_messages[$msg_id]['ack'] = true; - } - $this->datacenter->sockets[$datacenter]->ack_queue = []; - }*/ - } - - /** - * Reading connection and receiving message from server. - */ - public function recv_message($datacenter) - { - if ($this->datacenter->sockets[$datacenter]->must_open) { - $this->logger->logger('Trying to read from closed socket, sending initial ping'); - if ($this->is_http($datacenter)) { - $this->method_call('http_wait', ['max_wait' => 500, 'wait_after' => 150, 'max_delay' => 500], ['datacenter' => $datacenter]); - } elseif (isset($this->datacenter->sockets[$datacenter]->temp_auth_key['connection_inited']) && $this->datacenter->sockets[$datacenter]->temp_auth_key['connection_inited']) { - $this->method_call('ping', ['ping_id' => 0], ['datacenter' => $datacenter]); - } else { - throw new \danog\MadelineProto\Exception('Resend query'); - } - } - $payload = $this->datacenter->sockets[$datacenter]->read_message(); - if (strlen($payload) === 4) { - $payload = $this->unpack_signed_int($payload); - $this->logger->logger("Received $payload from DC $datacenter", \danog\MadelineProto\Logger::ULTRA_VERBOSE); - - return $payload; - } - $auth_key_id = substr($payload, 0, 8); - if ($auth_key_id === "\0\0\0\0\0\0\0\0") { - $message_id = substr($payload, 8, 8); - $this->check_message_id($message_id, ['outgoing' => false, 'datacenter' => $datacenter, 'container' => false]); - $message_length = unpack('V', substr($payload, 16, 4))[1]; - $message_data = substr($payload, 20, $message_length); - $this->datacenter->sockets[$datacenter]->incoming_messages[$message_id] = []; - } elseif ($auth_key_id === $this->datacenter->sockets[$datacenter]->temp_auth_key['id']) { - $message_key = substr($payload, 8, 16); - $encrypted_data = substr($payload, 24); - list($aes_key, $aes_iv) = $this->aes_calculate($message_key, $this->datacenter->sockets[$datacenter]->temp_auth_key['auth_key'], false); - $decrypted_data = $this->ige_decrypt($encrypted_data, $aes_key, $aes_iv); - /* - $server_salt = substr($decrypted_data, 0, 8); - if ($server_salt != $this->datacenter->sockets[$datacenter]->temp_auth_key['server_salt']) { - $this->logger->logger('WARNING: Server salt mismatch (my server salt '.$this->datacenter->sockets[$datacenter]->temp_auth_key['server_salt'].' is not equal to server server salt '.$server_salt.').', \danog\MadelineProto\Logger::WARNING); - } - */ - $session_id = substr($decrypted_data, 8, 8); - if ($session_id != $this->datacenter->sockets[$datacenter]->session_id) { - throw new \danog\MadelineProto\Exception('Session id mismatch.'); - } - $message_id = substr($decrypted_data, 16, 8); - $this->check_message_id($message_id, ['outgoing' => false, 'datacenter' => $datacenter, 'container' => false]); - $seq_no = unpack('V', substr($decrypted_data, 24, 4))[1]; - // Dunno how to handle any incorrect sequence numbers - $message_data_length = unpack('V', substr($decrypted_data, 28, 4))[1]; - if ($message_data_length > strlen($decrypted_data)) { - throw new \danog\MadelineProto\SecurityException('message_data_length is too big'); - } - if (strlen($decrypted_data) - 32 - $message_data_length < 12) { - throw new \danog\MadelineProto\SecurityException('padding is too small'); - } - if (strlen($decrypted_data) - 32 - $message_data_length > 1024) { - throw new \danog\MadelineProto\SecurityException('padding is too big'); - } - if ($message_data_length < 0) { - throw new \danog\MadelineProto\SecurityException('message_data_length not positive'); - } - if ($message_data_length % 4 != 0) { - throw new \danog\MadelineProto\SecurityException('message_data_length not divisible by 4'); - } - $message_data = substr($decrypted_data, 32, $message_data_length); - if ($message_key != substr(hash('sha256', substr($this->datacenter->sockets[$datacenter]->temp_auth_key['auth_key'], 96, 32).$decrypted_data, true), 8, 16)) { - throw new \danog\MadelineProto\SecurityException('msg_key mismatch'); - } - $this->datacenter->sockets[$datacenter]->incoming_messages[$message_id] = ['seq_no' => $seq_no]; - } else { - $this->close_and_reopen($datacenter); - - throw new \danog\MadelineProto\Exception('Got unknown auth_key id'); - } - $deserialized = $this->deserialize($message_data, ['type' => '', 'datacenter' => $datacenter]); - $this->datacenter->sockets[$datacenter]->incoming_messages[$message_id]['content'] = $deserialized; - $this->datacenter->sockets[$datacenter]->incoming_messages[$message_id]['response'] = -1; - $this->datacenter->sockets[$datacenter]->new_incoming[$message_id] = $message_id; - $this->datacenter->sockets[$datacenter]->last_recv = time(); - - return true; - } -} diff --git a/src/danog/MadelineProto/MTProtoTools/MsgIdHandler.php b/src/danog/MadelineProto/MTProtoTools/MsgIdHandler.php deleted file mode 100644 index b5b2f59c..00000000 --- a/src/danog/MadelineProto/MTProtoTools/MsgIdHandler.php +++ /dev/null @@ -1,95 +0,0 @@ -. -*/ - -namespace danog\MadelineProto\MTProtoTools; - -/** - * Manages message ids. - */ -trait MsgIdHandler -{ - public function check_message_id($new_message_id, $aargs) - { - if (!is_object($new_message_id)) { - $new_message_id = new \phpseclib\Math\BigInteger(strrev($new_message_id), 256); - } - $min_message_id = (new \phpseclib\Math\BigInteger(time() + $this->datacenter->sockets[$aargs['datacenter']]->time_delta - 300))->bitwise_leftShift(32); - if ($min_message_id->compare($new_message_id) > 0) { - $this->logger->logger('Given message id ('.$new_message_id.') is too old compared to the min value ('.$min_message_id.').', \danog\MadelineProto\Logger::WARNING); - } - $max_message_id = (new \phpseclib\Math\BigInteger(time() + $this->datacenter->sockets[$aargs['datacenter']]->time_delta + 30))->bitwise_leftShift(32); - if ($max_message_id->compare($new_message_id) < 0) { - throw new \danog\MadelineProto\Exception('Given message id ('.$new_message_id.') is too new compared to the max value ('.$max_message_id.'). Consider syncing your date.'); - } - if ($aargs['outgoing']) { - if (!$new_message_id->divide(\danog\MadelineProto\Magic::$four)[1]->equals(\danog\MadelineProto\Magic::$zero)) { - throw new \danog\MadelineProto\Exception('Given message id ('.$new_message_id.') is not divisible by 4. Consider syncing your date.'); - } - if (!\danog\MadelineProto\Magic::$has_thread && $new_message_id->compare($key = $this->get_max_id($aargs['datacenter'], false)) <= 0) { - throw new \danog\MadelineProto\Exception('Given message id ('.$new_message_id.') is lower than or equal to the current limit ('.$key.'). Consider syncing your date.', 1); - } - if (count($this->datacenter->sockets[$aargs['datacenter']]->outgoing_messages) > $this->settings['msg_array_limit']['outgoing']) { - reset($this->datacenter->sockets[$aargs['datacenter']]->outgoing_messages); - $key = key($this->datacenter->sockets[$aargs['datacenter']]->outgoing_messages); - unset($this->datacenter->sockets[$aargs['datacenter']]->outgoing_messages[$key]); - } - $this->datacenter->sockets[$aargs['datacenter']]->max_outgoing_id = $new_message_id; - $this->datacenter->sockets[$aargs['datacenter']]->outgoing_messages[strrev($new_message_id->toBytes())] = []; - } else { - if (!$new_message_id->divide(\danog\MadelineProto\Magic::$four)[1]->equals(\danog\MadelineProto\Magic::$one) && !$new_message_id->divide(\danog\MadelineProto\Magic::$four)[1]->equals(\danog\MadelineProto\Magic::$three)) { - throw new \danog\MadelineProto\Exception('message id mod 4 != 1 or 3'); - } - $key = $this->get_max_id($aargs['datacenter'], true); - if ($aargs['container']) { - if ($new_message_id->compare($key = $this->get_max_id($aargs['datacenter'], true)) >= 0) { - $this->logger->logger('WARNING: Given message id ('.$new_message_id.') is bigger than or equal to the current limit ('.$key.'). Consider syncing your date.', \danog\MadelineProto\Logger::WARNING); - } - } else { - if ($new_message_id->compare($key = $this->get_max_id($aargs['datacenter'], true)) <= 0) { - $this->logger->logger('WARNING: Given message id ('.$new_message_id.') is lower than or equal to the current limit ('.$key.'). Consider syncing your date.', \danog\MadelineProto\Logger::WARNING); - } - } - if (count($this->datacenter->sockets[$aargs['datacenter']]->incoming_messages) > $this->settings['msg_array_limit']['incoming']) { - reset($this->datacenter->sockets[$aargs['datacenter']]->incoming_messages); - $key = key($this->datacenter->sockets[$aargs['datacenter']]->incoming_messages); - if ($key[0] === "\0") { - $key = $key; - } - unset($this->datacenter->sockets[$aargs['datacenter']]->incoming_messages[$key]); - } - $this->datacenter->sockets[$aargs['datacenter']]->max_incoming_id = $new_message_id; - $this->datacenter->sockets[$aargs['datacenter']]->incoming_messages[strrev($new_message_id->toBytes())] = []; - } - } - - public function generate_message_id($datacenter) - { - $message_id = (new \phpseclib\Math\BigInteger(time() + $this->datacenter->sockets[$datacenter]->time_delta))->bitwise_leftShift(32); - if ($message_id->compare($key = $this->get_max_id($datacenter, false)) <= 0) { - $message_id = $key->add(\danog\MadelineProto\Magic::$four); - } - $this->check_message_id($message_id, ['outgoing' => true, 'datacenter' => $datacenter, 'container' => false]); - - return strrev($message_id->toBytes()); - } - - public function get_max_id($datacenter, $incoming) - { - $incoming = $incoming ? 'incoming' : 'outgoing'; - if (isset($this->datacenter->sockets[$datacenter]->{'max_'.$incoming.'_id'}) && is_object($this->datacenter->sockets[$datacenter]->{'max_'.$incoming.'_id'})) { - return $this->datacenter->sockets[$datacenter]->{'max_'.$incoming.'_id'}; - } - - return \danog\MadelineProto\Magic::$zero; - } -} diff --git a/src/danog/MadelineProto/MTProtoTools/PasswordCalculator.php b/src/danog/MadelineProto/MTProtoTools/PasswordCalculator.php new file mode 100644 index 00000000..923ff224 --- /dev/null +++ b/src/danog/MadelineProto/MTProtoTools/PasswordCalculator.php @@ -0,0 +1,202 @@ +. + * + * @author Daniil Gentili + * @copyright 2016-2018 Daniil Gentili + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ + +namespace danog\MadelineProto\MTProtoTools; + +use danog\MadelineProto\Exception; +use danog\MadelineProto\Magic; +use danog\MadelineProto\SecurityException; +use danog\MadelineProto\Tools; +use phpseclib\Math\BigInteger; + +/** + * Manages password calculation. + */ +class PasswordCalculator +{ + use AuthKeyHandler; + use Tools; + private $new_algo; + private $secure_random = ''; + + private $current_algo; + private $srp_B; + private $srp_BForHash; + private $srp_id; + + public function __construct($logger) + { + $this->logger = $logger; + } + + public function addInfo(array $object) + { + if ($object['_'] !== 'account.password') { + throw new Exception('Wrong constructor'); + } + if ($object['has_secure_values']) { + throw new Exception('Cannot parse secure values'); + } + if ($object['has_password']) { + switch ($object['current_algo']['_']) { + case 'passwordKdfAlgoUnknown': + throw new Exception('Update your client to continue'); + case 'passwordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow': + $object['current_algo']['g'] = new BigInteger($object['current_algo']['g']); + $object['current_algo']['p'] = new BigInteger((string) $object['current_algo']['p'], 256); + $this->check_p_g($object['current_algo']['p'], $object['current_algo']['g']); + $object['current_algo']['gForHash'] = str_pad($object['current_algo']['g']->toBytes(), 256, chr(0), \STR_PAD_LEFT); + $object['current_algo']['pForHash'] = str_pad($object['current_algo']['p']->toBytes(), 256, chr(0), \STR_PAD_LEFT); + + break; + default: + throw new Exception("Unknown KDF algo {$object['current_algo']['_']}"); + } + $this->current_algo = $object['current_algo']; + $object['srp_B'] = new BigInteger((string) $object['srp_B'], 256); + if ($object['srp_B']->compare(\danog\MadelineProto\Magic::$zero) < 0) { + throw new SecurityException('srp_B < 0'); + } + if ($object['srp_B']->compare($object['current_algo']['p']) > 0) { + throw new SecurityException('srp_B > p'); + } + $this->srp_B = $object['srp_B']; + $this->srp_BForHash = str_pad($object['srp_B']->toBytes(), 256, chr(0), \STR_PAD_LEFT); + $this->srp_id = $object['srp_id']; + } else { + $this->current_algo = null; + $this->srp_B = null; + $this->srp_BForHash = null; + $this->srp_id = null; + } + switch ($object['new_algo']['_']) { + case 'passwordKdfAlgoUnknown': + throw new Exception('Update your client to continue'); + case 'passwordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow': + $object['new_algo']['g'] = new BigInteger($object['new_algo']['g']); + $object['new_algo']['p'] = new BigInteger((string) $object['new_algo']['p'], 256); + $this->check_p_g($object['new_algo']['p'], $object['new_algo']['g']); + $object['new_algo']['gForHash'] = str_pad($object['new_algo']['g']->toBytes(), 256, chr(0), \STR_PAD_LEFT); + $object['new_algo']['pForHash'] = str_pad($object['new_algo']['p']->toBytes(), 256, chr(0), \STR_PAD_LEFT); + + break; + default: + throw new Exception("Unknown KDF algo {$object['new_algo']['_']}"); + } + $this->new_algo = $object['new_algo']; + $this->secure_random = $object['secure_random']; + } + + public function createSalt(string $prefix = ''): string + { + return $prefix.$this->random(32); + } + + public function hashSha256(string $data, string $salt): string + { + return hash('sha256', $salt.$data.$salt, true); + } + + public function hashPassword(string $password, string $client_salt, string $server_salt): string + { + $buf = $this->hashSha256($password, $client_salt); + $buf = $this->hashSha256($buf, $server_salt); + $hash = hash_pbkdf2('sha512', $buf, $client_salt, 100000, 0, true); + + return $this->hashSha256($hash, $server_salt); + } + + public function getCheckPassword(string $password): array + { + if ($password === '') { + return ['_' => 'inputCheckPasswordEmpty']; + } + $client_salt = $this->current_algo['salt1']; + $server_salt = $this->current_algo['salt2']; + $g = $this->current_algo['g']; + $gForHash = $this->current_algo['gForHash']; + $p = $this->current_algo['p']; + $pForHash = $this->current_algo['pForHash']; + $B = $this->srp_B; + $BForHash = $this->srp_BForHash; + $id = $this->srp_id; + + $x = new BigInteger($this->hashPassword($password, $client_salt, $server_salt), 256); + $g_x = $g->powMod($x, $p); + + $k = new BigInteger(hash('sha256', $pForHash.$gForHash, true), 256); + $kg_x = $k->multiply($g_x)->powMod(Magic::$one, $p); + + $a = new BigInteger($this->random(2048 / 8), 256); + $A = $g->powMod($a, $p); + $this->check_G($A, $p); + $AForHash = str_pad($A->toBytes(), 256, chr(0), \STR_PAD_LEFT); + + $b_kg_x = $B->powMod(Magic::$one, $p)->subtract($kg_x); + + $u = new BigInteger(hash('sha256', $AForHash.$BForHash, true), 256); + $ux = $u->multiply($x); + $a_ux = $a->add($ux); + + $S = $b_kg_x->powMod($a_ux, $p); + + $SForHash = str_pad($S->toBytes(), 256, chr(0), \STR_PAD_LEFT); + $K = hash('sha256', $SForHash, true); + + $h1 = hash('sha256', $pForHash, true); + $h2 = hash('sha256', $gForHash, true); + $h1 ^= $h2; + + $M1 = hash('sha256', $h1.hash('sha256', $client_salt, true).hash('sha256', $server_salt, true).$AForHash.$BForHash.$K, true); + + return ['_' => 'inputCheckPasswordSRP', 'srp_id' => $id, 'A' => $AForHash, 'M1' => $M1]; + } + + public function getPassword(array $params): array + { + $return = ['password' => $this->getCheckPassword(isset($params['password']) ? $params['password'] : ''), 'new_settings' => ['_' => 'account.passwordInputSettings', 'new_algo' => ['_' => 'passwordKdfAlgoUnknown'], 'new_password_hash' => '', 'hint' => '']]; + $new_settings = &$return['new_settings']; + + if (isset($params['new_password']) && $params['new_password'] !== '') { + $client_salt = $this->createSalt($this->new_algo['salt1']); + $server_salt = $this->new_algo['salt2']; + $g = $this->new_algo['g']; + $p = $this->new_algo['p']; + $pForHash = $this->new_algo['pForHash']; + + $x = new BigInteger($this->hashPassword($params['new_password'], $client_salt, $server_salt), 256); + $v = $g->powMod($x, $p); + $vForHash = str_pad($v->toBytes(), 256, chr(0), \STR_PAD_LEFT); + + $new_settings['new_algo'] = [ + '_' => 'passwordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow', + 'salt1' => $client_salt, + 'salt2' => $server_salt, + 'g' => (int) $g->toString(), + 'p' => $pForHash, + ]; + $new_settings['new_password_hash'] = $vForHash; + $new_settings['hint'] = $params['hint']; + if (isset($params['email'])) { + $new_settings['email'] = $params['email']; + } + } + + return $return; + } +} diff --git a/src/danog/MadelineProto/MTProtoTools/PeerHandler.php b/src/danog/MadelineProto/MTProtoTools/PeerHandler.php index 98fed9e2..ccc2cac4 100644 --- a/src/danog/MadelineProto/MTProtoTools/PeerHandler.php +++ b/src/danog/MadelineProto/MTProtoTools/PeerHandler.php @@ -1,18 +1,26 @@ . +/** + * PeerHandler module. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see . + * + * @author Daniil Gentili + * @copyright 2016-2018 Daniil Gentili + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation */ namespace danog\MadelineProto\MTProtoTools; +use Amp\Loop; + /** * Manages peers. */ @@ -23,6 +31,11 @@ trait PeerHandler return -($id + pow(10, (int) floor(log($id, 10) + 3))); } + public function from_supergroup($id) + { + return -$id - pow(10, (int) floor(log(-$id, 10))); + } + public function is_supergroup($id) { $log = log(-$id, 10); @@ -55,116 +68,99 @@ trait PeerHandler } } + public function add_support($support) + { + $this->supportUser = $support['user']['id']; + } + public function add_users($users) { - foreach ($users as $key => $user) { - if (!isset($user['access_hash'])) { - if (isset($user['username']) && !isset($this->chats[$user['id']])) { - if ($this->postpone_pwrchat) { - $this->pending_pwrchat[$user['username']] = [false, true]; - } else { - try { - $this->get_pwr_chat($user['username'], false, true); - } catch (\danog\MadelineProto\Exception $e) { - $this->logger->logger($e->getMessage(), \danog\MadelineProto\Logger::WARNING); - } catch (\danog\MadelineProto\RPCErrorException $e) { - $this->logger->logger($e->getMessage(), \danog\MadelineProto\Logger::WARNING); - } - } - } - continue; - } - switch ($user['_']) { - case 'user': - if (!isset($this->chats[$user['id']]) || $this->chats[$user['id']] !== $user) { - $this->chats[$user['id']] = $user; + foreach ($users as $user) { + $this->add_user($user); + } + } - if ($this->postpone_pwrchat) { - $this->pending_pwrchat[$user['id']] = [false, true]; - } else { - try { - $this->get_pwr_chat($user['id'], false, true); - } catch (\danog\MadelineProto\Exception $e) { - $this->logger->logger($e->getMessage(), \danog\MadelineProto\Logger::WARNING); - } catch (\danog\MadelineProto\RPCErrorException $e) { - $this->logger->logger($e->getMessage(), \danog\MadelineProto\Logger::WARNING); - } - } - } - case 'userEmpty': - break; - default: - throw new \danog\MadelineProto\Exception('Invalid user provided at key '.$key.': '.var_export($user, true)); - break; + public function add_user($user) + { + if (!isset($user['access_hash'])) { + if (isset($user['username']) && !isset($this->chats[$user['id']])) { + $this->cache_pwr_chat($user['username'], false, true); } + + return; + } + switch ($user['_']) { + case 'user': + if (!isset($this->chats[$user['id']]) || $this->chats[$user['id']] !== $user) { + $this->chats[$user['id']] = $user; + $this->cache_pwr_chat($user['id'], false, true); + } + case 'userEmpty': + break; + default: + throw new \danog\MadelineProto\Exception('Invalid user provided', $user); + break; } } public function add_chats($chats) { - foreach ($chats as $key => $chat) { - switch ($chat['_']) { - case 'chat': - case 'chatEmpty': - case 'chatForbidden': - if (!isset($this->chats[-$chat['id']]) || $this->chats[-$chat['id']] !== $chat) { - $this->chats[-$chat['id']] = $chat; + foreach ($chats as $chat) { + $this->add_chat($chat); + } + } - if ($this->postpone_pwrchat) { - $this->pending_pwrchat[-$chat['id']] = [$this->settings['peer']['full_fetch'], true]; - } else { - try { - $this->get_pwr_chat(-$chat['id'], $this->settings['peer']['full_fetch'], true); - } catch (\danog\MadelineProto\Exception $e) { - $this->logger->logger($e->getMessage(), \danog\MadelineProto\Logger::WARNING); - } catch (\danog\MadelineProto\RPCErrorException $e) { - $this->logger->logger($e->getMessage(), \danog\MadelineProto\Logger::WARNING); - } - } + public function add_chat($chat) + { + switch ($chat['_']) { + case 'chat': + case 'chatEmpty': + case 'chatForbidden': + if (!isset($this->chats[-$chat['id']]) || $this->chats[-$chat['id']] !== $chat) { + $this->chats[-$chat['id']] = $chat; + $this->cache_pwr_chat(-$chat['id'], $this->settings['peer']['full_fetch'], true); + } + break; + case 'channelEmpty': + break; + case 'channel': + case 'channelForbidden': + $bot_api_id = $this->to_supergroup($chat['id']); + if (!isset($chat['access_hash'])) { + if (isset($chat['username']) && !isset($this->chats[$bot_api_id])) { + $this->cache_pwr_chat($chat['username'], $this->settings['peer']['full_fetch'], true); } - case 'channelEmpty': - break; - case 'channel': - case 'channelForbidden': - $bot_api_id = $this->to_supergroup($chat['id']); - if (!isset($chat['access_hash'])) { - if (isset($chat['username']) && !isset($this->chats[$bot_api_id])) { - if ($this->postpone_pwrchat) { - $this->pending_pwrchat[$chat['username']] = [$this->settings['peer']['full_fetch'], true]; - } else { - try { - $this->get_pwr_chat($chat['username'], $this->settings['peer']['full_fetch'], true); - } catch (\danog\MadelineProto\Exception $e) { - $this->logger->logger($e->getMessage(), \danog\MadelineProto\Logger::WARNING); - } catch (\danog\MadelineProto\RPCErrorException $e) { - $this->logger->logger($e->getMessage(), \danog\MadelineProto\Logger::WARNING); - } - } - } - continue; - } - if (!isset($this->chats[$bot_api_id]) || $this->chats[$bot_api_id] !== $chat) { - $this->chats[$bot_api_id] = $chat; - try { - if ($this->settings['peer']['full_fetch'] && (!isset($this->full_chats[$bot_api_id]) || $this->full_chats[$bot_api_id]['full']['participants_count'] !== $this->get_full_info($bot_api_id)['full']['participants_count'])) { - if ($this->postpone_pwrchat) { - $this->pending_pwrchat[$this->to_supergroup($chat['id'])] = [$this->settings['peer']['full_fetch'], true]; - } else { - $this->get_pwr_chat($this->to_supergroup($chat['id']), $this->settings['peer']['full_fetch'], true); - } - } - } catch (\danog\MadelineProto\Exception $e) { - $this->logger->logger($e->getMessage(), \danog\MadelineProto\Logger::WARNING); - } catch (\danog\MadelineProto\RPCErrorException $e) { - $this->logger->logger($e->getMessage(), \danog\MadelineProto\Logger::WARNING); - } + return; + } + if (!isset($this->chats[$bot_api_id]) || $this->chats[$bot_api_id] !== $chat) { + $this->chats[$bot_api_id] = $chat; + + if ($this->settings['peer']['full_fetch'] && (!isset($this->full_chats[$bot_api_id]) || $this->full_chats[$bot_api_id]['full']['participants_count'] !== $this->get_full_info($bot_api_id)['full']['participants_count'])) { + $this->cache_pwr_chat($bot_api_id, $this->settings['peer']['full_fetch'], true); } - break; - default: - throw new \danog\MadelineProto\Exception('Invalid chat provided at key '.$key.': '.var_export($chat, true)); - break; - } + } + break; + default: + throw new \danog\MadelineProto\Exception('Invalid chat provided at key '.$key.': '.var_export($chat, true)); + break; + } + } + + public function cache_pwr_chat($id, $full_fetch, $send) + { + if ($this->postpone_pwrchat) { + $this->pending_pwrchat[$id] = [$full_fetch, $send]; + } else { + Loop::defer(function () use ($id, $full_fetch, $send) { + try { + $this->get_pwr_chat($id, $full_fetch, $send); + } catch (\danog\MadelineProto\Exception $e) { + $this->logger->logger($e->getMessage(), \danog\MadelineProto\Logger::WARNING); + } catch (\danog\MadelineProto\RPCErrorException $e) { + $this->logger->logger($e->getMessage(), \danog\MadelineProto\Logger::WARNING); + } + }); } } @@ -355,8 +351,22 @@ trait PeerHandler if (is_string($id)) { $id = \danog\MadelineProto\Magic::$bigint ? (float) $id : (int) $id; } - if (!isset($this->chats[$id]) && $id < 0 && !$this->is_supergroup($id)) { - $this->method_call('messages.getFullChat', ['chat_id' => -$id], ['datacenter' => $this->datacenter->curdc]); + if (!isset($this->chats[$id])) { + try { + if ($id < 0) { + if ($this->is_supergroup($id)) { + $this->method_call('channels.getChannels', ['id' => [['access_hash' => 0, 'channel_id' => $this->from_supergroup($id), '_' => 'inputChannel']]], ['datacenter' => $this->datacenter->curdc]); + } else { + $this->method_call('messages.getFullChat', ['chat_id' => -$id], ['datacenter' => $this->datacenter->curdc]); + } + } else { + $this->method_call('users.getUsers', ['id' => [['access_hash' => 0, 'user_id' => $id, '_' => 'inputUser']]], ['datacenter' => $this->datacenter->curdc]); + } + } catch (\danog\MadelineProto\Exception $e) { + $this->logger->logger($e->getMessage(), \danog\MadelineProto\Logger::WARNING); + } catch (\danog\MadelineProto\RPCErrorException $e) { + $this->logger->logger($e->getMessage(), \danog\MadelineProto\Logger::WARNING); + } } if (isset($this->chats[$id])) { try { @@ -396,6 +406,13 @@ trait PeerHandler if ($id === 'me') { return $this->get_info($this->authorization['user']['id']); } + if ($id === 'support') { + if (!$this->supportUser) { + $this->method_call('help.getSupport', [], ['datacenter' => $this->settings['connection_settings']['default_dc']]); + } + + return $this->get_info($this->supportUser); + } foreach ($this->chats as $chat) { if (isset($chat['username']) && strtolower($chat['username']) === $id) { return $this->gen_all($chat); @@ -462,10 +479,8 @@ trait PeerHandler break; case 'channelForbidden': throw new \danog\MadelineProto\RPCErrorException('CHAT_FORBIDDEN'); - break; default: throw new \danog\MadelineProto\Exception('Invalid constructor given '.var_export($constructor, true)); - break; } return $res; @@ -518,23 +533,13 @@ trait PeerHandler $res[$key] = $full['User'][$key]; } } - if (isset($full['full']['about'])) { - $res['about'] = $full['full']['about']; - } - if (isset($full['full']['bot_info'])) { - $res['bot_info'] = $full['full']['bot_info']; - } - if (isset($full['full']['phone_calls_available'])) { - $res['phone_calls_available'] = $full['full']['phone_calls_available']; - } - if (isset($full['full']['phone_calls_private'])) { - $res['phone_calls_private'] = $full['full']['phone_calls_private']; - } - if (isset($full['full']['common_chats_count'])) { - $res['common_chats_count'] = $full['full']['common_chats_count']; + foreach (['about', 'bot_info', 'phone_calls_available', 'phone_calls_private', 'common_chats_count', 'can_pin_message', 'pinned_msg_id', 'notify_settings'] as $key) { + if (isset($full['full'][$key])) { + $res[$key] = $full['full'][$key]; + } } if (isset($full['full']['profile_photo']['sizes'])) { - $res['photo'] = $this->photosize_to_botapi(end($full['full']['profile_photo']['sizes']), []); + $res['photo'] = $this->photosize_to_botapi(end($full['full']['profile_photo']['sizes']), $full['full']['profile_photo']); } /*$bio = ''; if ($full['type'] === 'user' && isset($res['username']) && !isset($res['about']) && $fullfetch) { @@ -554,11 +559,16 @@ trait PeerHandler $res[$key] = $full['Chat'][$key]; } } + foreach (['bot_info', 'pinned_msg_id', 'notify_settings'] as $key) { + if (isset($full['full'][$key])) { + $res[$key] = $full['full'][$key]; + } + } if (isset($res['admins_enabled'])) { - $res['all_members_are_administrators'] = $res['admins_enabled']; + $res['all_members_are_administrators'] = !$res['admins_enabled']; } if (isset($full['full']['chat_photo']['sizes'])) { - $res['photo'] = $this->photosize_to_botapi(end($full['full']['chat_photo']['sizes']), []); + $res['photo'] = $this->photosize_to_botapi(end($full['full']['chat_photo']['sizes']), $full['full']['chat_photo']); } if (isset($full['full']['exported_invite']['link'])) { $res['invite'] = $full['full']['exported_invite']['link']; @@ -574,13 +584,13 @@ trait PeerHandler $res[$key] = $full['Chat'][$key]; } } - foreach (['can_set_stickers', 'stickerset', 'can_view_participants', 'can_set_username', 'participants_count', 'admins_count', 'kicked_count', 'banned_count', 'migrated_from_chat_id', 'migrated_from_max_id', 'pinned_msg_id', 'about', 'hidden_prehistory', 'available_min_id'] as $key) { + foreach (['read_inbox_max_id', 'read_outbox_max_id', 'hidden_prehistory', 'bot_info', 'notify_settings', 'can_set_stickers', 'stickerset', 'can_view_participants', 'can_set_username', 'participants_count', 'admins_count', 'kicked_count', 'banned_count', 'migrated_from_chat_id', 'migrated_from_max_id', 'pinned_msg_id', 'about', 'hidden_prehistory', 'available_min_id', 'can_view_stats', 'online_count'] as $key) { if (isset($full['full'][$key])) { $res[$key] = $full['full'][$key]; } } if (isset($full['full']['chat_photo']['sizes'])) { - $res['photo'] = $this->photosize_to_botapi(end($full['full']['chat_photo']['sizes']), []); + $res['photo'] = $this->photosize_to_botapi(end($full['full']['chat_photo']['sizes']), $full['full']['chat_photo']); } if (isset($full['full']['exported_invite']['link'])) { $res['invite'] = $full['full']['exported_invite']['link']; @@ -632,7 +642,7 @@ trait PeerHandler $res['participants'][$key] = $newres; } } - if (!isset($res['participants']) && isset($res['can_view_participants']) && $res['can_view_participants'] && $fullfetch) { + if (!isset($res['participants']) && $fullfetch && in_array($res['type'], ['supergroup', 'channel'])) { $total_count = (isset($res['participants_count']) ? $res['participants_count'] : 0) + (isset($res['admins_count']) ? $res['admins_count'] : 0) + (isset($res['kicked_count']) ? $res['kicked_count'] : 0) + (isset($res['banned_count']) ? $res['banned_count'] : 0); $res['participants'] = []; $limit = 200; diff --git a/src/danog/MadelineProto/MTProtoTools/ReferenceDatabase.php b/src/danog/MadelineProto/MTProtoTools/ReferenceDatabase.php new file mode 100644 index 00000000..34fcfc85 --- /dev/null +++ b/src/danog/MadelineProto/MTProtoTools/ReferenceDatabase.php @@ -0,0 +1,593 @@ +. + * + * @author Daniil Gentili + * @copyright 2016-2018 Daniil Gentili + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ + +namespace danog\MadelineProto\MTProtoTools; + +use Amp\Deferred; +use Amp\Promise; +use Amp\Success; +use danog\MadelineProto\Exception; +use danog\MadelineProto\TL\TLCallback; +use danog\MadelineProto\Tools; +use function Amp\call; + +/** + * Manages upload and download of files. + */ +class ReferenceDatabase implements TLCallback +{ + use Tools; + // Reference from a document + const DOCUMENT_LOCATION = 0; + // Reference from a photo + const PHOTO_LOCATION = 1; + // Reference from a location (can only be photo location) + const PHOTO_LOCATION_LOCATION = 2; + // Reference from a location (can only be document location) + const DOCUMENT_LOCATION_LOCATION = 0; + + // Peer + photo ID + const USER_PHOTO_ORIGIN = 0; + // Peer (default photo ID) + const PEER_PHOTO_ORIGIN = 1; + // set ID + const STICKER_SET_ID_ORIGIN = 2; + // Peer + msg ID + const MESSAGE_ORIGIN = 3; + // + const SAVED_GIFS_ORIGIN = 4; + // + const STICKER_SET_RECENT_ORIGIN = 5; + // + const STICKER_SET_FAVED_ORIGIN = 6; + // emoticon + const STICKER_SET_EMOTICON_ORIGIN = 8; + // + const WALLPAPER_ORIGIN = 9; + + const LOCATION_CONTEXT = [ + 'inputFileLocation' => self::PHOTO_LOCATION_LOCATION, + 'inputDocumentFileLocation' => self::DOCUMENT_LOCATION_LOCATION, + 'inputPhoto' => self::PHOTO_LOCATION, + 'inputDocument' => self::DOCUMENT_LOCATION, + ]; + const METHOD_CONTEXT = [ + 'photos.updateProfilePhoto' => self::USER_PHOTO_ORIGIN, + 'photos.getUserPhotos' => self::USER_PHOTO_ORIGIN, + 'photos.uploadProfilePhoto' => self::USER_PHOTO_ORIGIN, + 'messages.getStickers' => self::STICKER_SET_EMOTICON_ORIGIN, + ]; + const CONSTRUCTOR_CONTEXT = [ + 'message' => self::MESSAGE_ORIGIN, + 'messageService' => self::MESSAGE_ORIGIN, + + 'chatFull' => self::PEER_PHOTO_ORIGIN, + 'channelFull' => self::PEER_PHOTO_ORIGIN, + 'chat' => self::PEER_PHOTO_ORIGIN, + 'channel' => self::PEER_PHOTO_ORIGIN, + + 'updateUserPhoto' => self::USER_PHOTO_ORIGIN, + 'user' => self::USER_PHOTO_ORIGIN, + 'userFull' => self::USER_PHOTO_ORIGIN, + + 'message' => self::MESSAGE_ORIGIN, + 'messageService' => self::MESSAGE_ORIGIN, + + 'wallPaper' => self::WALLPAPER_ORIGIN, + + 'messages.savedGifs' => self::SAVED_GIFS_ORIGIN, + + 'messages.recentStickers' => self::STICKER_SET_RECENT_ORIGIN, + 'messages.favedStickers' => self::STICKER_SET_FAVED_ORIGIN, + 'messages.stickerSet' => self::STICKER_SET_ID_ORIGIN, + 'document' => self::STICKER_SET_ID_ORIGIN, + ]; + /** + * References indexed by location. + * + * @var array + */ + private $db = []; + private $cache = []; + private $cacheContexts = []; + private $refreshed = []; + private $API; + private $refresh = false; + private $refreshCount = 0; + + public function __construct($API) + { + $this->API = $API; + $this->init(); + } + + public function __wakeup() + { + $this->init(); + } + + public function __sleep() + { + return ['db', 'API']; + } + + public function init() + { + } + + public function getMethodCallbacks(): array + { + return array_fill_keys(array_keys(self::METHOD_CONTEXT), [[$this, 'addOriginMethod']]); + } + + public function getMethodBeforeCallbacks(): array + { + return array_fill_keys(array_keys(self::METHOD_CONTEXT), [[$this, 'addOriginMethodContext']]); + } + + public function getConstructorCallbacks(): array + { + return array_merge( + array_fill_keys(['document', 'photo', 'fileLocation'], [[$this, 'addReference']]), + array_fill_keys(array_keys(self::CONSTRUCTOR_CONTEXT), [[$this, 'addOrigin']]), + ['document' => [[$this, 'addReference'], [$this, 'addOrigin']]] + ); + } + + public function getConstructorBeforeCallbacks(): array + { + return array_fill_keys(array_keys(self::CONSTRUCTOR_CONTEXT), [[$this, 'addOriginContext']]); + } + + public function getConstructorSerializeCallbacks(): array + { + return array_fill_keys(array_keys(self::LOCATION_CONTEXT), [$this, 'populateReferenceSync']); + } + + public function getTypeMismatchCallbacks(): array + { + return []; + } + + public function reset() + { + if ($this->cacheContexts) { + $this->API->logger->logger('Found '.count($this->cacheContexts).' pending contexts', \danog\MadelineProto\Logger::ERROR); + $this->cacheContexts = []; + } + if ($this->cache) { + $this->API->logger->logger('Found pending locations', \danog\MadelineProto\Logger::ERROR); + $this->cache = []; + } + } + + public function addReference(array $location) + { + if (!$this->cacheContexts) { + $this->API->logger->logger('Trying to add reference out of context, report the following message to @danogentili!', \danog\MadelineProto\Logger::ERROR); + $frames = []; + $previous = ''; + foreach (debug_backtrace(0) as $k => $frame) { + if (isset($frame['function']) && $frame['function'] === 'deserialize') { + if (isset($frame['args'][1]['subtype'])) { + if ($frame['args'][1]['subtype'] === $previous) { + continue; + } + + $frames[] = $frame['args'][1]['subtype']; + $previous = $frame['args'][1]['subtype']; + } elseif (isset($frame['args'][1]['type'])) { + if ($frame['args'][1]['type'] === '') { + break; + } + + if ($frame['args'][1]['type'] === $previous) { + continue; + } + + $frames[] = $frame['args'][1]['type']; + $previous = $frame['args'][1]['type']; + } + } + } + $frames = array_reverse($frames); + $tl_trace = array_shift($frames); + foreach ($frames as $frame) { + $tl_trace .= "['".$frame."']"; + } + $this->API->logger->logger($tl_trace, \danog\MadelineProto\Logger::ERROR); + + return false; + } + $key = count($this->cacheContexts) - 1; + switch ($location['_']) { + case 'document': + $locationType = self::DOCUMENT_LOCATION; + break; + case 'photo': + $locationType = self::PHOTO_LOCATION; + break; + case 'fileLocation': + $locationType = self::PHOTO_LOCATION_LOCATION; + break; + default: + throw new Exception('Unknown location type provided: '.$location['_']); + } + $this->API->logger->logger("Caching reference from location of type $locationType from {$location['_']}", \danog\MadelineProto\Logger::ULTRA_VERBOSE); + if (!isset($this->cache[$key])) { + $this->cache[$key] = []; + } + $this->cache[$key][$this->serializeLocation($locationType, $location)] = (string) $location['file_reference']; + + return true; + } + + public function addOriginContext(string $type) + { + if (!isset(self::CONSTRUCTOR_CONTEXT[$type])) { + throw new \danog\MadelineProto\Exception("Unknown origin type provided: $type"); + } + $originContext = self::CONSTRUCTOR_CONTEXT[$type]; + $this->API->logger->logger("Adding origin context $originContext for {$type}!", \danog\MadelineProto\Logger::ULTRA_VERBOSE); + $this->cacheContexts[] = $originContext; + } + + public function addOrigin(array $data = []) + { + $key = count($this->cacheContexts) - 1; + if ($key === -1) { + throw new \danog\MadelineProto\Exception('Trying to add origin with no origin context set'); + } + $originType = array_pop($this->cacheContexts); + if (!isset($this->cache[$key])) { + $this->API->logger->logger("Removing origin context $originType for {$data['_']}, nothing in the reference cache!", \danog\MadelineProto\Logger::ULTRA_VERBOSE); + + return; + } + $cache = $this->cache[$key]; + unset($this->cache[$key]); + $origin = []; + switch ($data['_']) { + case 'message': + case 'messageService': + $origin['peer'] = $data; + $origin['msg_id'] = $data['id']; + break; + case 'messages.savedGifs': + case 'messages.recentStickers': + case 'messages.favedStickers': + case 'wallPaper': + break; + case 'user': + $origin['max_id'] = $data['photo']['photo_id']; + $origin['offset'] = -1; + $origin['limit'] = 1; + $origin['user_id'] = $data['id']; + break; + case 'updateUserPhoto': + $origin['max_id'] = $data['photo']['photo_id']; + $origin['offset'] = -1; + $origin['limit'] = 1; + $origin['user_id'] = $data['user_id']; + break; + case 'userFull': + $origin['max_id'] = $data['profile_photo']['id']; + $origin['offset'] = -1; + $origin['limit'] = 1; + $origin['user_id'] = $data['user']['id']; + break; + case 'chatFull': + case 'chat': + $origin['peer'] = -$data['id']; + break; + case 'channelFull': + case 'channel': + $origin['peer'] = $this->API->to_supergroup($data['id']); + break; + case 'document': + foreach ($data['attributes'] as $attribute) { + if ($attribute['_'] === 'documentAttributeSticker' && $attribute['stickerset']['_'] !== 'inputStickerSetEmpty') { + $origin['stickerset'] = $attribute['stickerset']; + } + } + if (!isset($origin['stickerset'])) { + $key = count($this->cacheContexts) - 1; + if (!isset($this->cache[$key])) { + $this->cache[$key] = []; + } + + foreach ($cache as $location => $reference) { + $this->cache[$key][$location] = $reference; + } + $this->API->logger->logger("Skipped origin $originType ({$data['_']}) for ".count($cache).' references', \danog\MadelineProto\Logger::ULTRA_VERBOSE); + + return; + } + break; + case 'messages.stickerSet': + $origin['stickerset'] = ['_' => 'inputStickerSetID', 'id' => $data['set']['id'], 'access_hash' => $data['set']['access_hash']]; + break; + default: + throw new \danog\MadelineProto\Exception("Unknown origin type provided: {$data['_']}"); + } + foreach ($cache as $location => $reference) { + $this->storeReference($location, $reference, $originType, $origin); + } + $this->API->logger->logger("Added origin $originType ({$data['_']}) to ".count($cache).' references', \danog\MadelineProto\Logger::ULTRA_VERBOSE); + } + + public function addOriginMethodContext(string $type) + { + if (!isset(self::METHOD_CONTEXT[$type])) { + throw new \danog\MadelineProto\Exception("Unknown origin type provided: {$type}"); + } + $originContext = self::METHOD_CONTEXT[$type]; + $this->API->logger->logger("Adding origin context $originContext for {$type}!", \danog\MadelineProto\Logger::ULTRA_VERBOSE); + $this->cacheContexts[] = $originContext; + } + + public function addOriginMethod(array $data, array $res) + { + $key = count($this->cacheContexts) - 1; + if ($key === -1) { + throw new \danog\MadelineProto\Exception('Trying to add origin with no origin context set'); + } + $originType = array_pop($this->cacheContexts); + if (!isset($this->cache[$key])) { + $this->API->logger->logger("Removing origin context $originType for {$data['_']}, nothing in the reference cache!", \danog\MadelineProto\Logger::ULTRA_VERBOSE); + + return; + } + $cache = $this->cache[$key]; + unset($this->cache[$key]); + $origin = []; + $body = $data['body']; + switch ($data['_']) { + case 'photos.updateProfilePhoto': + $origin['max_id'] = $res['photo_id']; + $origin['offset'] = -1; + $origin['limit'] = 1; + $origin['user_id'] = $this->API->authorization['user']['id']; + break; + case 'photos.uploadProfilePhoto': + $origin['max_id'] = $res['photo']['id']; + $origin['offset'] = -1; + $origin['limit'] = 1; + $origin['user_id'] = $this->API->authorization['user']['id']; + break; + case 'photos.getUserPhotos': + $origin['user_id'] = $body['user_id']; + $origin['offset'] = -1; + $origin['limit'] = 1; + $count = 0; + foreach ($res['photos'] as $photo) { + $origin['max_id'] = $photo['id']; + + $location = $this->serializeLocation(self::PHOTO_LOCATION, $photo); + if (isset($cache[$location])) { + $reference = $cache[$location]; + unset($cache[$location]); + + $this->storeReference($location, $reference, $originType, $origin); + $count++; + } + + if (isset($photo['sizes'])) { + foreach ($photo['sizes'] as $size) { + if (isset($size['location'])) { + $location = $this->serializeLocation(self::PHOTO_LOCATION_LOCATION, $size['location']); + if (isset($cache[$location])) { + $reference = $cache[$location]; + unset($cache[$location]); + $this->storeReference($location, $reference, $originType, $origin); + $count++; + } + } + } + } + } + $this->API->logger->logger("Added origin $originType ({$data['_']}) to $count references", \danog\MadelineProto\Logger::ULTRA_VERBOSE); + + return; + case 'messages.getStickers': + $origin['emoticon'] = $body['emoticon']; + break; + default: + throw new \danog\MadelineProto\Exception("Unknown origin type provided: {$data['_']}"); + } + foreach ($cache as $location => $reference) { + $this->storeReference($location, $reference, $originType, $origin); + } + $this->API->logger->logger("Added origin $originType ({$data['_']}) to ".count($cache).' references', \danog\MadelineProto\Logger::ULTRA_VERBOSE); + } + + public function storeReference(string $location, string $reference, int $originType, array $origin) + { + if (!isset($this->db[$location])) { + $this->db[$location] = ['origins' => []]; + } + $this->db[$location]['reference'] = $reference; + $this->db[$location]['origins'][$originType] = $origin; + + if ($this->refresh) { + $this->refreshed[$location] = true; + } + + $key = count($this->cacheContexts) - 1; + if ($key >= 0) { + $this->cache[$key][$location] = $reference; + } + } + + public function refreshNext($refresh = false) + { + if ($this->refreshCount === 1 && !$refresh) { + $this->refreshed = []; + $this->refreshCount--; + $this->refresh = false; + } elseif ($this->refreshCount === 0 && $refresh) { + $this->refreshed = []; + $this->refreshCount++; + $this->refresh = true; + } elseif ($this->refreshCount === 0 && !$refresh) { + } elseif ($refresh) { + $this->refreshCount++; + } elseif (!$refresh) { + $this->refreshCount--; + } + } + + public function refreshReference(int $locationType, array $location): Promise + { + return $this->refreshReferenceInternal($this->serializeLocation($locationType, $location)); + } + + public function refreshReferenceInternal(string $location): Promise + { + if (isset($this->refreshed[$location])) { + $this->API->logger->logger('Reference already refreshed!', \danog\MadelineProto\Logger::VERBOSE); + + return new Success($this->db[$location]['reference']); + } + + return call([$this, 'refreshReferenceInternalGenerator'], $location); + } + + public function refreshReferenceInternalGenerator(string $location): \Generator + { + ksort($this->db[$location]['origins']); + $count = 0; + + foreach ($this->db[$location]['origins'] as $originType => &$origin) { + $count++; + $this->API->logger->logger("Try {$count} refreshing file reference with origin type {$originType}", \danog\MadelineProto\Logger::VERBOSE); + switch ($originType) { + // Peer + msg ID + case self::MESSAGE_ORIGIN: + if (is_array($origin['peer'])) { + $origin['peer'] = $this->API->get_info($origin['peer'])['bot_api_id']; + } + if ($origin['peer'] < 0) { + yield $this->API->method_call_async_read('channels.getMessages', ['channel' => $origin['peer'], 'id' => [$origin['msg_id']]], ['datacenter' => $this->API->settings['connection_settings']['default_dc']]); + break; + } + yield $this->API->method_call_async_read('messages.getMessages', ['id' => [$origin['msg_id']]], ['datacenter' => $this->API->settings['connection_settings']['default_dc']]); + break; + // Peer + photo ID + case self::PEER_PHOTO_ORIGIN: + if (isset($this->API->full_chats[$origin['peer']]['last_update'])) { + $this->API->full_chats[$origin['peer']]['last_update'] = 0; + } + $this->API->get_full_info($origin['peer']); + yield new Success(0); + break; + // Peer (default photo ID) + case self::USER_PHOTO_ORIGIN: + yield $this->API->method_call_async_read('photos.getUserPhotos', $origin, ['datacenter' => $this->API->settings['connection_settings']['default_dc']]); + break; + case self::SAVED_GIFS_ORIGIN: + yield $this->API->method_call_async_read('messages.getSavedGifs', $origin, ['datacenter' => $this->API->settings['connection_settings']['default_dc']]); + break; + case self::STICKER_SET_ID_ORIGIN: + yield $this->API->method_call_async_read('messages.getStickerSet', $origin, ['datacenter' => $this->API->settings['connection_settings']['default_dc']]); + break; + case self::STICKER_SET_RECENT_ORIGIN: + yield $this->API->method_call_async_read('messages.getRecentStickers', $origin, ['datacenter' => $this->API->settings['connection_settings']['default_dc']]); + break; + case self::STICKER_SET_FAVED_ORIGIN: + yield $this->API->method_call_async_read('messages.getFavedStickers', $origin, ['datacenter' => $this->API->settings['connection_settings']['default_dc']]); + break; + case self::STICKER_SET_EMOTICON_ORIGIN: + yield $this->API->method_call_async_read('messages.getStickers', $origin, ['datacenter' => $this->API->settings['connection_settings']['default_dc']]); + break; + case self::WALLPAPER_ORIGIN: + yield $this->API->method_call_async_read('account.getWallPapers', $origin, ['datacenter' => $this->API->settings['connection_settings']['default_dc']]); + break; + default: + throw new \danog\MadelineProto\Exception("Unknown origin type $originType"); + } + if (isset($this->refreshed[$location])) { + return $this->db[$location]['reference']; + } + } + + throw new Exception('Did not refresh reference'); + } + + public function populateReferenceSync(array $object): array + { + return $this->wait($this->populateReference($object)); + } + + public function populateReference(array $object): Promise + { + $deferred = new Deferred(); + $this->getReference(self::LOCATION_CONTEXT[$object['_']], $object)->onResolve(function ($e, $res) use ($deferred, $object) { + if ($e) { + throw $e; + } + $object['file_reference'] = $res; + $deferred->resolve($object); + }); + + return $deferred->promise(); + } + + public function getReference(int $locationType, array $location): Promise + { + $locationString = $this->serializeLocation($locationType, $location); + if (!isset($this->db[$locationString]['reference'])) { + if (isset($location['file_reference'])) { + $this->API->logger->logger("Using outdated file reference for location of type $locationType object {$location['_']}", \danog\MadelineProto\Logger::ULTRA_VERBOSE); + + return new Success($location['file_reference']); + } + + throw new \danog\MadelineProto\Exception("Could not find file reference for location of type $locationType object {$location['_']}"); + } + $this->API->logger->logger("Getting file reference for location of type $locationType object {$location['_']}", \danog\MadelineProto\Logger::ULTRA_VERBOSE); + + if ($this->refresh) { + return $this->refreshReferenceInternal($locationString); + } + + return new Success($this->db[$locationString]['reference']); + } + + private function serializeLocation(int $locationType, array $location) + { + switch ($locationType) { + case self::DOCUMENT_LOCATION: + case self::DOCUMENT_LOCATION_LOCATION: + case self::PHOTO_LOCATION: + return $locationType.(is_int($location['id']) ? $this->pack_signed_long($location['id']) : $location['id']); + case self::PHOTO_LOCATION_LOCATION: + $dc_id = $this->pack_signed_int($location['dc_id']); + $volume_id = is_int($location['volume_id']) ? $this->pack_signed_long($location['volume_id']) : $location['volume_id']; + $local_id = $this->pack_signed_int($location['local_id']); + + return $locationType.$dc_id.$volume_id.$local_id; + } + } + + public function __debugInfo() + { + return ['ReferenceDatabase instance '.spl_object_hash($this)]; + } +} diff --git a/src/danog/MadelineProto/MTProtoTools/ResponseHandler.php b/src/danog/MadelineProto/MTProtoTools/ResponseHandler.php index fea9c263..5cd020da 100644 --- a/src/danog/MadelineProto/MTProtoTools/ResponseHandler.php +++ b/src/danog/MadelineProto/MTProtoTools/ResponseHandler.php @@ -1,18 +1,26 @@ . -*/ +/** + * ResponseHandler module. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see . + * + * @author Daniil Gentili + * @copyright 2016-2018 Daniil Gentili + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ namespace danog\MadelineProto\MTProtoTools; +use Amp\Loop; + /** * Manages responses. */ @@ -20,6 +28,7 @@ trait ResponseHandler { public function send_msgs_state_info($req_msg_id, $msg_ids, $datacenter) { + // TODO REWRITE $info = ''; foreach ($msg_ids as $msg_id) { $cur_info = 0; @@ -43,19 +52,24 @@ trait ResponseHandler $this->datacenter->sockets[$datacenter]->outgoing_messages[$this->object_call('msgs_state_info', ['req_msg_id' => $req_msg_id, 'info' => $info], ['datacenter' => $datacenter])]['response'] = $req_msg_id; } - public function handle_messages($datacenter) + public $n = 0; + + public function handle_messages($datacenter, $actual_datacenter = null) { + if ($actual_datacenter) { + $datacenter = $actual_datacenter; + } + + //$n = $this->n++; $only_updates = true; foreach ($this->datacenter->sockets[$datacenter]->new_incoming as $current_msg_id) { - $unset = false; + //var_dump($this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]); $this->logger->logger((isset($this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['from_container']) ? 'Inside of container, received ' : 'Received ').$this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']['_'].' from DC '.$datacenter, \danog\MadelineProto\Logger::ULTRA_VERBOSE); - //var_dump($this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content'], \danog\MadelineProto\Logger::ULTRA_VERBOSE); - switch ($this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']['_']) { case 'msgs_ack': unset($this->datacenter->sockets[$datacenter]->new_incoming[$current_msg_id]); - $this->check_in_seq_no($datacenter, $current_msg_id); + $this->datacenter->sockets[$datacenter]->check_in_seq_no($current_msg_id); $only_updates = false; foreach ($this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']['msg_ids'] as $msg_id) { $this->ack_outgoing_message_id($msg_id, $datacenter); @@ -64,90 +78,67 @@ trait ResponseHandler break; case 'rpc_result': unset($this->datacenter->sockets[$datacenter]->new_incoming[$current_msg_id]); - unset($this->datacenter->sockets[$datacenter]->new_outgoing[$this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']['req_msg_id']]); $this->ack_incoming_message_id($current_msg_id, $datacenter); - // Acknowledge that I received the server's response - $this->ack_outgoing_message_id($this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']['req_msg_id'], $datacenter); // Acknowledge that the server received my request - //$this->logger->logger($this->datacenter->sockets[$datacenter]->outgoing_messages[$this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']['req_msg_id']]); - //$this->logger->logger($this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']); - $this->datacenter->sockets[$datacenter]->outgoing_messages[$this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']['req_msg_id']]['response'] = $current_msg_id; + $req_msg_id = $this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']['req_msg_id']; $this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content'] = $this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']['result']; - $this->check_in_seq_no($datacenter, $current_msg_id); + $this->datacenter->sockets[$datacenter]->check_in_seq_no($current_msg_id); + + $this->handle_response($req_msg_id, $current_msg_id, $datacenter); + $only_updates = false; break; case 'future_salts': unset($this->datacenter->sockets[$datacenter]->new_incoming[$current_msg_id]); - unset($this->datacenter->sockets[$datacenter]->new_outgoing[$this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']['req_msg_id']]); - $this->check_in_seq_no($datacenter, $current_msg_id); + $this->datacenter->sockets[$datacenter]->check_in_seq_no($current_msg_id); $only_updates = false; - $this->ack_outgoing_message_id($this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']['req_msg_id'], $datacenter); - // Acknowledge that the server received my request - $this->datacenter->sockets[$datacenter]->outgoing_messages[$this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']['req_msg_id']]['response'] = $current_msg_id; + $this->handle_response($this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']['req_msg_id'], $current_msg_id, $datacenter); break; case 'bad_server_salt': case 'bad_msg_notification': - $this->check_in_seq_no($datacenter, $current_msg_id); + $this->datacenter->sockets[$datacenter]->check_in_seq_no($current_msg_id); $only_updates = false; - $this->ack_outgoing_message_id($this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']['bad_msg_id'], $datacenter); - // Acknowledge that the server received my request - unset($this->datacenter->sockets[$datacenter]->new_incoming[$current_msg_id]); - unset($this->datacenter->sockets[$datacenter]->new_outgoing[$this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']['bad_msg_id']]); - - switch ($this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']['error_code']) { - case 48: - $this->datacenter->sockets[$datacenter]->temp_auth_key['server_salt'] = $this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']['new_server_salt']; - - throw new \danog\MadelineProto\Exception('Got bad message notification'); - case 16: - case 17: - $this->logger->logger('Received bad_msg_notification: '.self::BAD_MSG_ERROR_CODES[$this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']['error_code']], \danog\MadelineProto\Logger::WARNING); - $this->datacenter->sockets[$datacenter]->time_delta = (int) (new \phpseclib\Math\BigInteger(strrev($current_msg_id), 256))->bitwise_rightShift(32)->subtract(new \phpseclib\Math\BigInteger(time()))->toString(); - $this->logger->logger('Set time delta to '.$this->datacenter->sockets[$datacenter]->time_delta, \danog\MadelineProto\Logger::WARNING); - $this->reset_session(); - $this->datacenter->sockets[$datacenter]->temp_auth_key = null; - $this->init_authorization(); - - throw new \danog\MadelineProto\Exception('Got bad message notification'); - } - $this->datacenter->sockets[$datacenter]->outgoing_messages[$this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']['bad_msg_id']]['response'] = $current_msg_id; + $this->handle_response($this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']['bad_msg_id'], $current_msg_id, $datacenter); break; case 'pong': - $this->check_in_seq_no($datacenter, $current_msg_id); + $this->datacenter->sockets[$datacenter]->check_in_seq_no($current_msg_id); $only_updates = false; unset($this->datacenter->sockets[$datacenter]->new_incoming[$current_msg_id]); - unset($this->datacenter->sockets[$datacenter]->new_outgoing[$this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']['msg_id']]); - $this->ack_outgoing_message_id($this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']['msg_id'], $datacenter); - // Acknowledge that the server received my request - $this->datacenter->sockets[$datacenter]->outgoing_messages[$this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']['msg_id']]['response'] = $current_msg_id; + $this->handle_response($this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']['msg_id'], $current_msg_id, $datacenter); break; case 'new_session_created': - $this->check_in_seq_no($datacenter, $current_msg_id); + $this->datacenter->sockets[$datacenter]->check_in_seq_no($current_msg_id); $only_updates = false; $this->datacenter->sockets[$datacenter]->temp_auth_key['server_salt'] = $this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']['server_salt']; unset($this->datacenter->sockets[$datacenter]->new_incoming[$current_msg_id]); $this->ack_incoming_message_id($current_msg_id, $datacenter); + // Acknowledge that I received the server's response if ($this->authorized === self::LOGGED_IN && !$this->initing_authorization && $this->datacenter->sockets[$this->datacenter->curdc]->temp_auth_key !== null) { - $this->get_updates_difference(); + Loop::defer([$this, 'get_updates_difference']); } - $unset = true; + //foreach ($this->datacenter->sockets[$datacenter]->new_outgoing as $message_id) { + // $this->datacenter->sockets[$datacenter]->outgoing_messages[$message_id]['sent'] = 0; + //} +// Loop::defer([$this->datacenter->sockets[$datacenter]->checker, 'resume']); + + unset($this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']); break; case 'msg_container': unset($this->datacenter->sockets[$datacenter]->new_incoming[$current_msg_id]); foreach ($this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']['messages'] as $message) { - $this->check_message_id($message['msg_id'], ['outgoing' => false, 'datacenter' => $datacenter, 'container' => true]); + $this->datacenter->sockets[$datacenter]->check_message_id($message['msg_id'], ['outgoing' => false, 'container' => true]); $this->datacenter->sockets[$datacenter]->incoming_messages[$message['msg_id']] = ['seq_no' => $message['seqno'], 'content' => $message['body'], 'from_container' => true]; $this->datacenter->sockets[$datacenter]->new_incoming[$message['msg_id']] = $message['msg_id']; $this->handle_messages($datacenter); } - $unset = true; - $this->check_in_seq_no($datacenter, $current_msg_id); + $this->datacenter->sockets[$datacenter]->check_in_seq_no($current_msg_id); $only_updates = false; + unset($this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']); break; case 'msg_copy': - $this->check_in_seq_no($datacenter, $current_msg_id); + $this->datacenter->sockets[$datacenter]->check_in_seq_no($current_msg_id); $only_updates = false; $this->ack_incoming_message_id($current_msg_id, $datacenter); // Acknowledge that I received the server's response @@ -155,44 +146,42 @@ trait ResponseHandler $this->ack_incoming_message_id($this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']['orig_message']['msg_id'], $datacenter); // Acknowledge that I received the server's response } else { - $this->check_message_id($message['orig_message']['msg_id'], ['outgoing' => false, 'datacenter' => $datacenter, 'container' => true]); + $this->datacenter->sockets[$datacenter]->check_message_id($message['orig_message']['msg_id'], ['outgoing' => false, 'container' => true]); $this->datacenter->sockets[$datacenter]->incoming_messages[$message['orig_message']['msg_id']] = ['content' => $this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']['orig_message']]; $this->datacenter->sockets[$datacenter]->new_incoming[$message['orig_message']['msg_id']] = $message['orig_message']['msg_id']; $this->handle_messages($datacenter); } unset($this->datacenter->sockets[$datacenter]->new_incoming[$current_msg_id]); - $unset = true; + unset($this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']); break; case 'http_wait': - $this->check_in_seq_no($datacenter, $current_msg_id); + $this->datacenter->sockets[$datacenter]->check_in_seq_no($current_msg_id); $only_updates = false; $this->logger->logger($this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content'], \danog\MadelineProto\Logger::NOTICE); unset($this->datacenter->sockets[$datacenter]->new_incoming[$current_msg_id]); - $unset = true; + unset($this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']); break; case 'msgs_state_info': - $this->check_in_seq_no($datacenter, $current_msg_id); + $this->datacenter->sockets[$datacenter]->check_in_seq_no($current_msg_id); $only_updates = false; - $this->datacenter->sockets[$datacenter]->outgoing_messages[$this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']['req_msg_id']]['response'] = $current_msg_id; unset($this->datacenter->sockets[$datacenter]->new_incoming[$current_msg_id]); - unset($this->datacenter->sockets[$datacenter]->new_outgoing[$this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']['req_msg_id']]); - $unset = true; + $this->handle_response($this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']['req_msg_id'], $current_msg_id, $datacenter); break; case 'msgs_state_req': - $this->check_in_seq_no($datacenter, $current_msg_id); + $this->datacenter->sockets[$datacenter]->check_in_seq_no($current_msg_id); $only_updates = false; unset($this->datacenter->sockets[$datacenter]->new_incoming[$current_msg_id]); $this->send_msgs_state_info($current_msg_id, $this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']['msg_ids'], $datacenter); break; case 'msgs_all_info': - $this->check_in_seq_no($datacenter, $current_msg_id); + $this->datacenter->sockets[$datacenter]->check_in_seq_no($current_msg_id); $only_updates = false; unset($this->datacenter->sockets[$datacenter]->new_incoming[$current_msg_id]); foreach ($this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']['msg_ids'] as $key => $msg_id) { $msg_id = new \phpseclib\Math\BigInteger(strrev($msg_id), 256); $status = 'Status for message id '.$msg_id.': '; if (($this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']['info'][$key] & 4) !== 0) { - $this->ack_outgoing_message_id($msg_id, $datacenter); + $this->got_response_for_outgoing_message_id($msg_id, $datacenter); } foreach (self::MSGS_INFO_FLAGS as $flag => $description) { if (($this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']['info'][$key] & $flag) !== 0) { @@ -203,7 +192,7 @@ trait ResponseHandler } break; case 'msg_detailed_info': - $this->check_in_seq_no($datacenter, $current_msg_id); + $this->datacenter->sockets[$datacenter]->check_in_seq_no($current_msg_id); $only_updates = false; if (isset($this->datacenter->sockets[$datacenter]->outgoing_messages[$this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']['msg_id']])) { if (isset($this->datacenter->sockets[$datacenter]->incoming_messages[$this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']['answer_msg_id']])) { @@ -214,7 +203,7 @@ trait ResponseHandler } } case 'msg_new_detailed_info': - $this->check_in_seq_no($datacenter, $current_msg_id); + $this->datacenter->sockets[$datacenter]->check_in_seq_no($current_msg_id); $only_updates = false; if (isset($this->datacenter->sockets[$datacenter]->incoming_messages[$this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']['answer_msg_id']])) { $this->ack_incoming_message_id($this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']['answer_msg_id'], $datacenter); @@ -224,7 +213,7 @@ trait ResponseHandler unset($this->datacenter->sockets[$datacenter]->new_incoming[$current_msg_id]); break; case 'msg_resend_req': - $this->check_in_seq_no($datacenter, $current_msg_id); + $this->datacenter->sockets[$datacenter]->check_in_seq_no($current_msg_id); $only_updates = false; $ok = true; unset($this->datacenter->sockets[$datacenter]->new_incoming[$current_msg_id]); @@ -242,7 +231,7 @@ trait ResponseHandler } break; case 'msg_resend_ans_req': - $this->check_in_seq_no($datacenter, $current_msg_id); + $this->datacenter->sockets[$datacenter]->check_in_seq_no($current_msg_id); $only_updates = false; unset($this->datacenter->sockets[$datacenter]->new_incoming[$current_msg_id]); $this->send_msgs_state_info($this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']['msg_ids'], $datacenter); @@ -253,45 +242,34 @@ trait ResponseHandler } break; default: - $this->check_in_seq_no($datacenter, $current_msg_id); + $this->datacenter->sockets[$datacenter]->check_in_seq_no($current_msg_id); $this->ack_incoming_message_id($current_msg_id, $datacenter); // Acknowledge that I received the server's response $response_type = $this->constructors->find_by_predicate($this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']['_'])['type']; + switch ($response_type) { case 'Updates': unset($this->datacenter->sockets[$datacenter]->new_incoming[$current_msg_id]); - $unset = true; - - if (isset($this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']['users'])) { - $this->add_users($this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']['users']); - } - if (isset($this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']['chats'])) { - $this->add_chats($this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']['chats']); - } if (strpos($datacenter, 'cdn') === false) { - $this->handle_updates($this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']); + Loop::defer([$this, 'handle_updates'], $this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']); } - if (isset($this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']['users'])) { - unset($this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']['users']); - } - if (isset($this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']['chats'])) { - unset($this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']['chats']); - } + unset($this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']); $only_updates = true && $only_updates; break; default: $only_updates = false; $this->logger->logger('Trying to assign a response of type '.$response_type.' to its request...', \danog\MadelineProto\Logger::VERBOSE); - foreach ($this->datacenter->sockets[$datacenter]->new_outgoing as $key => $expecting) { + foreach ($this->datacenter->sockets[$datacenter]->new_outgoing as $key => $expecting_msg_id) { + $expecting = $this->datacenter->sockets[$datacenter]->outgoing_messages[$expecting_msg_id]; + $this->logger->logger('Does the request of return type '.$expecting['type'].' match?', \danog\MadelineProto\Logger::VERBOSE); if ($response_type === $expecting['type']) { $this->logger->logger('Yes', \danog\MadelineProto\Logger::VERBOSE); - $this->datacenter->sockets[$datacenter]->outgoing_messages[$expecting['msg_id']]['response'] = $current_msg_id; - unset($this->datacenter->sockets[$datacenter]->new_outgoing[$key]); unset($this->datacenter->sockets[$datacenter]->new_incoming[$current_msg_id]); + $this->handle_response($expecting_msg_id, $current_msg_id, $datacenter); break 2; } $this->logger->logger('No', \danog\MadelineProto\Logger::VERBOSE); @@ -302,128 +280,259 @@ trait ResponseHandler } break; } - - if (isset($this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']['users'])) { - $this->add_users($this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']['users']); - } - if (isset($this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']['chats'])) { - $this->add_chats($this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']['chats']); - } - if (isset($this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']['user'])) { - $this->add_users([$this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']['user']]); - } - if (isset($this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']['chat'])) { - $this->add_chats([$this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']['chat']]); - } - - if (isset($this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']['result']['users'])) { - $this->add_users($this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']['result']['users']); - } - if (isset($this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']['result']['chats'])) { - $this->add_chats($this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']['result']['chats']); - } - if (isset($this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']['result']['_'])) { - switch ($this->constructors->find_by_predicate($this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']['result']['_'])['type']) { - case 'Update': - $this->handle_update($this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']['result']); - break; - } - } - if ($unset) { - unset($this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]); - } } + //$this->n--; return $only_updates; } - public function handle_rpc_error($server_answer, &$aargs) + public function handle_reject($datacenter, &$request, $data) { - if (in_array($server_answer['error_message'], ['PERSISTENT_TIMESTAMP_EMPTY', 'PERSISTENT_TIMESTAMP_OUTDATED', 'PERSISTENT_TIMESTAMP_INVALID'])) { - throw new \danog\MadelineProto\PTSException($server_answer['error_message']); + if (isset($request['promise']) && is_object($request['promise'])) { + Loop::defer(function () use (&$request, $data) { + $request['promise']->fail($data); + unset($request['promise']); + }); + } elseif (isset($request['container'])) { + foreach ($request['container'] as $message_id) { + $this->handle_reject($datacenter, $this->datacenter->sockets[$datacenter]->outgoing_messages[$message_id], $data); + } + } else { + $this->logger->logger('Rejecting: already got response for '.(isset($request['_']) ? $request['_'] : '-')); + $this->logger->logger("Rejecting: $data"); } - switch ($server_answer['error_code']) { - case 500: - if ($server_answer['error_message'] === 'MSG_WAIT_FAILED') { - throw new \danog\MadelineProto\RPCErrorException($server_answer['error_message'], $server_answer['error_code']); - } + } - throw new \danog\MadelineProto\Exception('Re-executing query after server error...'); - case 303: - $this->datacenter->curdc = $aargs['datacenter'] = (int) preg_replace('/[^0-9]+/', '', $server_answer['error_message']); + public function handle_response($request_id, $response_id, $datacenter) + { + //var_dumP("Response ".bin2hex($request_id)); + $response = &$this->datacenter->sockets[$datacenter]->incoming_messages[$response_id]['content']; + unset($this->datacenter->sockets[$datacenter]->incoming_messages[$response_id]['content']); + $request = &$this->datacenter->sockets[$datacenter]->outgoing_messages[$request_id]; - if (isset($aargs['file']) && $aargs['file'] && isset($this->datacenter->sockets[$aargs['datacenter'].'_media'])) { - \danog\MadelineProto\Logger::log('Using media DC'); - $aargs['datacenter'] .= '_media'; - } + if (isset($request['method']) && $request['method'] && $request['_'] !== 'auth.bindTempAuthKey' && $this->datacenter->sockets[$datacenter]->temp_auth_key !== null && (!isset($this->datacenter->sockets[$datacenter]->temp_auth_key['connection_inited']) || $this->datacenter->sockets[$datacenter]->temp_auth_key['connection_inited'] === false)) { + $this->datacenter->sockets[$datacenter]->temp_auth_key['connection_inited'] = true; + } + if (isset($response['_'])) { + switch ($response['_']) { + case 'rpc_error': + if (in_array($response['error_message'], ['PERSISTENT_TIMESTAMP_EMPTY', 'PERSISTENT_TIMESTAMP_OUTDATED', 'PERSISTENT_TIMESTAMP_INVALID'])) { + $this->got_response_for_outgoing_message_id($request_id, $datacenter); + $this->handle_reject($datacenter, $request, new \danog\MadelineProto\PTSException($response['error_message'])); - throw new \danog\MadelineProto\Exception('Received request to switch to DC '.$this->datacenter->curdc); - case 401: - switch ($server_answer['error_message']) { - case 'USER_DEACTIVATED': - case 'SESSION_REVOKED': - case 'SESSION_EXPIRED': - $this->logger->logger($server_answer['error_message'], \danog\MadelineProto\Logger::FATAL_ERROR); - foreach ($this->datacenter->sockets as $socket) { - $socket->temp_auth_key = null; - $socket->auth_key = null; - $socket->authorized = false; + return; + } + if (strpos($response['error_message'], 'FILE_REFERENCE_') === 0) { + $this->logger->logger("Got {$response['error_message']}, refreshing file reference and repeating method call..."); + + $request['refresh_references'] = true; + if (isset($request['serialized_body'])) { + unset($request['serialized_body']); } - $this->authorized = self::NOT_LOGGED_IN; - $this->authorization = null; - $this->init_authorization(); - throw new \danog\MadelineProto\RPCErrorException($server_answer['error_message'], $server_answer['error_code']); - case 'AUTH_KEY_UNREGISTERED': - case 'AUTH_KEY_INVALID': - if ($this->authorized !== self::LOGGED_IN) { - throw new \danog\MadelineProto\RPCErrorException($server_answer['error_message'], $server_answer['error_code']); - } - $this->logger->logger('Auth key not registered, resetting temporary and permanent auth keys...', \danog\MadelineProto\Logger::ERROR); + Loop::defer([$this, 'method_recall'], ['message_id' => $request_id, 'datacenter' => $datacenter]); - $this->datacenter->sockets[$aargs['datacenter']]->temp_auth_key = null; - $this->datacenter->sockets[$aargs['datacenter']]->auth_key = null; - $this->datacenter->sockets[$aargs['datacenter']]->authorized = false; - if ($this->authorized_dc === $aargs['datacenter'] && $this->authorized === self::LOGGED_IN) { - $this->logger->logger('Permanent auth key was main authorized key, logging out...', \danog\MadelineProto\Logger::FATAL_ERROR); - foreach ($this->datacenter->sockets as $socket) { - $socket->temp_auth_key = null; - $socket->auth_key = null; - $socket->authorized = false; + return; + } + switch ($response['error_code']) { + case 500: + if ($response['error_message'] === 'MSG_WAIT_FAILED') { + $this->datacenter->sockets[$datacenter]->call_queue[$request['queue']] = []; } - $this->authorized = self::NOT_LOGGED_IN; - $this->authorization = null; - $this->init_authorization(); - throw new \danog\MadelineProto\RPCErrorException($server_answer['error_message'], $server_answer['error_code']); - } - $this->init_authorization(); + Loop::defer([$this, 'method_recall'], ['message_id' => $request_id, 'datacenter' => $datacenter]); - throw new \danog\MadelineProto\Exception('I had to recreate the temporary authorization key'); - case 'AUTH_KEY_PERM_EMPTY': - if ($this->authorized !== self::LOGGED_IN) { - throw new \danog\MadelineProto\RPCErrorException($server_answer['error_message'], $server_answer['error_code']); - } - $this->logger->logger('Temporary auth key not bound, resetting temporary auth key...', \danog\MadelineProto\Logger::ERROR); + return; + case 303: + $old_datacenter = $datacenter; + $this->datacenter->curdc = $datacenter = (int) preg_replace('/[^0-9]+/', '', $response['error_message']); - $this->datacenter->sockets[$aargs['datacenter']]->temp_auth_key = null; - $this->init_authorization(); - // idk - throw new \danog\MadelineProto\Exception('I had to recreate the temporary authorization key'); - } - case 420: - $seconds = preg_replace('/[^0-9]+/', '', $server_answer['error_message']); - $limit = isset($aargs['FloodWaitLimit']) ? $aargs['FloodWaitLimit'] : $this->settings['flood_timeout']['wait_if_lt']; - if (is_numeric($seconds) && $seconds < $limit) { - $this->logger->logger('Flood, waiting '.$seconds.' seconds...', \danog\MadelineProto\Logger::NOTICE); - sleep($seconds); + if (isset($request['file']) && $request['file'] && isset($this->datacenter->sockets[$datacenter.'_media'])) { + \danog\MadelineProto\Logger::log('Using media DC'); + $datacenter .= '_media'; + } - throw new \danog\MadelineProto\Exception('Re-executing query...'); - } + if (isset($request['user_related']) && $request['user_related']) { + $this->settings['connection_settings']['default_dc'] = $this->authorized_dc = $this->datacenter->curdc; + } - default: - throw new \danog\MadelineProto\RPCErrorException($server_answer['error_message'], $server_answer['error_code']); + Loop::defer([$this, 'method_recall'], ['message_id' => $request_id, 'datacenter' => $datacenter, 'old_datacenter' => $old_datacenter]); + + return; + case 401: + switch ($response['error_message']) { + case 'USER_DEACTIVATED': + case 'SESSION_REVOKED': + case 'SESSION_EXPIRED': + $this->got_response_for_outgoing_message_id($request_id, $datacenter); + + $this->logger->logger($response['error_message'], \danog\MadelineProto\Logger::FATAL_ERROR); + foreach ($this->datacenter->sockets as $socket) { + $socket->temp_auth_key = null; + $socket->session_id = null; + $socket->auth_key = null; + $socket->authorized = false; + } + + if ($response['error_message'] === 'USER_DEACTIVATED') { + $this->logger->logger('!!!!!!! WARNING !!!!!!!', \danog\MadelineProto\Logger::FATAL_ERROR); + $this->logger->logger("Telegram's flood prevention system suspended this account.", \danog\MadelineProto\Logger::ERROR); + $this->logger->logger('To continue, manual verification is required.', \danog\MadelineProto\Logger::FATAL_ERROR); + $phone = isset($this->authorization['user']['phone']) ? '+'.$this->authorization['user']['phone'] : 'you are currently using'; + $this->logger->logger('Send an email to recover@telegram.org, asking to unban the phone number '.$phone.', and quickly describe what will you do with this phone number.', \danog\MadelineProto\Logger::FATAL_ERROR); + $this->logger->logger('Then login again.', \danog\MadelineProto\Logger::FATAL_ERROR); + $this->logger->logger('If you intentionally deleted this account, ignore this message.', \danog\MadelineProto\Logger::FATAL_ERROR); + } + + $this->authorized = self::NOT_LOGGED_IN; + $this->authorization = null; + + Loop::defer(function () use ($datacenter, &$request, &$response) { + $this->init_authorization(); + + $this->handle_reject($datacenter, $request, new \danog\MadelineProto\RPCErrorException($response['error_message'], $response['error_code'])); + }); + + return; + case 'AUTH_KEY_UNREGISTERED': + case 'AUTH_KEY_INVALID': + if ($this->authorized !== self::LOGGED_IN) { + $this->got_response_for_outgoing_message_id($request_id, $datacenter); + + Loop::defer(function () use ($datacenter, &$request, &$response) { + $this->init_authorization(); + + $this->handle_reject($datacenter, $request, new \danog\MadelineProto\RPCErrorException($response['error_message'], $response['error_code'])); + }); + + return; + } + $this->datacenter->sockets[$datacenter]->session_id = null; + $this->datacenter->sockets[$datacenter]->temp_auth_key = null; + $this->datacenter->sockets[$datacenter]->auth_key = null; + $this->datacenter->sockets[$datacenter]->authorized = false; + + $this->logger->logger('Auth key not registered, resetting temporary and permanent auth keys...', \danog\MadelineProto\Logger::ERROR); + + if ($this->authorized_dc === $datacenter && $this->authorized === self::LOGGED_IN) { + $this->got_response_for_outgoing_message_id($request_id, $datacenter); + + $this->logger->logger('Permanent auth key was main authorized key, logging out...', \danog\MadelineProto\Logger::FATAL_ERROR); + foreach ($this->datacenter->sockets as $socket) { + $socket->temp_auth_key = null; + $socket->auth_key = null; + $socket->authorized = false; + } + $this->logger->logger('!!!!!!! WARNING !!!!!!!', \danog\MadelineProto\Logger::FATAL_ERROR); + $this->logger->logger("Telegram's flood prevention system suspended this account.", \danog\MadelineProto\Logger::ERROR); + $this->logger->logger('To continue, manual verification is required.', \danog\MadelineProto\Logger::FATAL_ERROR); + $phone = isset($this->authorization['user']['phone']) ? '+'.$this->authorization['user']['phone'] : 'you are currently using'; + $this->logger->logger('Send an email to recover@telegram.org, asking to unban the phone number '.$phone.', and quickly describe what will you do with this phone number.', \danog\MadelineProto\Logger::FATAL_ERROR); + $this->logger->logger('Then login again.', \danog\MadelineProto\Logger::FATAL_ERROR); + $this->logger->logger('If you intentionally deleted this account, ignore this message.', \danog\MadelineProto\Logger::FATAL_ERROR); + + $this->authorized = self::NOT_LOGGED_IN; + $this->authorization = null; + + Loop::defer(function () use ($datacenter, &$request, &$response) { + $this->init_authorization(); + + $this->handle_reject($datacenter, $request, new \danog\MadelineProto\RPCErrorException($response['error_message'], $response['error_code'])); + }); + + return; + } + Loop::defer(function () use ($request_id, $datacenter) { + $this->init_authorization(); + + $this->method_recall('', ['message_id' => $request_id, 'datacenter' => $datacenter]); + }); + + return; + case 'AUTH_KEY_PERM_EMPTY': + $this->logger->logger('Temporary auth key not bound, resetting temporary auth key...', \danog\MadelineProto\Logger::ERROR); + + $this->datacenter->sockets[$datacenter]->temp_auth_key = null; + Loop::defer(function () use ($request_id, $datacenter) { + $this->init_authorization(); + $this->method_recall('', ['message_id' => $request_id, 'datacenter' => $datacenter]); + }); + + return; + } + $this->got_response_for_outgoing_message_id($request_id, $datacenter); + + $this->handle_reject($datacenter, $request, new \danog\MadelineProto\RPCErrorException($response['error_message'], $response['error_code'])); + + return; + case 420: + $seconds = preg_replace('/[^0-9]+/', '', $response['error_message']); + $limit = isset($aargs['FloodWaitLimit']) ? $aargs['FloodWaitLimit'] : $this->settings['flood_timeout']['wait_if_lt']; + if (is_numeric($seconds) && $seconds < $limit) { + $this->logger->logger('Flood, waiting '.$seconds.' seconds before repeating async call...', \danog\MadelineProto\Logger::NOTICE); + Loop::delay($seconds * 1000, [$this, 'method_recall'], ['message_id' => $request_id, 'datacenter' => $datacenter]); + + return; + } + // no break + default: + $this->got_response_for_outgoing_message_id($request_id, $datacenter); + + $this->handle_reject($datacenter, $request, new \danog\MadelineProto\RPCErrorException($response['error_message'], $response['error_code'])); + + return; + } + + return; + case 'boolTrue': + case 'boolFalse': + $response = $response['_'] === 'boolTrue'; + break; + case 'bad_server_salt': + case 'bad_msg_notification': + + $this->logger->logger('Received bad_msg_notification: '.self::BAD_MSG_ERROR_CODES[$response['error_code']], \danog\MadelineProto\Logger::WARNING); + switch ($response['error_code']) { + case 48: + $this->datacenter->sockets[$datacenter]->temp_auth_key['server_salt'] = $response['new_server_salt']; + Loop::defer([$this, 'method_recall'], ['message_id' => $request_id, 'datacenter' => $datacenter]); + + return; + case 16: + case 17: + $this->datacenter->sockets[$datacenter]->time_delta = (int) (new \phpseclib\Math\BigInteger(strrev($response_id), 256))->bitwise_rightShift(32)->subtract(new \phpseclib\Math\BigInteger(time()))->toString(); + $this->logger->logger('Set time delta to '.$this->datacenter->sockets[$datacenter]->time_delta, \danog\MadelineProto\Logger::WARNING); + $this->reset_session(); + $this->datacenter->sockets[$datacenter]->temp_auth_key = null; + Loop::defer(function () use ($request_id, $datacenter) { + $this->init_authorization(); + $this->method_recall('', ['message_id' => $request_id, 'datacenter' => $datacenter]); + }); + + return; + } + $this->got_response_for_outgoing_message_id($request_id, $datacenter); + $this->handle_reject($datacenter, $request, new \danog\MadelineProto\RPCErrorException('Received bad_msg_notification: '.self::BAD_MSG_ERROR_CODES[$response['error_code']], $response['error_code'])); + + return; + } } + + if (!isset($request['promise'])) { + $this->logger->logger('Response: already got response for '.(isset($request['_']) ? $request['_'] : '-').' with message ID '.$this->unpack_signed_long($request_id)); + + return; + } + + if (isset($request['botAPI']) && $request['botAPI']) { + $response = $this->MTProto_to_botAPI($response); + } + unset($request); + $this->got_response_for_outgoing_message_id($request_id, $datacenter); + Loop::defer(function () use ($request_id, $response, $datacenter) { + $this->datacenter->sockets[$datacenter]->outgoing_messages[$request_id]['promise']->resolve($response); + unset($this->datacenter->sockets[$datacenter]->outgoing_messages[$request_id]['promise']); + }); } public function handle_pending_updates() @@ -443,11 +552,15 @@ trait ResponseHandler } } - public function handle_updates($updates) + public function handle_updates($updates, $actual_updates = null) { if (!$this->settings['updates']['handle_updates']) { return; } + if ($actual_updates) { + $updates = $actual_updates; + } + if ($this->postpone_updates) { $this->logger->logger('Postpone update handling', \danog\MadelineProto\Logger::VERBOSE); $this->pending_updates[] = $updates; @@ -467,53 +580,59 @@ trait ResponseHandler } } switch ($updates['_']) { - case 'updates': - case 'updatesCombined': - foreach ($updates['updates'] as $update) { - $this->handle_update($update, $opts); - } - break; - case 'updateShort': - $this->handle_update($updates['update'], $opts); - break; - case 'updateShortMessage': - case 'updateShortChatMessage': - $from_id = isset($updates['from_id']) ? $updates['from_id'] : ($updates['out'] ? $this->authorization['user']['id'] : $updates['user_id']); - $to_id = isset($updates['chat_id']) ? -$updates['chat_id'] : ($updates['out'] ? $updates['user_id'] : $this->authorization['user']['id']); - if (!$this->peer_isset($from_id) || !$this->peer_isset($to_id) || isset($updates['via_bot_id']) && !$this->peer_isset($updates['via_bot_id']) || isset($updates['entities']) && !$this->entities_peer_isset($updates['entities']) || isset($updates['fwd_from']) && !$this->fwd_peer_isset($updates['fwd_from'])) { - $this->logger->logger('getDifference: good - getting user for updateShortMessage', \danog\MadelineProto\Logger::VERBOSE); - $this->get_updates_difference(); - } - $message = $updates; - $message['_'] = 'message'; - $message['from_id'] = $from_id; + case 'updates': + case 'updatesCombined': + foreach ($updates['updates'] as $update) { + $this->handle_update($update, $opts); + } + break; + case 'updateShort': + $this->handle_update($updates['update'], $opts); + break; + case 'updateShortMessage': + case 'updateShortChatMessage': + $from_id = isset($updates['from_id']) ? $updates['from_id'] : ($updates['out'] ? $this->authorization['user']['id'] : $updates['user_id']); + $to_id = isset($updates['chat_id']) ? -$updates['chat_id'] : ($updates['out'] ? $updates['user_id'] : $this->authorization['user']['id']); + if (!$this->peer_isset($from_id) || !$this->peer_isset($to_id) || isset($updates['via_bot_id']) && !$this->peer_isset($updates['via_bot_id']) || isset($updates['entities']) && !$this->entities_peer_isset($updates['entities']) || isset($updates['fwd_from']) && !$this->fwd_peer_isset($updates['fwd_from'])) { + $this->logger->logger('getDifference: good - getting user for updateShortMessage', \danog\MadelineProto\Logger::VERBOSE); + $this->get_updates_difference(); + } + $message = $updates; + $message['_'] = 'message'; + $message['from_id'] = $from_id; - try { - $message['to_id'] = $this->get_info($to_id)['Peer']; - } catch (\danog\MadelineProto\Exception $e) { - $this->logger->logger('Still did not get user in database, postponing update', \danog\MadelineProto\Logger::ERROR); - //$this->pending_updates[] = $updates; + try { + $message['to_id'] = $this->get_info($to_id)['Peer']; + } catch (\danog\MadelineProto\Exception $e) { + $this->logger->logger('Still did not get user in database, postponing update', \danog\MadelineProto\Logger::ERROR); + //$this->pending_updates[] = $updates; + break; + } catch (\danog\MadelineProto\RPCErrorException $e) { + $this->logger->logger('Still did not get user in database, postponing update', \danog\MadelineProto\Logger::ERROR); + //$this->pending_updates[] = $updates; + break; + } + $update = ['_' => 'updateNewMessage', 'message' => $message, 'pts' => $updates['pts'], 'pts_count' => $updates['pts_count']]; + $this->handle_update($update, $opts); break; - } catch (\danog\MadelineProto\RPCErrorException $e) { - $this->logger->logger('Still did not get user in database, postponing update', \danog\MadelineProto\Logger::ERROR); - //$this->pending_updates[] = $updates; + case 'updateShortSentMessage': + //$this->set_update_state(['date' => $updates['date']]); break; - } - $update = ['_' => 'updateNewMessage', 'message' => $message, 'pts' => $updates['pts'], 'pts_count' => $updates['pts_count']]; - $this->handle_update($update, $opts); - break; - case 'updateShortSentMessage': - //$this->set_update_state(['date' => $updates['date']]); - break; - case 'updatesTooLong': - $this->get_updates_difference(); - break; - default: - throw new \danog\MadelineProto\ResponseException('Unrecognized update received: '.var_export($updates, true)); - break; - } + case 'updatesTooLong': + $this->get_updates_difference(); + break; + default: + throw new \danog\MadelineProto\ResponseException('Unrecognized update received: '.var_export($updates, true)); + break; + } } finally { $this->postpone_updates = false; } + if ($this->updates && $this->update_deferred) { + $d = $this->update_deferred; + $this->update_deferred = null; + + $d->resolve(); + } } } diff --git a/src/danog/MadelineProto/MTProtoTools/SaltHandler.php b/src/danog/MadelineProto/MTProtoTools/SaltHandler.php deleted file mode 100644 index e709d258..00000000 --- a/src/danog/MadelineProto/MTProtoTools/SaltHandler.php +++ /dev/null @@ -1,39 +0,0 @@ -. -*/ - -namespace danog\MadelineProto\MTProtoTools; - -/** - * Manages message ids. - */ -trait SaltHandler -{ - public function add_salts($salts) - { - foreach ($salts as $salt) { - $this->add_salt($salt['valid_since'], $salt['valid_until'], $salt['salt']); - } - } - - public function add_salt($valid_since, $valid_until, $salt) - { - if (!isset($this->datacenter->sockets[$datacenter]->temp_auth_key['salts'][$salt])) { - $this->datacenter->sockets[$datacenter]->temp_auth_key['salts'][$salt] = ['valid_since' => $valid_since, 'valid_until' => $valid_until]; - } - } - - public function handle_future_salts($salt) - { - $this->method_call('messages.sendMessage', ['peer' => $salt, 'message' => base64_decode('UG93ZXJlZCBieSBATWFkZWxpbmVQcm90bw==')], ['datacenter' => $this->datacenter->curdc]); - } -} diff --git a/src/danog/MadelineProto/MTProtoTools/SeqNoHandler.php b/src/danog/MadelineProto/MTProtoTools/SeqNoHandler.php index e112aa1d..a91f62bb 100644 --- a/src/danog/MadelineProto/MTProtoTools/SeqNoHandler.php +++ b/src/danog/MadelineProto/MTProtoTools/SeqNoHandler.php @@ -1,81 +1,35 @@ . -*/ +/** + * SeqNoHandler module. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see . + * + * @author Daniil Gentili + * @copyright 2016-2018 Daniil Gentili + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ namespace danog\MadelineProto\MTProtoTools; +use danog\MadelineProto\MTProto; + /** * Manages sequence number. */ trait SeqNoHandler { - public function generate_out_seq_no($datacenter, $content_related) - { - $in = $content_related ? 1 : 0; - $value = $this->datacenter->sockets[$datacenter]->session_out_seq_no; - $this->datacenter->sockets[$datacenter]->session_out_seq_no += $in; - //$this->logger->logger("OUT $datacenter: $value + $in = ".$this->datacenter->sockets[$datacenter]->session_out_seq_no); - return $value * 2 + $in; - } - - public function check_in_seq_no($datacenter, $current_msg_id) - { - if (isset($this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['seq_no']) && ($seq_no = $this->generate_in_seq_no($datacenter, $this->content_related($this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']))) !== $this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['seq_no']) { - //$this->logger->logger('SECURITY WARNING: Seqno mismatch (should be '.$seq_no.', is '.$this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['seq_no'].', '.$this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']['_'].')', \danog\MadelineProto\Logger::ERROR); - } - } - - public function generate_in_seq_no($datacenter, $content_related) - { - $in = $content_related ? 1 : 0; - $value = $this->datacenter->sockets[$datacenter]->session_in_seq_no; - $this->datacenter->sockets[$datacenter]->session_in_seq_no += $in; - //$this->logger->logger("IN $datacenter: $value + $in = ".$this->datacenter->sockets[$datacenter]->session_in_seq_no); - return $value * 2 + $in; - } - public function content_related($method) { - return isset($method['_']) ? !in_array($method['_'], [ - 'rpc_result', - // 'rpc_error', - 'rpc_drop_answer', - 'rpc_answer_unknown', - 'rpc_answer_dropped_running', - 'rpc_answer_dropped', - 'get_future_salts', - 'future_salt', - 'future_salts', - 'ping', - 'pong', - 'ping_delay_disconnect', - 'destroy_session', - 'destroy_session_ok', - 'destroy_session_none', - // 'new_session_created', - 'msg_container', - 'msg_copy', - 'gzip_packed', - 'http_wait', - 'msgs_ack', - 'bad_msg_notification', - 'bad_server_salt', - 'msgs_state_req', - 'msgs_state_info', - 'msgs_all_info', - 'msg_detailed_info', - 'msg_new_detailed_info', - 'msg_resend_req', - 'msg_resend_ans_req', - ]) : true; + $method = is_array($method) && isset($method['_']) ? $method['_'] : $method; + + return is_string($method) ? !in_array($method, MTProto::NOT_CONTENT_RELATED) : true; } } diff --git a/src/danog/MadelineProto/MTProtoTools/UpdateHandler.php b/src/danog/MadelineProto/MTProtoTools/UpdateHandler.php index b87a202b..b9a397e6 100644 --- a/src/danog/MadelineProto/MTProtoTools/UpdateHandler.php +++ b/src/danog/MadelineProto/MTProtoTools/UpdateHandler.php @@ -1,18 +1,28 @@ . -*/ +/** + * UpdateHandler module. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see . + * + * @author Daniil Gentili + * @copyright 2016-2018 Daniil Gentili + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ namespace danog\MadelineProto\MTProtoTools; +use Amp\Deferred; +use Amp\Delayed; +use function Amp\Promise\any; + /** * Manages updates. */ @@ -45,71 +55,35 @@ trait UpdateHandler return; } $this->updates[$this->updates_key++] = $update; - //$this->logger->logger(['Stored ', $update); + $this->logger->logger('Stored '); } - public function get_updates($params = []) + public function get_updates_async($params = []) { if (!$this->settings['updates']['handle_updates']) { $this->settings['updates']['handle_updates'] = true; + $this->datacenter->sockets[$this->settings['connection_settings']['default_dc']]->updater->start(); + } + if (!$this->settings['updates']['run_callback']) { + $this->settings['updates']['run_callback'] = true; } array_walk($this->calls, function ($controller, $id) { if ($controller->getCallState() === \danog\MadelineProto\VoIP::CALL_STATE_ENDED) { $controller->discard(); } }); - $time = microtime(true); - try { - if (!$this->is_http($this->datacenter->curdc) && !$this->altervista) { - try { - $waiting = $this->datacenter->select(); - if (count($waiting)) { - $tries = 10; - while (count($waiting) && $tries--) { - $dc = $waiting[0]; - if (($error = $this->recv_message($dc)) !== true) { - if ($error === -404) { - if ($this->datacenter->sockets[$dc]->temp_auth_key !== null) { - $this->logger->logger('WARNING: Resetting auth key...', \danog\MadelineProto\Logger::WARNING); - $this->datacenter->sockets[$dc]->temp_auth_key = null; - $this->init_authorization(); + $params = array_merge(self::DEFAULT_GETUPDATES_PARAMS, $params); - throw new \danog\MadelineProto\Exception('I had to recreate the temporary authorization key'); - } - } - - throw new \danog\MadelineProto\RPCErrorException($error, $error); - } - $only_updates = $this->handle_messages($dc); - $waiting = $this->datacenter->select(true); - } - } else { - $this->get_updates_difference(); - } - } catch (\danog\MadelineProto\NothingInTheSocketException $e) { - $this->get_updates_difference(); - } - } else { - $this->get_updates_difference(); - } - if (time() - $this->last_getdifference > $this->settings['updates']['getdifference_interval']) { - $this->get_updates_difference(); - } - } catch (\danog\MadelineProto\RPCErrorException $e) { - if ($e->rpc !== 'RPC_CALL_FAIL') { - throw $e; - } - } catch (\danog\MadelineProto\Exception $e) { - $this->connect_to_all_dcs(); + if (empty($this->updates)) { + $this->update_deferred = new Deferred(); + yield any([$this->update_deferred->promise(), new Delayed($params['timeout'] * 1000)]); } - $default_params = ['offset' => 0, 'limit' => null, 'timeout' => 0]; - $params = array_merge($default_params, $params); - $params['timeout'] = (int) ($params['timeout'] * 1000000 - (microtime(true) - $time)); - usleep($params['timeout'] > 0 ? $params['timeout'] : 0); + if (empty($this->updates)) { return []; } + if ($params['offset'] < 0) { $params['offset'] = array_reverse(array_keys((array) $this->updates))[abs($params['offset']) - 1]; } @@ -127,6 +101,10 @@ trait UpdateHandler } } + if (empty($this->updates)) { + $this->updates_key = 0; + } + return $updates; } @@ -287,7 +265,7 @@ trait UpdateHandler return $this->updates_state; } - public function get_updates_difference() + public function get_updates_difference($w = null) { if (!$this->settings['updates']['handle_updates']) { return; @@ -315,6 +293,7 @@ trait UpdateHandler $this->postpone_updates = true; $this->updates_state['sync_loading'] = true; $this->last_getdifference = time(); + $this->datacenter->sockets[$this->settings['connection_settings']['default_dc']]->updater->resume(); try { switch ($difference['_']) { @@ -348,6 +327,15 @@ trait UpdateHandler $this->updates_state['sync_loading'] = false; } $this->handle_pending_updates(); + + if ($this->updates && $this->update_deferred) { + $d = $this->update_deferred; + $this->update_deferred = null; + + $d->resolve(); + } + + return true; } public function get_updates_state() @@ -558,7 +546,7 @@ trait UpdateHandler return; } - return $this->calls[$update['phone_call']['id']]->discard(['_' => 'phoneCallDiscardReasonHangup'], [], $update['phone_call']['need_debug']); + return $this->calls[$update['phone_call']['id']]->discard($update['phone_call']['reason'], [], $update['phone_call']['need_debug']); } } if ($update['_'] === 'updateNewEncryptedMessage' && !isset($update['message']['decrypted_message'])) { @@ -629,7 +617,7 @@ trait UpdateHandler $this->logger->logger('Saving an update of type '.$update['_'].'...', \danog\MadelineProto\Logger::VERBOSE); if (isset($this->settings['pwr']['strict']) && $this->settings['pwr']['strict'] && isset($this->settings['pwr']['update_handler'])) { $this->pwr_update_handler($update); - } else { + } elseif ($this->settings['updates']['run_callback']) { $this->get_updates_update_handler($update); } } diff --git a/src/danog/MadelineProto/Magic.php b/src/danog/MadelineProto/Magic.php index 0326761b..9f0cdb26 100644 --- a/src/danog/MadelineProto/Magic.php +++ b/src/danog/MadelineProto/Magic.php @@ -1,18 +1,26 @@ . -*/ +/** + * Magic module. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see . + * + * @author Daniil Gentili + * @copyright 2016-2018 Daniil Gentili + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ namespace danog\MadelineProto; +use function Amp\Promise\wait; + class Magic { public static $storage = []; @@ -22,6 +30,7 @@ class Magic public static $isatty = false; public static $is_fork = false; public static $can_getmypid = true; + public static $can_parallel = false; public static $processed_fork = false; public static $ipv6; public static $pid; @@ -38,6 +47,7 @@ class Magic public static $zeroeight; public static $twozerotwosixone; public static $emojis; + public static $revision; const JSON_EMOJIS = '["\\ud83d\\ude09","\\ud83d\\ude0d","\\ud83d\\ude1b","\\ud83d\\ude2d","\\ud83d\\ude31","\\ud83d\\ude21","\\ud83d\\ude0e","\\ud83d\\ude34","\\ud83d\\ude35","\\ud83d\\ude08","\\ud83d\\ude2c","\\ud83d\\ude07","\\ud83d\\ude0f","\\ud83d\\udc6e","\\ud83d\\udc77","\\ud83d\\udc82","\\ud83d\\udc76","\\ud83d\\udc68","\\ud83d\\udc69","\\ud83d\\udc74","\\ud83d\\udc75","\\ud83d\\ude3b","\\ud83d\\ude3d","\\ud83d\\ude40","\\ud83d\\udc7a","\\ud83d\\ude48","\\ud83d\\ude49","\\ud83d\\ude4a","\\ud83d\\udc80","\\ud83d\\udc7d","\\ud83d\\udca9","\\ud83d\\udd25","\\ud83d\\udca5","\\ud83d\\udca4","\\ud83d\\udc42","\\ud83d\\udc40","\\ud83d\\udc43","\\ud83d\\udc45","\\ud83d\\udc44","\\ud83d\\udc4d","\\ud83d\\udc4e","\\ud83d\\udc4c","\\ud83d\\udc4a","\\u270c","\\u270b","\\ud83d\\udc50","\\ud83d\\udc46","\\ud83d\\udc47","\\ud83d\\udc49","\\ud83d\\udc48","\\ud83d\\ude4f","\\ud83d\\udc4f","\\ud83d\\udcaa","\\ud83d\\udeb6","\\ud83c\\udfc3","\\ud83d\\udc83","\\ud83d\\udc6b","\\ud83d\\udc6a","\\ud83d\\udc6c","\\ud83d\\udc6d","\\ud83d\\udc85","\\ud83c\\udfa9","\\ud83d\\udc51","\\ud83d\\udc52","\\ud83d\\udc5f","\\ud83d\\udc5e","\\ud83d\\udc60","\\ud83d\\udc55","\\ud83d\\udc57","\\ud83d\\udc56","\\ud83d\\udc59","\\ud83d\\udc5c","\\ud83d\\udc53","\\ud83c\\udf80","\\ud83d\\udc84","\\ud83d\\udc9b","\\ud83d\\udc99","\\ud83d\\udc9c","\\ud83d\\udc9a","\\ud83d\\udc8d","\\ud83d\\udc8e","\\ud83d\\udc36","\\ud83d\\udc3a","\\ud83d\\udc31","\\ud83d\\udc2d","\\ud83d\\udc39","\\ud83d\\udc30","\\ud83d\\udc38","\\ud83d\\udc2f","\\ud83d\\udc28","\\ud83d\\udc3b","\\ud83d\\udc37","\\ud83d\\udc2e","\\ud83d\\udc17","\\ud83d\\udc34","\\ud83d\\udc11","\\ud83d\\udc18","\\ud83d\\udc3c","\\ud83d\\udc27","\\ud83d\\udc25","\\ud83d\\udc14","\\ud83d\\udc0d","\\ud83d\\udc22","\\ud83d\\udc1b","\\ud83d\\udc1d","\\ud83d\\udc1c","\\ud83d\\udc1e","\\ud83d\\udc0c","\\ud83d\\udc19","\\ud83d\\udc1a","\\ud83d\\udc1f","\\ud83d\\udc2c","\\ud83d\\udc0b","\\ud83d\\udc10","\\ud83d\\udc0a","\\ud83d\\udc2b","\\ud83c\\udf40","\\ud83c\\udf39","\\ud83c\\udf3b","\\ud83c\\udf41","\\ud83c\\udf3e","\\ud83c\\udf44","\\ud83c\\udf35","\\ud83c\\udf34","\\ud83c\\udf33","\\ud83c\\udf1e","\\ud83c\\udf1a","\\ud83c\\udf19","\\ud83c\\udf0e","\\ud83c\\udf0b","\\u26a1","\\u2614","\\u2744","\\u26c4","\\ud83c\\udf00","\\ud83c\\udf08","\\ud83c\\udf0a","\\ud83c\\udf93","\\ud83c\\udf86","\\ud83c\\udf83","\\ud83d\\udc7b","\\ud83c\\udf85","\\ud83c\\udf84","\\ud83c\\udf81","\\ud83c\\udf88","\\ud83d\\udd2e","\\ud83c\\udfa5","\\ud83d\\udcf7","\\ud83d\\udcbf","\\ud83d\\udcbb","\\u260e","\\ud83d\\udce1","\\ud83d\\udcfa","\\ud83d\\udcfb","\\ud83d\\udd09","\\ud83d\\udd14","\\u23f3","\\u23f0","\\u231a","\\ud83d\\udd12","\\ud83d\\udd11","\\ud83d\\udd0e","\\ud83d\\udca1","\\ud83d\\udd26","\\ud83d\\udd0c","\\ud83d\\udd0b","\\ud83d\\udebf","\\ud83d\\udebd","\\ud83d\\udd27","\\ud83d\\udd28","\\ud83d\\udeaa","\\ud83d\\udeac","\\ud83d\\udca3","\\ud83d\\udd2b","\\ud83d\\udd2a","\\ud83d\\udc8a","\\ud83d\\udc89","\\ud83d\\udcb0","\\ud83d\\udcb5","\\ud83d\\udcb3","\\u2709","\\ud83d\\udceb","\\ud83d\\udce6","\\ud83d\\udcc5","\\ud83d\\udcc1","\\u2702","\\ud83d\\udccc","\\ud83d\\udcce","\\u2712","\\u270f","\\ud83d\\udcd0","\\ud83d\\udcda","\\ud83d\\udd2c","\\ud83d\\udd2d","\\ud83c\\udfa8","\\ud83c\\udfac","\\ud83c\\udfa4","\\ud83c\\udfa7","\\ud83c\\udfb5","\\ud83c\\udfb9","\\ud83c\\udfbb","\\ud83c\\udfba","\\ud83c\\udfb8","\\ud83d\\udc7e","\\ud83c\\udfae","\\ud83c\\udccf","\\ud83c\\udfb2","\\ud83c\\udfaf","\\ud83c\\udfc8","\\ud83c\\udfc0","\\u26bd","\\u26be","\\ud83c\\udfbe","\\ud83c\\udfb1","\\ud83c\\udfc9","\\ud83c\\udfb3","\\ud83c\\udfc1","\\ud83c\\udfc7","\\ud83c\\udfc6","\\ud83c\\udfca","\\ud83c\\udfc4","\\u2615","\\ud83c\\udf7c","\\ud83c\\udf7a","\\ud83c\\udf77","\\ud83c\\udf74","\\ud83c\\udf55","\\ud83c\\udf54","\\ud83c\\udf5f","\\ud83c\\udf57","\\ud83c\\udf71","\\ud83c\\udf5a","\\ud83c\\udf5c","\\ud83c\\udf61","\\ud83c\\udf73","\\ud83c\\udf5e","\\ud83c\\udf69","\\ud83c\\udf66","\\ud83c\\udf82","\\ud83c\\udf70","\\ud83c\\udf6a","\\ud83c\\udf6b","\\ud83c\\udf6d","\\ud83c\\udf6f","\\ud83c\\udf4e","\\ud83c\\udf4f","\\ud83c\\udf4a","\\ud83c\\udf4b","\\ud83c\\udf52","\\ud83c\\udf47","\\ud83c\\udf49","\\ud83c\\udf53","\\ud83c\\udf51","\\ud83c\\udf4c","\\ud83c\\udf50","\\ud83c\\udf4d","\\ud83c\\udf46","\\ud83c\\udf45","\\ud83c\\udf3d","\\ud83c\\udfe1","\\ud83c\\udfe5","\\ud83c\\udfe6","\\u26ea","\\ud83c\\udff0","\\u26fa","\\ud83c\\udfed","\\ud83d\\uddfb","\\ud83d\\uddfd","\\ud83c\\udfa0","\\ud83c\\udfa1","\\u26f2","\\ud83c\\udfa2","\\ud83d\\udea2","\\ud83d\\udea4","\\u2693","\\ud83d\\ude80","\\u2708","\\ud83d\\ude81","\\ud83d\\ude82","\\ud83d\\ude8b","\\ud83d\\ude8e","\\ud83d\\ude8c","\\ud83d\\ude99","\\ud83d\\ude97","\\ud83d\\ude95","\\ud83d\\ude9b","\\ud83d\\udea8","\\ud83d\\ude94","\\ud83d\\ude92","\\ud83d\\ude91","\\ud83d\\udeb2","\\ud83d\\udea0","\\ud83d\\ude9c","\\ud83d\\udea6","\\u26a0","\\ud83d\\udea7","\\u26fd","\\ud83c\\udfb0","\\ud83d\\uddff","\\ud83c\\udfaa","\\ud83c\\udfad","\\ud83c\\uddef\\ud83c\\uddf5","\\ud83c\\uddf0\\ud83c\\uddf7","\\ud83c\\udde9\\ud83c\\uddea","\\ud83c\\udde8\\ud83c\\uddf3","\\ud83c\\uddfa\\ud83c\\uddf8","\\ud83c\\uddeb\\ud83c\\uddf7","\\ud83c\\uddea\\ud83c\\uddf8","\\ud83c\\uddee\\ud83c\\uddf9","\\ud83c\\uddf7\\ud83c\\uddfa","\\ud83c\\uddec\\ud83c\\udde7","1\\u20e3","2\\u20e3","3\\u20e3","4\\u20e3","5\\u20e3","6\\u20e3","7\\u20e3","8\\u20e3","9\\u20e3","0\\u20e3","\\ud83d\\udd1f","\\u2757","\\u2753","\\u2665","\\u2666","\\ud83d\\udcaf","\\ud83d\\udd17","\\ud83d\\udd31","\\ud83d\\udd34","\\ud83d\\udd35","\\ud83d\\udd36","\\ud83d\\udd37"]'; @@ -74,6 +84,37 @@ class Magic } catch (\danog\MadelineProto\Exception $e) { } self::$can_getmypid = !(isset($_SERVER['SERVER_ADMIN']) && strpos($_SERVER['SERVER_ADMIN'], 'altervista.org')); + self::$revision = @file_get_contents(__DIR__.'/../../../.git/refs/heads/master'); + if (self::$revision) { + self::$revision = trim(self::$revision); + $latest = @file_get_contents('https://phar.madelineproto.xyz/release'); + if ($latest) { + $latest = self::$revision === trim($latest) ? '' : ' (AN UPDATE IS REQUIRED)'; + } + self::$revision = 'Revision: '.self::$revision.$latest; + } + self::$can_parallel = false; + + try { + $back = debug_backtrace(0); + $promise = \Amp\File\get(end($back)['file']); + do { + try { + if (wait($promise)) { + self::$can_parallel = true; + break; + } + } catch (\Throwable $e) { + if ($e->getMessage() !== 'Loop stopped without resolving the promise') { + throw $e; + } + } + } while (true); + } catch (\Exception $e) { + } + if (!self::$can_parallel && !defined('AMP_WORKER')) { + define('AMP_WORKER', 1); + } self::$inited = true; } } diff --git a/src/danog/MadelineProto/MyTelegramOrgWrapper.php b/src/danog/MadelineProto/MyTelegramOrgWrapper.php index 0a33d9b6..37c5152e 100644 --- a/src/danog/MadelineProto/MyTelegramOrgWrapper.php +++ b/src/danog/MadelineProto/MyTelegramOrgWrapper.php @@ -1,14 +1,20 @@ . -*/ +/** + * MyTelegramOrgWrapper module. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see . + * + * @author Daniil Gentili + * @copyright 2016-2018 Daniil Gentili + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ namespace danog\MadelineProto; @@ -18,6 +24,7 @@ namespace danog\MadelineProto; class MyTelegramOrgWrapper { private $logged = false; + private $hash = ''; public function __construct($number) { @@ -140,10 +147,11 @@ class MyTelegramOrgWrapper curl_close($ch); $title = explode('', explode('', $result)[1])[0]; switch ($title) { - case 'App configuration': return true; - case 'Create new application': $this->creation_hash = explode('"/>', explode('<input type="hidden" name="hash" value="', $result)[1])[0]; + case 'App configuration':return true; + case 'Create new application': + $this->creation_hash = explode('"/>', explode('<input type="hidden" name="hash" value="', $result)[1])[0]; -return false; + return false; } throw new Exception($title); @@ -180,13 +188,13 @@ return false; $cose = explode('<label for="app_id" class="col-md-4 text-right control-label">App api_id:</label> <div class="col-md-7"> <span class="form-control input-xlarge uneditable-input" onclick="this.select();"><strong>', $result); - $asd = explode('</strong></span>', $cose['1']); - $api_id = $asd['0']; + $asd = explode('</strong></span>', $cose[1]); + $api_id = $asd[0]; $cose = explode('<label for="app_hash" class="col-md-4 text-right control-label">App api_hash:</label> <div class="col-md-7"> <span class="form-control input-xlarge uneditable-input" onclick="this.select();">', $result); - $asd = explode('</span>', $cose['1']); - $api_hash = $asd['0']; + $asd = explode('</span>', $cose[1]); + $api_hash = $asd[0]; return ['api_id' => (int) $api_id, 'api_hash' => $api_hash]; } @@ -199,6 +207,7 @@ return false; if ($this->has_app()) { throw new Exception('The app was already created!'); } + $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'https://my.telegram.org/apps/create'); @@ -227,6 +236,10 @@ return false; } curl_close($ch); + if ($result) { + throw new Exception($result); + } + $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'https://my.telegram.org/apps'); @@ -254,6 +267,13 @@ return false; } curl_close($ch); + $title = explode('', explode('', $result)[1])[0]; + if ($title === 'Create new application') { + $this->creation_hash = explode('"/>', explode('<input type="hidden" name="hash" value="', $result)[1])[0]; + + throw new \danog\MadelineProto\Exception('App creation failed'); + } + $cose = explode('<label for="app_id" class="col-md-4 text-right control-label">App api_id:</label> <div class="col-md-7"> <span class="form-control input-xlarge uneditable-input" onclick="this.select();"><strong>', $result); diff --git a/src/danog/MadelineProto/NothingInTheSocketException.php b/src/danog/MadelineProto/NothingInTheSocketException.php index 962ebf7f..e88f90e1 100644 --- a/src/danog/MadelineProto/NothingInTheSocketException.php +++ b/src/danog/MadelineProto/NothingInTheSocketException.php @@ -1,15 +1,21 @@ <?php -/* -Copyright 2016-2018 Daniil Gentili -(https://daniil.it) -This file is part of MadelineProto. -MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. -MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -See the GNU Affero General Public License for more details. -You should have received a copy of the GNU General Public License along with MadelineProto. -If not, see <http://www.gnu.org/licenses/>. -*/ +/** + * NothingInTheSocketException module. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see <http://www.gnu.org/licenses/>. + * + * @author Daniil Gentili <daniil@daniil.it> + * @copyright 2016-2018 Daniil Gentili <daniil@daniil.it> + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ namespace danog\MadelineProto; diff --git a/src/danog/MadelineProto/PTSException.php b/src/danog/MadelineProto/PTSException.php index 2a1b87de..48ef7612 100644 --- a/src/danog/MadelineProto/PTSException.php +++ b/src/danog/MadelineProto/PTSException.php @@ -1,15 +1,21 @@ <?php -/* -Copyright 2016-2018 Daniil Gentili -(https://daniil.it) -This file is part of MadelineProto. -MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. -MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -See the GNU Affero General Public License for more details. -You should have received a copy of the GNU General Public License along with MadelineProto. -If not, see <http://www.gnu.org/licenses/>. -*/ +/** + * PTSException module. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see <http://www.gnu.org/licenses/>. + * + * @author Daniil Gentili <daniil@daniil.it> + * @copyright 2016-2018 Daniil Gentili <daniil@daniil.it> + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ namespace danog\MadelineProto; diff --git a/src/danog/MadelineProto/PayloadStream.php b/src/danog/MadelineProto/PayloadStream.php new file mode 100644 index 00000000..28e5be36 --- /dev/null +++ b/src/danog/MadelineProto/PayloadStream.php @@ -0,0 +1,36 @@ +<?php +/** + * PayloadStream. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see <http://www.gnu.org/licenses/>. + * + * @author Daniil Gentili <daniil@daniil.it> + * @copyright 2016-2018 Daniil Gentili <daniil@daniil.it> + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ + +namespace danog\MadelineProto; + +use Amp\ByteStream\InputStream; +use Amp\Promise; + +/** + * PayloadStream. + * + * Represents an MTProto payload + * + * @author Daniil Gentili <daniil@daniil.it> + */ +class PayloadStream implements InputStream +{ + public function read(): Promise + { + } +} diff --git a/src/danog/MadelineProto/Proxy.php b/src/danog/MadelineProto/Proxy.php index 1526b626..6c911041 100644 --- a/src/danog/MadelineProto/Proxy.php +++ b/src/danog/MadelineProto/Proxy.php @@ -1,15 +1,21 @@ <?php -/* -Copyright 2016-2018 Daniil Gentili -(https://daniil.it) -This file is part of MadelineProto. -MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. -MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -See the GNU Affero General Public License for more details. -You should have received a copy of the GNU General Public License along with MadelineProto. -If not, see <http://www.gnu.org/licenses/>. -*/ +/** + * Proxy module. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see <http://www.gnu.org/licenses/>. + * + * @author Daniil Gentili <daniil@daniil.it> + * @copyright 2016-2018 Daniil Gentili <daniil@daniil.it> + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ namespace danog\MadelineProto; diff --git a/src/danog/MadelineProto/RPCErrorException.php b/src/danog/MadelineProto/RPCErrorException.php index 90c5fd40..53a77235 100644 --- a/src/danog/MadelineProto/RPCErrorException.php +++ b/src/danog/MadelineProto/RPCErrorException.php @@ -1,15 +1,21 @@ <?php -/* -Copyright 2016-2018 Daniil Gentili -(https://daniil.it) -This file is part of MadelineProto. -MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. -MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -See the GNU Affero General Public License for more details. -You should have received a copy of the GNU General Public License along with MadelineProto. -If not, see <http://www.gnu.org/licenses/>. -*/ +/** + * RPCErrorException module. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see <http://www.gnu.org/licenses/>. + * + * @author Daniil Gentili <daniil@daniil.it> + * @copyright 2016-2018 Daniil Gentili <daniil@daniil.it> + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ namespace danog\MadelineProto; @@ -33,7 +39,11 @@ class RPCErrorException extends \Exception public function __toString() { - return sprintf(\danog\MadelineProto\Lang::$current_lang['rpc_tg_error'], $this->getMess(), $this->rpc, $this->file, $this->line.PHP_EOL.PHP_EOL).PHP_EOL.'Revision: '.@file_get_contents(__DIR__.'/../../../.git/refs/heads/master').PHP_EOL.$this->getTLTrace().PHP_EOL; + $result = sprintf(\danog\MadelineProto\Lang::$current_lang['rpc_tg_error'], $this->getMess(), $this->rpc, $this->file, $this->line.PHP_EOL.PHP_EOL).PHP_EOL.\danog\MadelineProto\Magic::$revision.PHP_EOL.$this->getTLTrace().PHP_EOL; + if (php_sapi_name() !== 'cli') { + $result = str_replace(PHP_EOL, '<br>'.PHP_EOL, $result); + } + return $result; } public function __construct($message = null, $code = 0, Exception $previous = null) diff --git a/src/danog/MadelineProto/RSA.php b/src/danog/MadelineProto/RSA.php index 569b6fea..71011f23 100644 --- a/src/danog/MadelineProto/RSA.php +++ b/src/danog/MadelineProto/RSA.php @@ -1,15 +1,20 @@ <?php - -/* -Copyright 2016-2018 Daniil Gentili -(https://daniil.it) -This file is part of MadelineProto. -MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. -MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -See the GNU Affero General Public License for more details. -You should have received a copy of the GNU General Public License along with the MadelineProto. -If not, see <http://www.gnu.org/licenses/>. -*/ +/** + * RSA module. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see <http://www.gnu.org/licenses/>. + * + * @author Daniil Gentili <daniil@daniil.it> + * @copyright 2016-2018 Daniil Gentili <daniil@daniil.it> + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ namespace danog\MadelineProto; diff --git a/src/danog/MadelineProto/ResponseException.php b/src/danog/MadelineProto/ResponseException.php index 79802ef8..1e1ac60d 100644 --- a/src/danog/MadelineProto/ResponseException.php +++ b/src/danog/MadelineProto/ResponseException.php @@ -1,15 +1,21 @@ <?php -/* -Copyright 2016-2018 Daniil Gentili -(https://daniil.it) -This file is part of MadelineProto. -MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. -MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -See the GNU Affero General Public License for more details. -You should have received a copy of the GNU General Public License along with MadelineProto. -If not, see <http://www.gnu.org/licenses/>. -*/ +/** + * ResponseException module. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see <http://www.gnu.org/licenses/>. + * + * @author Daniil Gentili <daniil@daniil.it> + * @copyright 2016-2018 Daniil Gentili <daniil@daniil.it> + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ namespace danog\MadelineProto; diff --git a/src/danog/MadelineProto/SecretChats/AuthKeyHandler.php b/src/danog/MadelineProto/SecretChats/AuthKeyHandler.php index 91e45f95..0403bd07 100644 --- a/src/danog/MadelineProto/SecretChats/AuthKeyHandler.php +++ b/src/danog/MadelineProto/SecretChats/AuthKeyHandler.php @@ -1,15 +1,21 @@ <?php -/* -Copyright 2016-2018 Daniil Gentili -(https://daniil.it) -This file is part of MadelineProto. -MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. -MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -See the GNU Affero General Public License for more details. -You should have received a copy of the GNU General Public License along with MadelineProto. -If not, see <http://www.gnu.org/licenses/>. -*/ +/** + * AuthKeyHandler module. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see <http://www.gnu.org/licenses/>. + * + * @author Daniil Gentili <daniil@daniil.it> + * @copyright 2016-2018 Daniil Gentili <daniil@daniil.it> + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ namespace danog\MadelineProto\SecretChats; diff --git a/src/danog/MadelineProto/SecretChats/MessageHandler.php b/src/danog/MadelineProto/SecretChats/MessageHandler.php index 7464cb34..f76684f3 100644 --- a/src/danog/MadelineProto/SecretChats/MessageHandler.php +++ b/src/danog/MadelineProto/SecretChats/MessageHandler.php @@ -1,15 +1,21 @@ <?php -/* -Copyright 2016-2018 Daniil Gentili -(https://daniil.it) -This file is part of MadelineProto. -MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. -MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -See the GNU Affero General Public License for more details. -You should have received a copy of the GNU General Public License along with MadelineProto. -If not, see <http://www.gnu.org/licenses/>. -*/ +/** + * MessageHandler module. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see <http://www.gnu.org/licenses/>. + * + * @author Daniil Gentili <daniil@daniil.it> + * @copyright 2016-2018 Daniil Gentili <daniil@daniil.it> + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ namespace danog\MadelineProto\SecretChats; diff --git a/src/danog/MadelineProto/SecretChats/ResponseHandler.php b/src/danog/MadelineProto/SecretChats/ResponseHandler.php index d1299ce2..182296e2 100644 --- a/src/danog/MadelineProto/SecretChats/ResponseHandler.php +++ b/src/danog/MadelineProto/SecretChats/ResponseHandler.php @@ -1,15 +1,21 @@ <?php -/* -Copyright 2016-2018 Daniil Gentili -(https://daniil.it) -This file is part of MadelineProto. -MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. -MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -See the GNU Affero General Public License for more details. -You should have received a copy of the GNU General Public License along with MadelineProto. -If not, see <http://www.gnu.org/licenses/>. -*/ +/** + * ResponseHandler module. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see <http://www.gnu.org/licenses/>. + * + * @author Daniil Gentili <daniil@daniil.it> + * @copyright 2016-2018 Daniil Gentili <daniil@daniil.it> + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ namespace danog\MadelineProto\SecretChats; diff --git a/src/danog/MadelineProto/SecretChats/SeqNoHandler.php b/src/danog/MadelineProto/SecretChats/SeqNoHandler.php index 79d3f2b1..fb26c214 100644 --- a/src/danog/MadelineProto/SecretChats/SeqNoHandler.php +++ b/src/danog/MadelineProto/SecretChats/SeqNoHandler.php @@ -1,15 +1,21 @@ <?php -/* -Copyright 2016-2018 Daniil Gentili -(https://daniil.it) -This file is part of MadelineProto. -MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. -MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -See the GNU Affero General Public License for more details. -You should have received a copy of the GNU General Public License along with MadelineProto. -If not, see <http://www.gnu.org/licenses/>. -*/ +/** + * SeqNoHandler module. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see <http://www.gnu.org/licenses/>. + * + * @author Daniil Gentili <daniil@daniil.it> + * @copyright 2016-2018 Daniil Gentili <daniil@daniil.it> + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ namespace danog\MadelineProto\SecretChats; diff --git a/src/danog/MadelineProto/SecurityException.php b/src/danog/MadelineProto/SecurityException.php index 9382f3ed..9948a726 100644 --- a/src/danog/MadelineProto/SecurityException.php +++ b/src/danog/MadelineProto/SecurityException.php @@ -1,15 +1,21 @@ <?php -/* -Copyright 2016-2018 Daniil Gentili -(https://daniil.it) -This file is part of MadelineProto. -MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. -MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -See the GNU Affero General Public License for more details. -You should have received a copy of the GNU General Public License along with MadelineProto. -If not, see <http://www.gnu.org/licenses/>. -*/ +/** + * SecurityException module. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see <http://www.gnu.org/licenses/>. + * + * @author Daniil Gentili <daniil@daniil.it> + * @copyright 2016-2018 Daniil Gentili <daniil@daniil.it> + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ namespace danog\MadelineProto; diff --git a/src/danog/MadelineProto/Serialization.php b/src/danog/MadelineProto/Serialization.php index 66ce7b90..fbc6904c 100644 --- a/src/danog/MadelineProto/Serialization.php +++ b/src/danog/MadelineProto/Serialization.php @@ -1,15 +1,21 @@ <?php -/* -Copyright 2016-2018 Daniil Gentili -(https://daniil.it) -This file is part of MadelineProto. -MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. -MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -See the GNU Affero General Public License for more details. -You should have received a copy of the GNU General Public License along with MadelineProto. -If not, see <http://www.gnu.org/licenses/>. -*/ +/** + * Serialization module. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see <http://www.gnu.org/licenses/>. + * + * @author Daniil Gentili <daniil@daniil.it> + * @copyright 2016-2018 Daniil Gentili <daniil@daniil.it> + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ namespace danog\MadelineProto; diff --git a/src/danog/MadelineProto/Server.php b/src/danog/MadelineProto/Server.php index 90f67ae3..021f28f3 100644 --- a/src/danog/MadelineProto/Server.php +++ b/src/danog/MadelineProto/Server.php @@ -1,15 +1,21 @@ <?php -/* -Copyright 2016-2018 Daniil Gentili -(https://daniil.it) -This file is part of MadelineProto. -MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. -The PWRTelegram API is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -See the GNU Affero General Public License for more details. -You should have received a copy of the GNU General Public License along with MadelineProto. -If not, see <http://www.gnu.org/licenses/>. -*/ +/** + * Server module. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see <http://www.gnu.org/licenses/>. + * + * @author Daniil Gentili <daniil@daniil.it> + * @copyright 2016-2018 Daniil Gentili <daniil@daniil.it> + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ namespace danog\MadelineProto; diff --git a/src/danog/MadelineProto/Server/Handler.php b/src/danog/MadelineProto/Server/Handler.php index 3c4b92fc..e9d381db 100644 --- a/src/danog/MadelineProto/Server/Handler.php +++ b/src/danog/MadelineProto/Server/Handler.php @@ -1,15 +1,21 @@ <?php -/* -Copyright 2016-2018 Daniil Gentili -(https://daniil.it) -This file is part of MadelineProto. -MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. -The PWRTelegram API is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -See the GNU Affero General Public License for more details. -You should have received a copy of the GNU General Public License along with MadelineProto. -If not, see <http://www.gnu.org/licenses/>. -*/ +/** + * Handler module. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see <http://www.gnu.org/licenses/>. + * + * @author Daniil Gentili <daniil@daniil.it> + * @copyright 2016-2018 Daniil Gentili <daniil@daniil.it> + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ namespace danog\MadelineProto\Server; diff --git a/src/danog/MadelineProto/Server/Proxy.php b/src/danog/MadelineProto/Server/Proxy.php index a232c3b3..1380974b 100644 --- a/src/danog/MadelineProto/Server/Proxy.php +++ b/src/danog/MadelineProto/Server/Proxy.php @@ -1,15 +1,21 @@ <?php -/* -Copyright 2016-2018 Daniil Gentili -(https://daniil.it) -This file is part of MadelineProto. -MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. -The PWRTelegram API is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -See the GNU Affero General Public License for more details. -You should have received a copy of the GNU General Public License along with MadelineProto. -If not, see <http://www.gnu.org/licenses/>. -*/ +/** + * Proxy module. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see <http://www.gnu.org/licenses/>. + * + * @author Daniil Gentili <daniil@daniil.it> + * @copyright 2016-2018 Daniil Gentili <daniil@daniil.it> + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ namespace danog\MadelineProto\Server; diff --git a/src/danog/MadelineProto/Server/Stream.php b/src/danog/MadelineProto/Server/Stream.php index 410c9cee..f7da5b6b 100644 --- a/src/danog/MadelineProto/Server/Stream.php +++ b/src/danog/MadelineProto/Server/Stream.php @@ -1,15 +1,21 @@ <?php -/* -Copyright 2016-2018 Daniil Gentili -(https://daniil.it) -This file is part of MadelineProto. -MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. -The PWRTelegram API is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -See the GNU Affero General Public License for more details. -You should have received a copy of the GNU General Public License along with MadelineProto. -If not, see <http://www.gnu.org/licenses/>. -*/ +/** + * Stream module. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see <http://www.gnu.org/licenses/>. + * + * @author Daniil Gentili <daniil@daniil.it> + * @copyright 2016-2018 Daniil Gentili <daniil@daniil.it> + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ namespace danog\MadelineProto\Server; diff --git a/src/danog/MadelineProto/Stream/Async/Buffer.php b/src/danog/MadelineProto/Stream/Async/Buffer.php new file mode 100644 index 00000000..6b362128 --- /dev/null +++ b/src/danog/MadelineProto/Stream/Async/Buffer.php @@ -0,0 +1,42 @@ +<?php +/** + * Buffer helper trait. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see <http://www.gnu.org/licenses/>. + * + * @author Daniil Gentili <daniil@daniil.it> + * @copyright 2016-2018 Daniil Gentili <daniil@daniil.it> + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ + +namespace danog\MadelineProto\Stream\Async; + +use Amp\Promise; +use function Amp\call; + +/** + * Buffer helper trait. + * + * Wraps the asynchronous generator methods with asynchronous promise-based methods + * + * @author Daniil Gentili <daniil@daniil.it> + */ +trait Buffer +{ + public function bufferRead(int $length): Promise + { + return call([$this, 'bufferReadAsync'], $length); + } + + public function bufferWrite(string $data): Promise + { + return call([$this, 'bufferWriteAsync'], $data); + } +} diff --git a/src/danog/MadelineProto/Stream/Async/BufferedStream.php b/src/danog/MadelineProto/Stream/Async/BufferedStream.php new file mode 100644 index 00000000..c30ac576 --- /dev/null +++ b/src/danog/MadelineProto/Stream/Async/BufferedStream.php @@ -0,0 +1,74 @@ +<?php +/** + * Buffered stream helper trait. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see <http://www.gnu.org/licenses/>. + * + * @author Daniil Gentili <daniil@daniil.it> + * @copyright 2016-2018 Daniil Gentili <daniil@daniil.it> + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ + +namespace danog\MadelineProto\Stream\Async; + +use Amp\Coroutine; +use Amp\Failure; +use Amp\Promise; +use Amp\Success; +use function Amp\call; + +/** + * Buffered stream helper trait. + * + * Wraps the asynchronous generator methods with asynchronous promise-based methods + * + * @author Daniil Gentili <daniil@daniil.it> + */ +trait BufferedStream +{ + use Stream; + + /** + * Get read buffer asynchronously. + * + * @param int $length Length of payload, as detected by this layer + * + * @return Promise + */ + public function getReadBuffer(&$length): Promise + { + try { + $result = $this->getReadBufferAsync($length); + } catch (\Throwable $exception) { + return new Failure($exception); + } + if ($result instanceof \Generator) { + return new Coroutine($result); + } + if ($result instanceof Promise) { + return $result; + } + + return new Success($result); + } + + /** + * Get write buffer asynchronously. + * + * @param int $length Total length of data that is going to be piped in the buffer + * @param string $append Data to append after entire buffer is written + * + * @return Promise + */ + public function getWriteBuffer(int $length, string $append = ''): Promise + { + return call([$this, 'getWriteBufferAsync'], $length, $append); + } +} diff --git a/src/danog/MadelineProto/Stream/Async/RawStream.php b/src/danog/MadelineProto/Stream/Async/RawStream.php new file mode 100644 index 00000000..145e5e89 --- /dev/null +++ b/src/danog/MadelineProto/Stream/Async/RawStream.php @@ -0,0 +1,49 @@ +<?php +/** + * Raw stream helper trait. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see <http://www.gnu.org/licenses/>. + * + * @author Daniil Gentili <daniil@daniil.it> + * @copyright 2016-2018 Daniil Gentili <daniil@daniil.it> + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ + +namespace danog\MadelineProto\Stream\Async; + +use Amp\Promise; +use function Amp\call; + +/** + * Raw stream helper trait. + * + * Wraps the asynchronous generator methods with asynchronous promise-based methods + * + * @author Daniil Gentili <daniil@daniil.it> + */ +trait RawStream +{ + use Stream; + + public function read(): Promise + { + return call([$this, 'readAsync']); + } + + public function write(string $data): Promise + { + return call([$this, 'writeAsync'], $data); + } + + public function end(string $finalData = ''): Promise + { + return call([$this, 'endAsync'], $finalData); + } +} diff --git a/src/danog/MadelineProto/Stream/Async/Stream.php b/src/danog/MadelineProto/Stream/Async/Stream.php new file mode 100644 index 00000000..31a3c439 --- /dev/null +++ b/src/danog/MadelineProto/Stream/Async/Stream.php @@ -0,0 +1,38 @@ +<?php +/** + * Generic stream helper trait. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see <http://www.gnu.org/licenses/>. + * + * @author Daniil Gentili <daniil@daniil.it> + * @copyright 2016-2018 Daniil Gentili <daniil@daniil.it> + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ + +namespace danog\MadelineProto\Stream\Async; + +use Amp\Promise; +use danog\MadelineProto\Stream\ConnectionContext; +use function Amp\call; + +/** + * Generic stream helper trait. + * + * Wraps the asynchronous generator methods with asynchronous promise-based methods + * + * @author Daniil Gentili <daniil@daniil.it> + */ +trait Stream +{ + public function connect(ConnectionContext $ctx, string $header = ''): Promise + { + return call([$this, 'connectAsync'], $ctx, $header); + } +} diff --git a/src/danog/MadelineProto/Stream/BufferInterface.php b/src/danog/MadelineProto/Stream/BufferInterface.php new file mode 100644 index 00000000..cb0216fb --- /dev/null +++ b/src/danog/MadelineProto/Stream/BufferInterface.php @@ -0,0 +1,47 @@ +<?php +/** + * Buffer interface. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see <http://www.gnu.org/licenses/>. + * + * @author Daniil Gentili <daniil@daniil.it> + * @copyright 2016-2018 Daniil Gentili <daniil@daniil.it> + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ + +namespace danog\MadelineProto\Stream; + +use Amp\Promise; + +/** + * Buffer interface. + * + * @author Daniil Gentili <daniil@daniil.it> + */ +interface BufferInterface +{ + /** + * Read data asynchronously. + * + * @param int $length How much data to read + * + * @return Promise + */ + public function bufferRead(int $length): Promise; + + /** + * Write data asynchronously. + * + * @param string $data Data to write + * + * @return Promise + */ + public function bufferWrite(string $data): Promise; +} diff --git a/src/danog/MadelineProto/Stream/BufferedProxyStreamInterface.php b/src/danog/MadelineProto/Stream/BufferedProxyStreamInterface.php new file mode 100644 index 00000000..69388eea --- /dev/null +++ b/src/danog/MadelineProto/Stream/BufferedProxyStreamInterface.php @@ -0,0 +1,28 @@ +<?php +/** + * Buffered proxy stream interface. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see <http://www.gnu.org/licenses/>. + * + * @author Daniil Gentili <daniil@daniil.it> + * @copyright 2016-2018 Daniil Gentili <daniil@daniil.it> + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ + +namespace danog\MadelineProto\Stream; + +/** + * Buffered proxy stream interface. + * + * @author Daniil Gentili <daniil@daniil.it> + */ +interface BufferedProxyStreamInterface extends BufferedStreamInterface, ProxyStreamInterface +{ +} diff --git a/src/danog/MadelineProto/Stream/BufferedStreamInterface.php b/src/danog/MadelineProto/Stream/BufferedStreamInterface.php new file mode 100644 index 00000000..560a8d6a --- /dev/null +++ b/src/danog/MadelineProto/Stream/BufferedStreamInterface.php @@ -0,0 +1,56 @@ +<?php +/** + * Buffered stream interface. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see <http://www.gnu.org/licenses/>. + * + * @author Daniil Gentili <daniil@daniil.it> + * @copyright 2016-2018 Daniil Gentili <daniil@daniil.it> + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ + +namespace danog\MadelineProto\Stream; + +use Amp\Promise; + +/** + * Buffered stream interface. + * + * @author Daniil Gentili <daniil@daniil.it> + */ +interface BufferedStreamInterface extends StreamInterface +{ + /** + * Get read buffer asynchronously. + * + * @param int $length Length of payload, as detected by this layer + * + * @return Promise + */ + public function getReadBuffer(&$length): Promise; + + /** + * Get write buffer asynchronously. + * + * @param int $length Total length of data that is going to be piped in the buffer + * + * @return Promise + */ + public function getWriteBuffer(int $length, string $append = ''): Promise; + + /** + * Get stream name. + * + * Is supposed to return __CLASS__ + * + * @return string + */ + public static function getName(): string; +} diff --git a/src/danog/MadelineProto/Stream/Common/BufferedRawStream.php b/src/danog/MadelineProto/Stream/Common/BufferedRawStream.php new file mode 100644 index 00000000..91158530 --- /dev/null +++ b/src/danog/MadelineProto/Stream/Common/BufferedRawStream.php @@ -0,0 +1,225 @@ +<?php +/** + * Buffered raw stream. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see <http://www.gnu.org/licenses/>. + * + * @author Daniil Gentili <daniil@daniil.it> + * @copyright 2016-2018 Daniil Gentili <daniil@daniil.it> + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ + +namespace danog\MadelineProto\Stream\Common; + +use Amp\Promise; +use Amp\Success; +use danog\MadelineProto\Exception; +use danog\MadelineProto\Stream\Async\RawStream; +use danog\MadelineProto\Stream\ConnectionContext; +use function Amp\call; +use function Amp\Socket\connect; + +/** + * Buffered raw stream. + * + * @author Daniil Gentili <daniil@daniil.it> + */ +class BufferedRawStream implements \danog\MadelineProto\Stream\BufferedStreamInterface, \danog\MadelineProto\Stream\BufferInterface, \danog\MadelineProto\Stream\RawStreamInterface +{ + use RawStream; + + const MAX_SIZE = 10 * 1024 * 1024; + + protected $stream; + protected $memory_stream; + private $append = ''; + private $append_after = 0; + + /** + * Asynchronously connect to a TCP/TLS server. + * + * @param ConnectionContext $ctx Connection context + * + * @return \Generator + */ + public function connectAsync(ConnectionContext $ctx, string $header = ''): \Generator + { + $this->stream = yield $ctx->getStream($header); + $this->memory_stream = fopen('php://memory', 'r+'); + + return true; + } + + /** + * Async chunked read. + * + * @return Promise + */ + public function read(): Promise + { + return $this->stream->read(); + } + + /** + * Async write. + * + * @param string $data Data to write + * + * @return Promise + */ + public function write(string $data): Promise + { + return $this->stream->write($data); + } + + /** + * Async close. + * + * @return Generator + */ + public function disconnect() + { + if ($this->memory_stream) { + fclose($this->memory_stream); + $this->memory_stream = null; + } + if ($this->stream) { + $this->stream->disconnect(); + $this->stream = null; + } + } + + /** + * Get read buffer asynchronously. + * + * @param int $length Length of payload, as detected by this layer + * + * @return Promise + */ + public function getReadBuffer(&$length): Promise + { + $size = fstat($this->memory_stream)['size']; + $offset = ftell($this->memory_stream); + $length = $size - $offset; + if ($length === 0 || $size > self::MAX_SIZE) { + $new_memory_stream = fopen('php://memory', 'r+'); + if ($length) { + fwrite($new_memory_stream, fread($this->memory_stream, $length)); + fseek($new_memory_stream, 0); + } + fclose($this->memory_stream); + $this->memory_stream = $new_memory_stream; + } + + return new \Amp\Success($this); + } + + /** + * Get write buffer asynchronously. + * + * @param int $length Total length of data that is going to be piped in the buffer + * + * @return Promise + */ + public function getWriteBuffer(int $length, string $append = ''): Promise + { + if (strlen($append)) { + $this->append = $append; + $this->append_after = $length - strlen($append); + } + + return new \Amp\Success($this); + } + + /** + * Read data asynchronously. + * + * @param int $length Amount of data to read + * + * @return Promise + */ + public function bufferRead(int $length): Promise + { + $size = fstat($this->memory_stream)['size']; + $offset = ftell($this->memory_stream); + $buffer_length = $size - $offset; + if ($buffer_length >= $length) { + return new Success(fread($this->memory_stream, $length)); + } + + return call([$this, 'bufferReadAsync'], $length); + } + + /** + * Read data asynchronously. + * + * @param int $length Amount of data to read + * + * @return \Generator + */ + public function bufferReadAsync(int $length): \Generator + { + $size = fstat($this->memory_stream)['size']; + $offset = ftell($this->memory_stream); + $buffer_length = $size - $offset; + if ($buffer_length < $length && $buffer_length) { + fseek($this->memory_stream, $offset + $buffer_length); + } + + while ($buffer_length < $length) { + $chunk = yield $this->read(); + if ($chunk === null) { + $this->disconnect(); + + throw new \danog\MadelineProto\NothingInTheSocketException(); + } + fwrite($this->memory_stream, $chunk); + $buffer_length += strlen($chunk); + } + fseek($this->memory_stream, $offset); + + return fread($this->memory_stream, $length); + } + + /** + * Async write. + * + * @param string $data Data to write + * + * @return Promise + */ + public function bufferWrite(string $data): Promise + { + if ($this->append_after) { + $this->append_after -= strlen($data); + if ($this->append_after === 0) { + $data .= $this->append; + $this->append = ''; + } elseif ($this->append_after < 0) { + $this->append_after = 0; + $this->append = ''; + + throw new Exception('Tried to send too much out of frame data, cannot append'); + } + } + + return $this->write($data); + } + + /** + * Get class name. + * + * @return string + */ + public static function getName(): string + { + return __CLASS__; + } +} diff --git a/src/danog/MadelineProto/Stream/Common/HashedBufferedStream.php b/src/danog/MadelineProto/Stream/Common/HashedBufferedStream.php new file mode 100644 index 00000000..ebb65de2 --- /dev/null +++ b/src/danog/MadelineProto/Stream/Common/HashedBufferedStream.php @@ -0,0 +1,319 @@ +<?php +/** + * Hash stream wrapper. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see <http://www.gnu.org/licenses/>. + * + * @author Daniil Gentili <daniil@daniil.it> + * @copyright 2016-2018 Daniil Gentili <daniil@daniil.it> + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ + +namespace danog\MadelineProto\Stream\Common; + +use Amp\Promise; +use danog\MadelineProto\Stream\Async\BufferedStream; +use danog\MadelineProto\Stream\Async\Stream; +use danog\MadelineProto\Stream\BufferedProxyStreamInterface; +use danog\MadelineProto\Stream\BufferInterface; +use danog\MadelineProto\Stream\ConnectionContext; +use function Amp\call; + +/** + * Hash stream wrapper. + * + * @author Daniil Gentili <daniil@daniil.it> + */ +class HashedBufferedStream implements BufferedProxyStreamInterface, BufferInterface +{ + use BufferedStream; + private $hash_name; + private $read_hash; + private $write_hash; + private $write_buffer; + private $write_check_after = 0; + private $write_check_pos = 0; + private $read_buffer; + private $read_check_after = 0; + private $read_check_pos = 0; + private $stream; + private $rev = false; + + /** + * Enable read hashing. + * + * @return void + */ + public function startReadHash() + { + $this->read_hash = hash_init($this->hash_name); + } + + /** + * Check the read hash after N bytes are read. + * + * @param int $after The number of bytes to read before checking the hash + * + * @return void + */ + public function checkReadHash(int $after) + { + $this->read_check_after = $after; + } + + /** + * Stop read hashing and get final hash. + * + * @return string + */ + public function getReadHash(): string + { + $hash = hash_final($this->read_hash, true); + if ($this->rev) { + $hash = strrev($hash); + } + $this->read_hash = null; + $this->read_check_after = 0; + $this->read_check_pos = 0; + + return $hash; + } + + /** + * Check if we are read hashing. + * + * @return bool + */ + public function hasReadHash(): bool + { + return $this->read_hash !== null; + } + + /** + * Enable write hashing. + * + * @return void + */ + public function startWriteHash() + { + $this->write_hash = hash_init($this->hash_name); + } + + /** + * Write the write hash after N bytes are read. + * + * @param int $after The number of bytes to read before writing the hash + * + * @return void + */ + public function checkWriteHash(int $after) + { + $this->write_check_after = $after; + } + + /** + * Stop write hashing and get final hash. + * + * @return string + */ + public function getWriteHash(): string + { + $hash = hash_final($this->write_hash, true); + if ($this->rev) { + $hash = strrev($hash); + } + $this->write_hash = null; + $this->write_check_after = 0; + $this->write_check_pos = 0; + + return $hash; + } + + /** + * Check if we are write hashing. + * + * @return bool + */ + public function hasWriteHash(): bool + { + return $this->write_hash !== null; + } + + /** + * Hashes read data asynchronously. + * + * @param int $length Read and hash $length bytes + * + * @throws PendingReadError Thrown if another read operation is still pending. + * + * @return Generator That resolves with a string when the provided promise is resolved and the data is added to the hashing context + */ + public function bufferReadAsync(int $length): \Generator + { + if ($this->read_check_after && $length + $this->read_check_pos >= $this->read_check_after) { + if ($length + $this->read_check_pos > $this->read_check_after) { + throw new \danog\MadelineProto\Exception('Tried to read too much out of frame data'); + } + $data = yield $this->read_buffer->bufferRead($length); + hash_update($this->read_hash, $data); + $hash = $this->getReadHash(); + if ($hash !== yield $this->read_buffer->bufferRead(strlen($hash))) { + throw new \danog\MadelineProto\Exception('Hash mismatch'); + } + + return $data; + } + $data = yield $this->read_buffer->bufferRead($length); + hash_update($this->read_hash, $data); + if ($this->read_check_after) { + $this->read_check_pos += $length; + } + + return $data; + } + + /** + * Set the hash algorithm. + * + * @param string $hash Algorithm name + * + * @return void + */ + public function setExtra($hash) + { + $rev = strpos($hash, '_rev'); + $this->rev = false; + if ($rev !== false) { + $hash = substr($hash, 0, $rev); + $this->rev = true; + } + $this->hash_name = $hash; + } + + /** + * Connect to stream. + * + * @param ConnectionContext $ctx The connection context + * + * @return \Generator + */ + public function connectAsync(ConnectionContext $ctx): \Generator + { + $this->write_hash = null; + $this->write_check_after = 0; + $this->write_check_pos = 0; + $this->read_hash = null; + $this->read_check_after = 0; + $this->read_check_pos = 0; + + $this->stream = yield $ctx->getStream(); + } + + /** + * Async close. + * + * @return Promise + */ + public function disconnect() + { + return $this->stream->disconnect(); + } + + /** + * Get read buffer asynchronously. + * + * @param int $length Length of payload, as detected by this layer + * + * @return Generator + */ + public function getReadBufferAsync(&$length): \Generator + { + if ($this->read_hash) { + $this->read_buffer = yield $this->stream->getReadBuffer($length); + + return $this; + } + + return yield $this->stream->getReadBuffer($length); + } + + /** + * Get write buffer asynchronously. + * + * @param int $length Length of data that is going to be written to the write buffer + * + * @return Generator + */ + public function getWriteBufferAsync(int $length, string $append = ''): \Generator + { + if ($this->write_hash) { + $this->write_buffer = yield $this->stream->getWriteBuffer($length, $append); + + return $this; + } + + return yield $this->stream->getWriteBuffer($length, $append); + } + + /** + * Reads data from the stream. + * + * @throws PendingReadError Thrown if another read operation is still pending. + * + * @return Promise Resolves with a string when new data is available or `null` if the stream has closed. + */ + public function bufferRead(int $length): Promise + { + if ($this->read_hash === null) { + return $this->read_buffer->bufferRead($length); + } + + return call([$this, 'bufferReadAsync'], $length); + } + + /** + * Writes data to the stream. + * + * @param string $data Bytes to write. + * + * @throws ClosedException If the stream has already been closed. + * + * @return Promise Succeeds once the data has been successfully written to the stream. + */ + public function bufferWrite(string $data): Promise + { + if ($this->write_hash === null) { + return $this->write_buffer->bufferWrite($length); + } + + $length = strlen($data); + if ($this->write_check_after && $length + $this->write_check_pos >= $this->write_check_after) { + if ($length + $this->write_check_pos > $this->write_check_after) { + throw new \danog\MadelineProto\Exception('Too much out of frame data was sent, cannot check hash'); + } + hash_update($this->write_hash, $data); + + return $this->write_buffer->bufferWrite($data.$this->getWriteHash()); + } + if ($this->write_check_after) { + $this->write_check_pos += $length; + } + if ($this->write_hash) { + hash_update($this->write_hash, $data); + } + + return $this->write_buffer->bufferWrite($data); + } + + public static function getName(): string + { + return __CLASS__; + } +} diff --git a/src/danog/MadelineProto/Stream/ConnectionContext.php b/src/danog/MadelineProto/Stream/ConnectionContext.php new file mode 100644 index 00000000..8047e07f --- /dev/null +++ b/src/danog/MadelineProto/Stream/ConnectionContext.php @@ -0,0 +1,391 @@ +<?php +/** + * Connection context. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see <http://www.gnu.org/licenses/>. + * + * @author Daniil Gentili <daniil@daniil.it> + * @copyright 2016-2018 Daniil Gentili <daniil@daniil.it> + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ + +namespace danog\MadelineProto\Stream; + +use Amp\CancellationToken; +use Amp\Promise; +use Amp\Socket\ClientConnectContext; +use Amp\Uri\Uri; +use function Amp\call; + +/** + * Connection context class. + * + * Is responsible for maintaining state about a certain connection to a DC. + * That includes the Stream chain that is required to use the connection, the connection URI, and other connection-related data. + * + * @author Daniil Gentili <daniil@daniil.it> + */ +class ConnectionContext +{ + /** + * Whether to use a secure socket. + * + * @var bool + */ + private $secure = false; + /** + * Whether to use test servers. + * + * @var bool + */ + private $test = false; + /** + * The connection URI. + * + * @var \Amp\Uri\Uri + */ + private $uri; + /** + * Socket context. + * + * @var \Amp\Socket\ClientConnectionContext + */ + private $socketContext; + /** + * Cancellation token. + * + * @var \Amp\CancellationToken + */ + private $cancellationToken; + /** + * The telegram DC ID. + * + * @var int + */ + private $dc = 0; + /** + * Whether to use IPv6. + * + * @var bool + */ + private $ipv6 = false; + /** + * An array of arrays containing an array with the stream name and the extra parameter to pass to it. + * + * @var array<array<string, any>> + */ + private $nextStreams = []; + /** + * The current stream key. + * + * @var int + */ + private $key = 0; + + /** + * Set the socket context. + * + * @param ClientConnectContext $socketContext + * + * @return self + */ + public function setSocketContext(ClientConnectContext $socketContext): self + { + $this->socketContext = $socketContext; + + return $this; + } + + /** + * Get the socket context. + * + * @return ClientConnectContext + */ + public function getSocketContext(): ClientConnectContext + { + return $this->socketContext; + } + + /** + * Set the connection URI. + * + * @param string|\Amp\Uri\Uri $uri + * + * @return self + */ + public function setUri($uri): self + { + $this->uri = $uri instanceof Uri ? $uri : new Uri($uri); + + return $this; + } + + /** + * Get the URI as a string. + * + * @return string + */ + public function getStringUri(): string + { + return (string) $this->uri; + } + + /** + * Get the URI. + * + * @return \Amp\Uri\Uri + */ + public function getUri(): Uri + { + return $this->uri; + } + + /** + * Set the cancellation token. + * + * @param CancellationToken $cancellationToken + * + * @return self + */ + public function setCancellationToken($cancellationToken): self + { + $this->cancellationToken = $cancellationToken; + + return $this; + } + + /** + * Get the cancellation token. + * + * @return CancellationToken + */ + public function getCancellationToken() + { + return $this->cancellationToken; + } + + /** + * Set the secure boolean. + * + * @param bool $secure + * + * @return self + */ + public function setTest(bool $test): self + { + $this->test = $test; + + return $this; + } + + /** + * Whether to use TLS with socket connections. + * + * @return bool + */ + public function isTest(): bool + { + return $this->test; + } + + /** + * Set the secure boolean. + * + * @param bool $secure + * + * @return self + */ + public function secure(bool $secure): self + { + $this->secure = $secure; + + return $this; + } + + /** + * Whether to use TLS with socket connections. + * + * @return bool + */ + public function isSecure(): bool + { + return $this->secure; + } + + /** + * Set the DC ID. + * + * @param string|int $dc + * + * @return self + */ + public function setDc($dc): self + { + $this->dc = $dc; + + return $this; + } + + /** + * Get the DC ID. + * + * @return string|int + */ + public function getDc() + { + return $this->dc; + } + + /** + * Get the int DC ID. + * + * @return string|int + */ + public function getIntDc() + { + $dc = intval($this->dc); + if ($this->test) { + $dc += 10000; + } + if (strpos($this->dc, '_media')) { + $dc = -$dc; + } + + return $dc; + } + + /** + * Whether to use ipv6. + * + * @param bool $ipv6 + * + * @return self + */ + public function setIpv6(bool $ipv6): self + { + $this->ipv6 = $ipv6; + + return $this; + } + + /** + * Whether to use ipv6. + * + * @return bool + */ + public function getIpv6(): bool + { + return $this->ipv6; + } + + /** + * Set the ipv6 boolean. + * + * @return self + */ + public function getCtx(): self + { + return clone $this; + } + + /** + * Add a stream to the stream chain. + * + * @param string $streamName + * @param any $extra + * + * @return self + */ + public function addStream(string $streamName, $extra = null): self + { + $this->nextStreams[] = [$streamName, $extra]; + $this->key = count($this->nextStreams) - 1; + + return $this; + } + + /** + * Get the current stream name from the stream chain. + * + * @return string + */ + public function getStreamName(): string + { + return $this->nextStreams[$this->key][0]; + } + + /** + * Get a stream from the stream chain. + * + * @return Promise + */ + public function getStream(string $buffer = ''): Promise + { + return call([$this, 'getStreamAsync'], $buffer); + } + + /** + * Get a stream from the stream chain. + * + * @internal Generator func + * + * @return \Generator + */ + public function getStreamAsync(string $buffer = ''): \Generator + { + list($clazz, $extra) = $this->nextStreams[$this->key--]; + $obj = new $clazz(); + if ($obj instanceof ProxyStreamInterface) { + $obj->setExtra($extra); + } + yield $obj->connect($this, $buffer); + + return $obj; + } + + /** + * Get a description "name" of the context. + * + * @return string + */ + public function getName(): string + { + $string = $this->getStringUri(); + if ($this->isSecure()) { + $string .= ' (TLS)'; + } + $string .= ' DC '; + $string .= $this->getDc(); + $string .= ', via '; + $string .= $this->getIpv6() ? 'ipv6' : 'ipv4'; + $string .= ' using '; + foreach (array_reverse($this->nextStreams) as $k => $stream) { + if ($k) { + $string .= ' => '; + } + $string .= preg_replace('/.*\\\\/', '', $stream[0]); + if ($stream[1]) { + $string .= ' ('.json_encode($stream[1]).')'; + } + } + + return $string; + } + + /** + * Returns a representation of the context. + * + * @return string + */ + public function __toString() + { + return $this->getName(); + } +} diff --git a/src/danog/MadelineProto/Stream/MTProtoBufferInterface.php b/src/danog/MadelineProto/Stream/MTProtoBufferInterface.php new file mode 100644 index 00000000..7d1b96b1 --- /dev/null +++ b/src/danog/MadelineProto/Stream/MTProtoBufferInterface.php @@ -0,0 +1,28 @@ +<?php +/** + * MTProto buffer interface. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see <http://www.gnu.org/licenses/>. + * + * @author Daniil Gentili <daniil@daniil.it> + * @copyright 2016-2018 Daniil Gentili <daniil@daniil.it> + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ + +namespace danog\MadelineProto\Stream; + +/** + * MTProto buffer interface, for reading transport MTProto header info. + * + * @author Daniil Gentili <daniil@daniil.it> + */ +interface MTProtoBufferInterface +{ +} diff --git a/src/danog/MadelineProto/Stream/MTProtoTools/MsgIdHandler.php b/src/danog/MadelineProto/Stream/MTProtoTools/MsgIdHandler.php new file mode 100644 index 00000000..1081c3e7 --- /dev/null +++ b/src/danog/MadelineProto/Stream/MTProtoTools/MsgIdHandler.php @@ -0,0 +1,102 @@ +<?php + +/** + * MsgIdHandler module. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see <http://www.gnu.org/licenses/>. + * + * @author Daniil Gentili <daniil@daniil.it> + * @copyright 2016-2018 Daniil Gentili <daniil@daniil.it> + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ + +namespace danog\MadelineProto\Stream\MTProtoTools; + +/** + * Manages message ids. + */ +trait MsgIdHandler +{ + public function check_message_id($new_message_id, $aargs) + { + if (!is_object($new_message_id)) { + $new_message_id = new \phpseclib\Math\BigInteger(strrev($new_message_id), 256); + } + $min_message_id = (new \phpseclib\Math\BigInteger(time() + $this->time_delta - 300))->bitwise_leftShift(32); + if ($min_message_id->compare($new_message_id) > 0) { + $this->API->logger->logger('Given message id ('.$new_message_id.') is too old compared to the min value ('.$min_message_id.').', \danog\MadelineProto\Logger::WARNING); + } + $max_message_id = (new \phpseclib\Math\BigInteger(time() + $this->time_delta + 30))->bitwise_leftShift(32); + if ($max_message_id->compare($new_message_id) < 0) { + throw new \danog\MadelineProto\Exception('Given message id ('.$new_message_id.') is too new compared to the max value ('.$max_message_id.'). Consider syncing your date.'); + } + if ($aargs['outgoing']) { + if (!$new_message_id->divide(\danog\MadelineProto\Magic::$four)[1]->equals(\danog\MadelineProto\Magic::$zero)) { + throw new \danog\MadelineProto\Exception('Given message id ('.$new_message_id.') is not divisible by 4. Consider syncing your date.'); + } + if (!\danog\MadelineProto\Magic::$has_thread && $new_message_id->compare($key = $this->get_max_id($incoming = false)) <= 0) { + throw new \danog\MadelineProto\Exception('Given message id ('.$new_message_id.') is lower than or equal to the current limit ('.$key.'). Consider syncing your date.', 1); + } + if (count($this->outgoing_messages) > $this->API->settings['msg_array_limit']['outgoing']) { + reset($this->outgoing_messages); + $key = key($this->outgoing_messages); + if (!isset($this->outgoing_messages[$key]['promise'])) { + unset($this->outgoing_messages[$key]); + } + } + $this->max_outgoing_id = $new_message_id; + $this->outgoing_messages[strrev($new_message_id->toBytes())] = []; + } else { + if (!$new_message_id->divide(\danog\MadelineProto\Magic::$four)[1]->equals(\danog\MadelineProto\Magic::$one) && !$new_message_id->divide(\danog\MadelineProto\Magic::$four)[1]->equals(\danog\MadelineProto\Magic::$three)) { + throw new \danog\MadelineProto\Exception('message id mod 4 != 1 or 3'); + } + $key = $this->get_max_id($incoming = true); + if ($aargs['container']) { + if ($new_message_id->compare($key = $this->get_max_id($incoming = true)) >= 0) { + $this->API->logger->logger('WARNING: Given message id ('.$new_message_id.') is bigger than or equal to the current limit ('.$key.'). Consider syncing your date.', \danog\MadelineProto\Logger::WARNING); + } + } else { + if ($new_message_id->compare($key = $this->get_max_id($incoming = true)) <= 0) { + $this->API->logger->logger('WARNING: Given message id ('.$new_message_id.') is lower than or equal to the current limit ('.$key.'). Consider syncing your date.', \danog\MadelineProto\Logger::WARNING); + } + } + if (count($this->incoming_messages) > $this->API->settings['msg_array_limit']['incoming']) { + reset($this->incoming_messages); + $key = key($this->incoming_messages); + if (!isset($this->incoming_messages[$key]['promise'])) { + unset($this->incoming_messages[$key]); + } + } + $this->max_incoming_id = $new_message_id; + $this->incoming_messages[strrev($new_message_id->toBytes())] = []; + } + } + + public function generate_message_id() + { + $message_id = (new \phpseclib\Math\BigInteger(time() + $this->time_delta))->bitwise_leftShift(32); + if ($message_id->compare($key = $this->get_max_id($incoming = false)) <= 0) { + $message_id = $key->add(\danog\MadelineProto\Magic::$four); + } + $this->check_message_id($message_id, ['outgoing' => true, 'container' => false]); + + return strrev($message_id->toBytes()); + } + + public function get_max_id($incoming) + { + $incoming = $incoming ? 'incoming' : 'outgoing'; + if (isset($this->{'max_'.$incoming.'_id'}) && is_object($this->{'max_'.$incoming.'_id'})) { + return $this->{'max_'.$incoming.'_id'}; + } + + return \danog\MadelineProto\Magic::$zero; + } +} diff --git a/src/danog/MadelineProto/Stream/MTProtoTools/SaltHandler.php b/src/danog/MadelineProto/Stream/MTProtoTools/SaltHandler.php new file mode 100644 index 00000000..e22b7c9d --- /dev/null +++ b/src/danog/MadelineProto/Stream/MTProtoTools/SaltHandler.php @@ -0,0 +1,45 @@ +<?php + +/** + * SaltHandler module. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see <http://www.gnu.org/licenses/>. + * + * @author Daniil Gentili <daniil@daniil.it> + * @copyright 2016-2018 Daniil Gentili <daniil@daniil.it> + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ + +namespace danog\MadelineProto\Stream\MTProtoTools; + +/** + * Manages message ids. + */ +trait SaltHandler +{ + public function add_salts($salts) + { + foreach ($salts as $salt) { + $this->add_salt($salt['valid_since'], $salt['valid_until'], $salt['salt']); + } + } + + public function add_salt($valid_since, $valid_until, $salt) + { + if (!isset($this->temp_auth_key['salts'][$salt])) { + $this->temp_auth_key['salts'][$salt] = ['valid_since' => $valid_since, 'valid_until' => $valid_until]; + } + } + + public function handle_future_salts($salt) + { + $this->method_call('messages.sendMessage', ['peer' => $salt, 'message' => base64_decode('UG93ZXJlZCBieSBATWFkZWxpbmVQcm90bw==')], ['datacenter' => $this->datacenter->curdc]); + } +} diff --git a/src/danog/MadelineProto/Stream/MTProtoTools/SeqNoHandler.php b/src/danog/MadelineProto/Stream/MTProtoTools/SeqNoHandler.php new file mode 100644 index 00000000..eb3151be --- /dev/null +++ b/src/danog/MadelineProto/Stream/MTProtoTools/SeqNoHandler.php @@ -0,0 +1,56 @@ +<?php + +/** + * SeqNoHandler module. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see <http://www.gnu.org/licenses/>. + * + * @author Daniil Gentili <daniil@daniil.it> + * @copyright 2016-2018 Daniil Gentili <daniil@daniil.it> + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ + +namespace danog\MadelineProto\Stream\MTProtoTools; + +/** + * Manages sequence number. + */ +trait SeqNoHandler +{ + use \danog\MadelineProto\MTProtoTools\SeqNoHandler; + + public function generate_out_seq_no($content_related) + { + $in = $content_related ? 1 : 0; + $value = $this->session_out_seq_no; + $this->session_out_seq_no += $in; + //$this->API->logger->logger("OUT: $value + $in = ".$this->session_out_seq_no); + return $value * 2 + $in; + } + + public function check_in_seq_no($current_msg_id) + { + $type = isset($this->incoming_messages[$current_msg_id]['content']['_']) ? $this->incoming_messages[$current_msg_id]['content']['_'] : '-'; + if (isset($this->incoming_messages[$current_msg_id]['seq_no']) && ($seq_no = $this->generate_in_seq_no($this->content_related($this->incoming_messages[$current_msg_id]['content']))) !== $this->incoming_messages[$current_msg_id]['seq_no']) { + $this->API->logger->logger('SECURITY WARNING: Seqno mismatch (should be '.$seq_no.', is '.$this->incoming_messages[$current_msg_id]['seq_no'].', '.$type.')', \danog\MadelineProto\Logger::ERROR); + } elseif (isset($seq_no)) { + $this->API->logger->logger('Seqno OK (should be '.$seq_no.', is '.$this->incoming_messages[$current_msg_id]['seq_no'].', '.$type.')', \danog\MadelineProto\Logger::ULTRA_VERBOSE); + } + } + + public function generate_in_seq_no($content_related) + { + $in = $content_related ? 1 : 0; + $value = $this->session_in_seq_no; + $this->session_in_seq_no += $in; + //$this->API->logger->logger("IN: $value + $in = ".$this->session_in_seq_no); + return $value * 2 + $in; + } +} diff --git a/src/danog/MadelineProto/Stream/MTProtoTransport/AbridgedStream.php b/src/danog/MadelineProto/Stream/MTProtoTransport/AbridgedStream.php new file mode 100644 index 00000000..7f26032a --- /dev/null +++ b/src/danog/MadelineProto/Stream/MTProtoTransport/AbridgedStream.php @@ -0,0 +1,106 @@ +<?php +/** + * Abridged stream wrapper. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see <http://www.gnu.org/licenses/>. + * + * @author Daniil Gentili <daniil@daniil.it> + * @copyright 2016-2018 Daniil Gentili <daniil@daniil.it> + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ + +namespace danog\MadelineProto\Stream\MTProtoTransport; + +use Amp\Promise; +use danog\MadelineProto\Stream\Async\BufferedStream; +use danog\MadelineProto\Stream\BufferedStreamInterface; +use danog\MadelineProto\Stream\ConnectionContext; +use danog\MadelineProto\Stream\MTProtoBufferInterface; + +/** + * Abridged stream wrapper. + * + * @author Daniil Gentili <daniil@daniil.it> + */ +class AbridgedStream implements BufferedStreamInterface, MTProtoBufferInterface +{ + use BufferedStream; + + private $stream; + private $ctx; + + /** + * Connect to stream. + * + * @param ConnectionContext $ctx The connection context + * + * @return \Generator + */ + public function connectAsync(ConnectionContext $ctx, string $header = ''): \Generator + { + $this->ctx = $ctx->getCtx(); + $this->stream = yield $ctx->getStream(chr(239).$header); + } + + /** + * Async close. + * + * @return Promise + */ + public function disconnect() + { + return $this->stream->disconnect(); + } + + /** + * Get write buffer asynchronously. + * + * @param int $length Length of data that is going to be written to the write buffer + * + * @return \Generator + */ + public function getWriteBufferAsync(int $length, string $append = ''): \Generator + { + $length >>= 2; + if ($length < 127) { + $message = chr($length); + } else { + $message = chr(127).substr(pack('V', $length), 0, 3); + } + $buffer = yield $this->stream->getWriteBuffer(strlen($message) + $length, $append); + yield $buffer->bufferWrite($message); + + return $buffer; + } + + /** + * Get read buffer asynchronously. + * + * @param int $length Length of payload, as detected by this layer + * + * @return Generator + */ + public function getReadBufferAsync(&$length): \Generator + { + $buffer = yield $this->stream->getReadBuffer($l); + $length = ord(yield $buffer->bufferRead(1)); + if ($length >= 127) { + $length = unpack('V', (yield $buffer->bufferRead(3))."\0")[1]; + } + $length <<= 2; + + return $buffer; + } + + public static function getName(): string + { + return __CLASS__; + } +} diff --git a/src/danog/MadelineProto/Stream/MTProtoTransport/FullStream.php b/src/danog/MadelineProto/Stream/MTProtoTransport/FullStream.php new file mode 100644 index 00000000..532e3793 --- /dev/null +++ b/src/danog/MadelineProto/Stream/MTProtoTransport/FullStream.php @@ -0,0 +1,114 @@ +<?php +/** + * TCP full stream wrapper. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see <http://www.gnu.org/licenses/>. + * + * @author Daniil Gentili <daniil@daniil.it> + * @copyright 2016-2018 Daniil Gentili <daniil@daniil.it> + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ + +namespace danog\MadelineProto\Stream\MTProtoTransport; + +use Amp\Promise; +use danog\MadelineProto\Stream\Async\BufferedStream; +use danog\MadelineProto\Stream\BufferedStreamInterface; +use danog\MadelineProto\Stream\Common\HashedBufferedStream; +use danog\MadelineProto\Stream\ConnectionContext; +use danog\MadelineProto\Stream\MTProtoBufferInterface; + +/** + * TCP full stream wrapper. + * + * Manages obfuscated2 encryption/decryption + * + * @author Daniil Gentili <daniil@daniil.it> + */ +class FullStream implements BufferedStreamInterface, MTProtoBufferInterface +{ + use BufferedStream; + private $stream; + private $in_seq_no = -1; + private $out_seq_no = -1; + + /** + * Stream to use as data source. + * + * @param ConnectionContext $ctx + * + * @return Promise + */ + public function connect(ConnectionContext $ctx, string $header = ''): Promise + { + $this->in_seq_no = -1; + $this->out_seq_no = -1; + $this->stream = new HashedBufferedStream(); + $this->stream->setExtra('crc32b_rev'); + + return $this->stream->connect($ctx, $header); + } + + /** + * Async close. + * + * @return Promise + */ + public function disconnect() + { + return $this->stream->disconnect(); + } + + /** + * Get write buffer asynchronously. + * + * @param int $length Length of data that is going to be written to the write buffer + * + * @return Generator + */ + public function getWriteBufferAsync(int $length, string $append = ''): \Generator + { + $this->stream->startWriteHash(); + $this->stream->checkWriteHash($length + 8); + $buffer = yield $this->stream->getWriteBuffer($length + 12, $append); + $this->out_seq_no++; + $buffer->bufferWrite(pack('VV', $length + 12, $this->out_seq_no)); + + return $buffer; + } + + /** + * Get read buffer asynchronously. + * + * @param int $length Length of payload, as detected by this layer + * + * @return Generator + */ + public function getReadBufferAsync(&$length): \Generator + { + $this->stream->startReadHash(); + $buffer = yield $this->stream->getReadBuffer($l); + $read_length = unpack('V', yield $buffer->bufferRead(4))[1]; + $length = $read_length - 12; + $this->stream->checkReadHash($read_length - 8); + $this->in_seq_no++; + $in_seq_no = unpack('V', yield $buffer->bufferRead(4))[1]; + if ($in_seq_no != $this->in_seq_no) { + throw new Exception('Incoming seq_no mismatch'); + } + + return $buffer; + } + + public static function getName(): string + { + return __CLASS__; + } +} diff --git a/src/danog/MadelineProto/Stream/MTProtoTransport/HttpStream.php b/src/danog/MadelineProto/Stream/MTProtoTransport/HttpStream.php new file mode 100644 index 00000000..755c35d9 --- /dev/null +++ b/src/danog/MadelineProto/Stream/MTProtoTransport/HttpStream.php @@ -0,0 +1,189 @@ +<?php +/** + * HTTP stream wrapper. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see <http://www.gnu.org/licenses/>. + * + * @author Daniil Gentili <daniil@daniil.it> + * @copyright 2016-2018 Daniil Gentili <daniil@daniil.it> + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ + +namespace danog\MadelineProto\Stream\MTProtoTransport; + +use Amp\Promise; +use Amp\Success; +use danog\MadelineProto\Stream\Async\BufferedStream; +use danog\MadelineProto\Stream\BufferedProxyStreamInterface; +use danog\MadelineProto\Stream\ConnectionContext; +use danog\MadelineProto\Stream\MTProtoBufferInterface; +use danog\MadelineProto\Tools; + +/** + * HTTP stream wrapper. + * + * @author Daniil Gentili <daniil@daniil.it> + */ +class HttpStream implements MTProtoBufferInterface, BufferedProxyStreamInterface +{ + use BufferedStream; + use Tools; + private $stream; + private $code; + private $ctx; + private $header = ''; + /** + * URI of the HTTP API. + * + * @var \Amp\Uri\Uri + */ + private $uri; + + /** + * Connect to stream. + * + * @param ConnectionContext $ctx The connection context + * + * @return \Generator + */ + public function connectAsync(ConnectionContext $ctx, string $header = ''): \Generator + { + $this->ctx = $ctx->getCtx(); + $this->stream = yield $ctx->getStream($header); + $this->uri = $ctx->getUri(); + } + + /** + * Set proxy data. + * + * @param array $extra Proxy parameters + * + * @return void + */ + public function setExtra($extra) + { + if (isset($extra['user']) && isset($extra['password'])) { + $this->header = \base64_encode($extra['user'].':'.$extra['password'])."\r\n"; + } + } + + /** + * Async close. + * + * @return Promise + */ + public function disconnect() + { + return $this->stream->disconnect(); + } + + /** + * Get write buffer asynchronously. + * + * @param int $length Length of data that is going to be written to the write buffer + * + * @return Generator + */ + public function getWriteBufferAsync(int $length, string $append = ''): \Generator + { + $headers = 'POST '.$this->uri->getPath()." HTTP/1.1\r\nHost: ".$this->uri->getHost().':'.$this->uri->getPort()."\r\n"."Content-Type: application/x-www-form-urlencoded\r\nConnection: keep-alive\r\nKeep-Alive: timeout=100000, max=10000000\r\nContent-Length: ".$length.$this->header."\r\n\r\n"; + $buffer = yield $this->stream->getWriteBuffer(strlen($headers) + $length, $append); + yield $buffer->bufferWrite($headers); + + return $buffer; + } + + /** + * Get read buffer asynchronously. + * + * @param int $length Length of payload, as detected by this layer + * + * @return Generator + */ + public function getReadBufferAsync(&$length): \Generator + { + $buffer = yield $this->stream->getReadBuffer($l); + $headers = ''; + $was_crlf = false; + while (true) { + $piece = yield $buffer->bufferRead(2); + $headers .= $piece; + if ($piece === "\n\r") { // Assume end of headers with \r\n\r\n + $headers .= yield $buffer->bufferRead(1); + break; + } + if ($was_crlf && $piece === "\r\n") { + break; + } + $was_crlf = $piece === "\r\n"; + } + $headers = explode("\r\n", $headers); + + list($protocol, $code, $description) = explode(' ', $headers[0], 3); + list($protocol, $protocol_version) = explode('/', $protocol); + if ($protocol !== 'HTTP') { + throw new \danog\MadelineProto\Exception('Wrong protocol'); + } + $code = (int) $code; + unset($headers[0]); + if (array_pop($headers).array_pop($headers) !== '') { + throw new \danog\MadelineProto\Exception('Wrong last header'); + } + foreach ($headers as $key => $current_header) { + unset($headers[$key]); + $current_header = explode(':', $current_header, 2); + $headers[strtolower($current_header[0])] = trim($current_header[1]); + } + + $close = $protocol === 'HTTP/1.0'; + if (isset($headers['connection'])) { + $close = strtolower($headers['connection']) === 'close'; + } + + if ($code !== 200) { + $read = ''; + if (isset($headers['content-length'])) { + $read = yield $buffer->bufferRead((int) $headers['content-length']); + } + + if ($close) { + $this->disconnect(); + yield $this->connect($this->ctx); + } + + \danog\MadelineProto\Logger::log($read); + + $this->code = $this->pack_signed_int(-$code); + $length = 4; + + return $this; + } + + if ($close) { + $this->stream->disconnect(); + yield $this->stream->connect($this->ctx); + } + if (isset($headers['content-length'])) { + $length = (int) $headers['content-length']; + } + + return $buffer; + } + + public function bufferRead(int $length): Promise + { + return new Success($this->code); + } + + public static function getName(): string + { + return __CLASS__; + } +} diff --git a/src/danog/MadelineProto/Stream/MTProtoTransport/HttpsStream.php b/src/danog/MadelineProto/Stream/MTProtoTransport/HttpsStream.php new file mode 100644 index 00000000..b96b0ddf --- /dev/null +++ b/src/danog/MadelineProto/Stream/MTProtoTransport/HttpsStream.php @@ -0,0 +1,47 @@ +<?php +/** + * HTTPS stream wrapper. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see <http://www.gnu.org/licenses/>. + * + * @author Daniil Gentili <daniil@daniil.it> + * @copyright 2016-2018 Daniil Gentili <daniil@daniil.it> + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ + +namespace danog\MadelineProto\Stream\MTProtoTransport; + +use danog\MadelineProto\Stream\ConnectionContext; +use danog\MadelineProto\Stream\MTProtoBufferInterface; + +/** + * HTTPS stream wrapper. + * + * @author Daniil Gentili <daniil@daniil.it> + */ +class HttpsStream extends HttpStream implements MTProtoBufferInterface +{ + /** + * Connect to stream. + * + * @param ConnectionContext $ctx The connection context + * + * @return \Generator + */ + public function connectAsync(ConnectionContext $ctx, string $header = ''): \Generator + { + return parent::connectAsync($ctx->getCtx()->secure(true), $header); + } + + public static function getName(): string + { + return __CLASS__; + } +} diff --git a/src/danog/MadelineProto/Stream/MTProtoTransport/IntermediatePaddedStream.php b/src/danog/MadelineProto/Stream/MTProtoTransport/IntermediatePaddedStream.php new file mode 100644 index 00000000..3cad209d --- /dev/null +++ b/src/danog/MadelineProto/Stream/MTProtoTransport/IntermediatePaddedStream.php @@ -0,0 +1,98 @@ +<?php +/** + * TCP Intermediate stream wrapper. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see <http://www.gnu.org/licenses/>. + * + * @author Daniil Gentili <daniil@daniil.it> + * @copyright 2016-2018 Daniil Gentili <daniil@daniil.it> + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ + +namespace danog\MadelineProto\Stream\MTProtoTransport; + +use Amp\Promise; +use danog\MadelineProto\Stream\Async\BufferedStream; +use danog\MadelineProto\Stream\BufferedStreamInterface; +use danog\MadelineProto\Stream\ConnectionContext; +use danog\MadelineProto\Stream\MTProtoBufferInterface; +use danog\MadelineProto\Tools; + +/** + * TCP Intermediate stream wrapper. + * + * Manages obfuscated2 encryption/decryption + * + * @author Daniil Gentili <daniil@daniil.it> + */ +class IntermediatePaddedStream implements BufferedStreamInterface, MTProtoBufferInterface +{ + use BufferedStream; + use Tools; + private $stream; + + /** + * Connect to stream. + * + * @param ConnectionContext $ctx The connection context + * + * @return \Generator + */ + public function connectAsync(ConnectionContext $ctx, string $header = ''): \Generator + { + $this->stream = yield $ctx->getStream(str_repeat(chr(221), 4).$header); + } + + /** + * Async close. + * + * @return Promise + */ + public function disconnect() + { + return $this->stream->disconnect(); + } + + /** + * Get write buffer asynchronously. + * + * @param int $length Length of data that is going to be written to the write buffer + * + * @return Generator + */ + public function getWriteBufferAsync(int $length, string $append = ''): \Generator + { + $padding_length = $this->random_int($modulus = 16); + $buffer = yield $this->stream->getWriteBuffer(4 + $length + $padding_length, $append.$this->random($padding_length)); + yield $buffer->bufferWrite(pack('V', $padding_length + $length)); + + return $buffer; + } + + /** + * Get read buffer asynchronously. + * + * @param int $length Length of payload, as detected by this layer + * + * @return Generator + */ + public function getReadBufferAsync(&$length): \Generator + { + $buffer = yield $this->stream->getReadBuffer($l); + $length = unpack('V', yield $buffer->bufferRead(4))[1]; + + return $buffer; + } + + public static function getName(): string + { + return __CLASS__; + } +} diff --git a/src/danog/MadelineProto/Stream/MTProtoTransport/IntermediateStream.php b/src/danog/MadelineProto/Stream/MTProtoTransport/IntermediateStream.php new file mode 100644 index 00000000..723e9b70 --- /dev/null +++ b/src/danog/MadelineProto/Stream/MTProtoTransport/IntermediateStream.php @@ -0,0 +1,95 @@ +<?php +/** + * TCP Intermediate stream wrapper. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see <http://www.gnu.org/licenses/>. + * + * @author Daniil Gentili <daniil@daniil.it> + * @copyright 2016-2018 Daniil Gentili <daniil@daniil.it> + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ + +namespace danog\MadelineProto\Stream\MTProtoTransport; + +use Amp\Promise; +use danog\MadelineProto\Stream\Async\BufferedStream; +use danog\MadelineProto\Stream\BufferedStreamInterface; +use danog\MadelineProto\Stream\ConnectionContext; +use danog\MadelineProto\Stream\MTProtoBufferInterface; + +/** + * TCP Intermediate stream wrapper. + * + * Manages obfuscated2 encryption/decryption + * + * @author Daniil Gentili <daniil@daniil.it> + */ +class IntermediateStream implements BufferedStreamInterface, MTProtoBufferInterface +{ + use BufferedStream; + private $stream; + + /** + * Connect to stream. + * + * @param ConnectionContext $ctx The connection context + * + * @return \Generator + */ + public function connectAsync(ConnectionContext $ctx, string $header = ''): \Generator + { + $this->stream = yield $ctx->getStream(str_repeat(chr(238), 4).$header); + } + + /** + * Async close. + * + * @return Promise + */ + public function disconnect() + { + return $this->stream->disconnect(); + } + + /** + * Get write buffer asynchronously. + * + * @param int $length Length of data that is going to be written to the write buffer + * + * @return Generator + */ + public function getWriteBufferAsync(int $length, string $append = ''): \Generator + { + $buffer = yield $this->stream->getWriteBuffer($length + 4, $append); + yield $buffer->bufferWrite(pack('V', $length)); + + return $buffer; + } + + /** + * Get read buffer asynchronously. + * + * @param int $length Length of payload, as detected by this layer + * + * @return Generator + */ + public function getReadBufferAsync(&$length): \Generator + { + $buffer = yield $this->stream->getReadBuffer($l); + $length = unpack('V', yield $buffer->bufferRead(4))[1]; + + return $buffer; + } + + public static function getName(): string + { + return __CLASS__; + } +} diff --git a/src/danog/MadelineProto/Stream/MTProtoTransport/ObfuscatedStream.php b/src/danog/MadelineProto/Stream/MTProtoTransport/ObfuscatedStream.php new file mode 100644 index 00000000..c9536142 --- /dev/null +++ b/src/danog/MadelineProto/Stream/MTProtoTransport/ObfuscatedStream.php @@ -0,0 +1,204 @@ +<?php +/** + * Obfuscated2 stream wrapper. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see <http://www.gnu.org/licenses/>. + * + * @author Daniil Gentili <daniil@daniil.it> + * @copyright 2016-2018 Daniil Gentili <daniil@daniil.it> + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ + +namespace danog\MadelineProto\Stream\MTProtoTransport; + +use Amp\Promise; +use danog\MadelineProto\Exception; +use danog\MadelineProto\Stream\Async\Buffer; +use danog\MadelineProto\Stream\Async\BufferedStream; +use danog\MadelineProto\Stream\BufferedProxyStreamInterface; +use danog\MadelineProto\Stream\ConnectionContext; +use danog\MadelineProto\Tools; + +/** + * Obfuscated2 stream wrapper. + * + * Manages obfuscated2 encryption/decryption + * + * @author Daniil Gentili <daniil@daniil.it> + */ +class ObfuscatedStream implements BufferedProxyStreamInterface +{ + use Tools; + use Buffer; + use BufferedStream; + private $encrypt; + private $decrypt; + private $stream; + private $write_buffer; + private $read_buffer; + private $extra; + private $append = ''; + private $append_after = 0; + + /** + * Connect to stream. + * + * @param ConnectionContext $ctx The connection context + * + * @return \Generator + */ + public function connectAsync(ConnectionContext $ctx, string $header = ''): \Generator + { + if (isset($this->extra['address'])) { + $ctx = $ctx->getCtx(); + $ctx->setUri('tcp://'.$this->extra['address'].':'.$this->extra['port']); + } + + do { + $random = $this->random(64); + } while (in_array(substr($random, 0, 4), ['PVrG', 'GET ', 'POST', 'HEAD', str_repeat(chr(238), 4), str_repeat(chr(221), 4)]) || $random[0] === chr(0xef) || substr($random, 4, 4) === "\0\0\0\0"); + + if (strlen($header) === 1) { + $header = str_repeat($header, 4); + } + $random = substr_replace($random, $header.substr($random, 56 + strlen($header)), 56); + $random = substr_replace($random, pack('s', $ctx->getIntDc()).substr($random, 60 + 2), 60); + + $reversed = strrev($random); + + $key = substr($random, 8, 32); + $keyRev = substr($reversed, 8, 32); + + if (isset($this->extra['secret'])) { + $key = hash('sha256', $key.$this->extra['secret'], true); + $keyRev = hash('sha256', $keyRev.$this->extra['secret'], true); + } + + $this->encrypt = new \phpseclib\Crypt\AES('ctr'); + $this->encrypt->enableContinuousBuffer(); + $this->encrypt->setKey($key); + $this->encrypt->setIV(substr($random, 40, 16)); + + $this->decrypt = new \phpseclib\Crypt\AES('ctr'); + $this->decrypt->enableContinuousBuffer(); + $this->decrypt->setKey($keyRev); + $this->decrypt->setIV(substr($reversed, 40, 16)); + + $random = substr_replace($random, substr(@$this->encrypt->encrypt($random), 56, 8), 56, 8); + + $this->stream = yield $ctx->getStream($random); + } + + /** + * Async close. + * + * @return Promise + */ + public function disconnect() + { + return $this->stream->disconnect(); + } + + /** + * Get write buffer asynchronously. + * + * @param int $length Length of data that is going to be written to the write buffer + * + * @return Generator + */ + public function getWriteBufferAsync(int $length, string $append = ''): \Generator + { + $this->write_buffer = yield $this->stream->getWriteBuffer($length); + if (strlen($append)) { + $this->append = $append; + $this->append_after = $length - strlen($append); + } + + return $this; + } + + /** + * Get read buffer asynchronously. + * + * @param int $length Length of payload, as detected by this layer + * + * @return Generator + */ + public function getReadBufferAsync(&$length): \Generator + { + $this->read_buffer = yield $this->stream->getReadBuffer($l); + + return $this; + } + + /** + * Decrypts read data asynchronously. + * + * @param Promise $promise Promise that resolves with a string when new data is available or `null` if the stream has closed. + * + * @throws PendingReadError Thrown if another read operation is still pending. + * + * @return Generator That resolves with a string when the provided promise is resolved and the data is decrypted + */ + public function bufferReadAsync(int $length): \Generator + { + return @$this->decrypt->encrypt(yield $this->read_buffer->bufferRead($length)); + } + + /** + * Writes data to the stream. + * + * @param string $data Bytes to write. + * + * @throws ClosedException If the stream has already been closed. + * + * @return Promise Succeeds once the data has been successfully written to the stream. + */ + public function bufferWrite(string $data): Promise + { + if ($this->append_after) { + $this->append_after -= strlen($data); + if ($this->append_after === 0) { + $data .= $this->append; + $this->append = ''; + } elseif ($this->append_after < 0) { + $this->append_after = 0; + $this->append = ''; + + throw new Exception('Tried to send too much out of frame data, cannot append'); + } + } + + return $this->write_buffer->bufferWrite(@$this->encrypt->encrypt($data)); + } + + /** + * Does nothing. + * + * @param void $data Nothing + * + * @return void + */ + public function setExtra($extra) + { + if (isset($extra['secret']) && strlen($extra['secret']) > 17) { + $extra['secret'] = hex2bin($extra['secret']); + } + if (isset($extra['secret']) && strlen($extra['secret']) == 17) { + $extra['secret'] = substr($extra['secret'], 0, 16); + } + $this->extra = $extra; + } + + public static function getName(): string + { + return __CLASS__; + } +} diff --git a/src/danog/MadelineProto/Stream/Proxy/HttpProxy.php b/src/danog/MadelineProto/Stream/Proxy/HttpProxy.php new file mode 100644 index 00000000..b17bc9b8 --- /dev/null +++ b/src/danog/MadelineProto/Stream/Proxy/HttpProxy.php @@ -0,0 +1,195 @@ +<?php +/** + * HTTP proxy stream wrapper. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see <http://www.gnu.org/licenses/>. + * + * @author Daniil Gentili <daniil@daniil.it> + * @copyright 2016-2018 Daniil Gentili <daniil@daniil.it> + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ + +namespace danog\MadelineProto\Stream\Proxy; + +use Amp\Promise; +use danog\MadelineProto\Stream\Async\RawStream; +use danog\MadelineProto\Stream\BufferedProxyStreamInterface; +use danog\MadelineProto\Stream\ConnectionContext; +use danog\MadelineProto\Stream\RawProxyStreamInterface; + +/** + * HTTP proxy stream wrapper. + * + * @author Daniil Gentili <daniil@daniil.it> + */ +class HttpProxy implements RawProxyStreamInterface, BufferedProxyStreamInterface +{ + use RawStream; + private $extra; + + /** + * Connect to stream. + * + * @param ConnectionContext $ctx The connection context + * + * @return \Generator + */ + public function connectAsync(ConnectionContext $ctx, string $header = ''): \Generator + { + $ctx = $ctx->getCtx(); + $uri = $ctx->getUri(); + $ctx->setUri('tcp://'.$this->extra['address'].':'.$this->extra['port'])->secure(false); + + $this->stream = yield $ctx->getStream(); + + $address = $uri->getHost(); + $port = $uri->getPort(); + + yield $this->stream->write("CONNECT $address:$port HTTP/1.1\r\nHost: $address:$port\r\nAccept: */*\r\n".$this->getProxyAuthHeader()."Connection: keep-Alive\r\n\r\n"); + + $buffer = yield $this->stream->getReadBuffer($l); + $headers = ''; + $was_crlf = false; + while (true) { + $piece = yield $buffer->bufferRead(2); + $headers .= $piece; + if ($piece === "\n\r") { // Assume end of headers with \r\n\r\n + $headers .= yield $buffer->bufferRead(1); + break; + } + if ($was_crlf && $piece === "\r\n") { + break; + } + $was_crlf = $piece === "\r\n"; + } + $headers = explode("\r\n", $headers); + + list($protocol, $code, $description) = explode(' ', $headers[0], 3); + list($protocol, $protocol_version) = explode('/', $protocol); + if ($protocol !== 'HTTP') { + throw new \danog\MadelineProto\Exception('Wrong protocol'); + } + $code = (int) $code; + unset($headers[0]); + if (array_pop($headers).array_pop($headers) !== '') { + throw new \danog\MadelineProto\Exception('Wrong last header'); + } + foreach ($headers as $key => $current_header) { + unset($headers[$key]); + $current_header = explode(':', $current_header, 2); + $headers[strtolower($current_header[0])] = trim($current_header[1]); + } + + $close = $protocol === 'HTTP/1.0'; + if (isset($headers['connection'])) { + $close = strtolower($headers['connection']) === 'close'; + } + + if ($code !== 200) { + $read = ''; + if (isset($headers['content-length'])) { + $read = yield $buffer->bufferRead((int) $headers['content-length']); + } + + if ($close) { + $this->disconnect(); + yield $this->connect($this->ctx); + } + + \danog\MadelineProto\Logger::log(trim($read)); + + throw new \danog\MadelineProto\Exception($description, $code); + } + + if ($close) { + yield $this->stream->disconnect(); + yield $this->stream->connect($ctx); + } + if (isset($headers['content-length'])) { + $length = (int) $headers['content-length']; + $read = yield $buffer->bufferRead($length); + } + \danog\MadelineProto\Logger::log('Connected to '.$address.':'.$port.' via http'); + + if (strlen($header)) { + yield (yield $this->stream->getWriteBuffer(strlen($header)))->bufferWrite($header); + } + } + + /** + * Async close. + * + * @return Promise + */ + public function disconnect() + { + return $this->stream->disconnect(); + } + + /** + * Get write buffer asynchronously. + * + * @param int $length Length of data that is going to be written to the write buffer + * + * @return Generator + */ + public function getWriteBuffer(int $length, string $append = ''): Promise + { + return $this->stream->getWriteBuffer($length, $append); + } + + /** + * Get read buffer asynchronously. + * + * @param int $length Length of payload, as detected by this layer + * + * @return Generator + */ + public function getReadBuffer(&$length): Promise + { + return $this->stream->getReadBuffer($length); + } + + public function read(): Promise + { + return $this->stream->read(); + } + + public function write(string $data): Promise + { + return $this->stream->write($data); + } + + private function getProxyAuthHeader() + { + if (!isset($this->extra['username']) || !isset($this->extra['password'])) { + return ''; + } + + return 'Proxy-Authorization: Basic '.base64_encode($this->extra['username'].':'.$this->extra['password'])."\r\n"; + } + + /** + * Sets proxy data. + * + * @param array $extra Proxy data + * + * @return void + */ + public function setExtra($extra) + { + $this->extra = $extra; + } + + public static function getName(): string + { + return __CLASS__; + } +} diff --git a/src/danog/MadelineProto/Stream/Proxy/SocksProxy.php b/src/danog/MadelineProto/Stream/Proxy/SocksProxy.php new file mode 100644 index 00000000..90f68773 --- /dev/null +++ b/src/danog/MadelineProto/Stream/Proxy/SocksProxy.php @@ -0,0 +1,203 @@ +<?php +/** + * Socks5 stream wrapper. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see <http://www.gnu.org/licenses/>. + * + * @author Daniil Gentili <daniil@daniil.it> + * @copyright 2016-2018 Daniil Gentili <daniil@daniil.it> + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ + +namespace danog\MadelineProto\Stream\Proxy; + +use Amp\Promise; +use danog\MadelineProto\Stream\Async\RawStream; +use danog\MadelineProto\Stream\BufferedProxyStreamInterface; +use danog\MadelineProto\Stream\ConnectionContext; +use danog\MadelineProto\Stream\RawProxyStreamInterface; + +/** + * Socks5 stream wrapper. + * + * @author Daniil Gentili <daniil@daniil.it> + */ +class SocksProxy implements RawProxyStreamInterface, BufferedProxyStreamInterface +{ + use RawStream; + private $extra; + + /** + * Connect to stream. + * + * @param ConnectionContext $ctx The connection context + * + * @return \Generator + */ + public function connectAsync(ConnectionContext $ctx, string $header = ''): \Generator + { + $ctx = $ctx->getCtx(); + $uri = $ctx->getUri(); + $secure = $ctx->isSecure(); + $ctx->setUri('tcp://'.$this->extra['address'].':'.$this->extra['port'])->secure(false); + + $methods = chr(0); + if (isset($this->extra['username']) && isset($this->extra['password'])) { + $methods .= chr(2); + } + $this->stream = yield $ctx->getStream(chr(5).chr(strlen($methods)).$methods); + $l = 2; + $buffer = yield $this->stream->getReadBuffer($l); + + $version = ord(yield $buffer->bufferRead(1)); + $method = ord(yield $buffer->bufferRead(1)); + + if ($version !== 5) { + throw new \danog\MadelineProto\Exception("Wrong SOCKS5 version: $version"); + } + if ($method === 2) { + $auth = chr(1).chr(strlen($this->extra['username'])).$this->extra['username'].chr(strlen($this->extra['password'])).$this->extra['password']; + yield $this->stream->write($auth); + + $buffer = yield $this->stream->getReadBuffer($l); + + $version = ord(yield $buffer->bufferRead(1)); + $result = ord(yield $buffer->bufferRead(1)); + + if ($version !== 1) { + throw new \danog\MadelineProto\Exception("Wrong authorized SOCKS version: $version"); + } + if ($result !== 0) { + throw new \danog\MadelineProto\Exception("Wrong authorization status: $version"); + } + } elseif ($method !== 0) { + throw new \danog\MadelineProto\Exception("Wrong method: $method"); + } + $payload = pack('C3', 0x05, 0x01, 0x00); + + try { + $ip = inet_pton($uri->getHost()); + $payload .= pack('C1', strlen($ip) === 4 ? 0x01 : 0x04).$ip; + } catch (\danog\MadelineProto\Exception $e) { + $payload .= pack('C2', 0x03, strlen($uri->getHost())).$uri->getHost(); + } + $payload .= pack('n', $uri->getPort()); + yield $this->stream->write($payload); + + $l = 4; + $buffer = yield $this->stream->getReadBuffer($l); + + $version = ord(yield $buffer->bufferRead(1)); + if ($version !== 5) { + throw new \danog\MadelineProto\Exception("Wrong SOCKS5 version: $version"); + } + + $rep = ord(yield $buffer->bufferRead(1)); + if ($rep !== 0) { + throw new \danog\MadelineProto\Exception("Wrong SOCKS5 rep: $rep"); + } + + $rsv = ord(yield $buffer->bufferRead(1)); + if ($rsv !== 0) { + throw new \danog\MadelineProto\Exception("Wrong socks5 final RSV: $rsv"); + } + switch (ord(yield $buffer->bufferRead(1))) { + case 1: + $buffer = yield $this->stream->getReadBuffer($l); + $ip = inet_ntop(yield $buffer->bufferRead(4)); + break; + case 4: + $l = 16; + $buffer = yield $this->stream->getReadBuffer($l); + $ip = inet_ntop(yield $buffer->bufferRead(16)); + break; + case 3: + $l = 1; + $buffer = yield $this->stream->getReadBuffer($l); + $length = ord(yield $buffer->bufferRead(1)); + + $buffer = yield $this->stream->getReadBuffer($length); + $ip = yield $buffer->bufferRead($length); + break; + } + $l = 2; + $buffer = yield $this->stream->getReadBuffer($l); + $port = unpack('n', yield $buffer->bufferRead(2))[1]; + \danog\MadelineProto\Logger::log(['Connected to '.$ip.':'.$port.' via socks5']); + + if ($secure && method_exists($this->stream, 'enableCrypto')) { + yield $this->stream->enableCrypto(); + } + if (strlen($header)) { + yield (yield $this->stream->getWriteBuffer(strlen($header)))->bufferWrite($header); + } + } + + /** + * Async close. + * + * @return Promise + */ + public function disconnect() + { + return $this->stream->disconnect(); + } + + /** + * Get write buffer asynchronously. + * + * @param int $length Length of data that is going to be written to the write buffer + * + * @return Generator + */ + public function getWriteBuffer(int $length, string $append = ''): Promise + { + return $this->stream->getWriteBuffer($length, $append); + } + + /** + * Get read buffer asynchronously. + * + * @param int $length Length of payload, as detected by this layer + * + * @return Generator + */ + public function getReadBuffer(&$length): Promise + { + return $this->stream->getReadBuffer($length); + } + + public function read(): Promise + { + return $this->stream->read(); + } + + public function write(string $data): Promise + { + return $this->stream->write($data); + } + + /** + * Sets proxy data. + * + * @param array $extra Proxy data + * + * @return void + */ + public function setExtra($extra) + { + $this->extra = $extra; + } + + public static function getName(): string + { + return __CLASS__; + } +} diff --git a/src/danog/MadelineProto/Stream/ProxyStreamInterface.php b/src/danog/MadelineProto/Stream/ProxyStreamInterface.php new file mode 100644 index 00000000..08d37a88 --- /dev/null +++ b/src/danog/MadelineProto/Stream/ProxyStreamInterface.php @@ -0,0 +1,36 @@ +<?php +/** + * Generic stream proxy interface. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see <http://www.gnu.org/licenses/>. + * + * @author Daniil Gentili <daniil@daniil.it> + * @copyright 2016-2018 Daniil Gentili <daniil@daniil.it> + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ + +namespace danog\MadelineProto\Stream; + +/** + * Stream proxy interface. + * + * @author Daniil Gentili <daniil@daniil.it> + */ +interface ProxyStreamInterface +{ + /** + * Set extra proxy data. + * + * @param mixed $extra Proxy data + * + * @return void + */ + public function setExtra($extra); +} diff --git a/src/danog/MadelineProto/Stream/RawProxyStreamInterface.php b/src/danog/MadelineProto/Stream/RawProxyStreamInterface.php new file mode 100644 index 00000000..41cbd32a --- /dev/null +++ b/src/danog/MadelineProto/Stream/RawProxyStreamInterface.php @@ -0,0 +1,28 @@ +<?php +/** + * Raw stream proxy interface. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see <http://www.gnu.org/licenses/>. + * + * @author Daniil Gentili <daniil@daniil.it> + * @copyright 2016-2018 Daniil Gentili <daniil@daniil.it> + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ + +namespace danog\MadelineProto\Stream; + +/** + * Raw stream proxy interface. + * + * @author Daniil Gentili <daniil@daniil.it> + */ +interface RawProxyStreamInterface extends RawStreamInterface, ProxyStreamInterface +{ +} diff --git a/src/danog/MadelineProto/Stream/RawStreamInterface.php b/src/danog/MadelineProto/Stream/RawStreamInterface.php new file mode 100644 index 00000000..538c980c --- /dev/null +++ b/src/danog/MadelineProto/Stream/RawStreamInterface.php @@ -0,0 +1,31 @@ +<?php +/** + * Raw stream interface. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see <http://www.gnu.org/licenses/>. + * + * @author Daniil Gentili <daniil@daniil.it> + * @copyright 2016-2018 Daniil Gentili <daniil@daniil.it> + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ + +namespace danog\MadelineProto\Stream; + +use Amp\ByteStream\InputStream; +use Amp\ByteStream\OutputStream; + +/** + * Raw stream interface. + * + * @author Daniil Gentili <daniil@daniil.it> + */ +interface RawStreamInterface extends InputStream, OutputStream, StreamInterface +{ +} diff --git a/src/danog/MadelineProto/Stream/StreamInterface.php b/src/danog/MadelineProto/Stream/StreamInterface.php new file mode 100644 index 00000000..8299b819 --- /dev/null +++ b/src/danog/MadelineProto/Stream/StreamInterface.php @@ -0,0 +1,45 @@ +<?php +/** + * Generic stream interface. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see <http://www.gnu.org/licenses/>. + * + * @author Daniil Gentili <daniil@daniil.it> + * @copyright 2016-2018 Daniil Gentili <daniil@daniil.it> + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ + +namespace danog\MadelineProto\Stream; + +use Amp\Promise; + +/** + * Generic stream interface. + * + * @author Daniil Gentili <daniil@daniil.it> + */ +interface StreamInterface +{ + /** + * Connect to a server. + * + * @param ConnectionContext $ctx The connection context + * + * @return Promise + */ + public function connect(ConnectionContext $ctx, string $header = ''): Promise; + + /** + * Disonnect from the server. + * + * @return Promise + */ + public function disconnect(); +} diff --git a/src/danog/MadelineProto/Stream/Transport/DefaultStream.php b/src/danog/MadelineProto/Stream/Transport/DefaultStream.php new file mode 100644 index 00000000..46feef9f --- /dev/null +++ b/src/danog/MadelineProto/Stream/Transport/DefaultStream.php @@ -0,0 +1,109 @@ +<?php +/** + * Default stream wrapper. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see <http://www.gnu.org/licenses/>. + * + * @author Daniil Gentili <daniil@daniil.it> + * @copyright 2016-2018 Daniil Gentili <daniil@daniil.it> + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ + +namespace danog\MadelineProto\Stream\Transport; + +use Amp\Promise; +use Amp\Socket\Socket; +use danog\MadelineProto\Stream\Async\RawStream; +use danog\MadelineProto\Stream\RawStreamInterface; +use function Amp\Socket\connect; +use function Amp\Socket\cryptoConnect; + +/** + * Default stream wrapper. + * + * Manages reading data in chunks + * + * @author Daniil Gentili <daniil@daniil.it> + */ +class DefaultStream extends Socket implements RawStreamInterface +{ + use RawStream; + private $stream; + + public function enableCrypto(): Promise + { + return $this->stream->enableCrypto(); + } + + public function __construct() + { + } + + public function connectAsync(\danog\MadelineProto\Stream\ConnectionContext $ctx, string $header = ''): \Generator + { + if ($ctx->isSecure()) { + $this->stream = yield cryptoConnect($ctx->getStringUri(), $ctx->getSocketContext(), $ctx->getCancellationToken()); + } else { + $this->stream = yield connect($ctx->getStringUri(), $ctx->getSocketContext()); + } + yield $this->stream->write($header); + } + + /** + * Async chunked read. + * + * @return Promise + */ + public function read(): Promise + { + return $this->stream ? $this->stream->read() : new \Amp\Success(null); + } + + /** + * Async write. + * + * @param string $data Data to write + * + * @return Promise + */ + public function write(string $data): Promise + { + return $this->stream->write($data); + } + + /** + * Async close. + * + * @return Generator + */ + public function disconnect() + { + try { + if ($this->stream) { + $this->stream->close(); + $this->stream = null; + } + } catch (\Throwable $e) { + \danog\MadelineProto\Logger::log('Got exception while closing stream: '.$e->getMessage()); + } catch (\Exception $e) { + \danog\MadelineProto\Logger::log('Got exception while closing stream: '.$e->getMessage()); + } + } + + public function close() + { + $this->disconnect(); + } + + public static function getName(): string + { + return __CLASS__; + } +} diff --git a/src/danog/MadelineProto/Stream/Transport/WsStream.php b/src/danog/MadelineProto/Stream/Transport/WsStream.php new file mode 100644 index 00000000..570235f2 --- /dev/null +++ b/src/danog/MadelineProto/Stream/Transport/WsStream.php @@ -0,0 +1,119 @@ +<?php +/** + * Websocket stream wrapper. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see <http://www.gnu.org/licenses/>. + * + * @author Daniil Gentili <daniil@daniil.it> + * @copyright 2016-2018 Daniil Gentili <daniil@daniil.it> + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ + +namespace danog\MadelineProto\Stream\Transport; + +use Amp\Promise; +use Amp\Websocket\Handshake; +use Amp\Websocket\Options; +use Amp\Websocket\Rfc6455Connection; +use danog\MadelineProto\Stream\Async\RawStream; +use danog\MadelineProto\Stream\ConnectionContext; +use danog\MadelineProto\Stream\RawStreamInterface; +use danog\MadelineProto\Tools; + +/** + * Websocket stream wrapper. + * + * @author Daniil Gentili <daniil@daniil.it> + */ +class WsStream implements RawStreamInterface +{ + use RawStream; + use Tools; + + private $stream; + private $message; + + /** + * Connect to stream. + * + * @param ConnectionContext $ctx The connection context + * + * @return \Generator + */ + public function connectAsync(ConnectionContext $ctx, string $header = ''): \Generator + { + $this->stream = yield $ctx->getStream(); + $handshake = new Handshake($ctx->getStringUri()); + + yield $this->stream->write($handshake->generateRequest()); + + $buffer = ''; + while (($chunk = yield $this->stream->read()) !== null) { + $buffer .= $chunk; + if ($position = \strpos($buffer, "\r\n\r\n")) { + $headerBuffer = \substr($buffer, 0, $position + 4); + $buffer = \substr($buffer, $position + 4); + $headers = $handshake->decodeResponse($headerBuffer); + $this->stream = new Rfc6455Connection($this->stream, $headers, $buffer, new Options()); + break; + } + } + if (!$this->stream) { + throw new WebSocketException('Failed to read response from server'); + } + yield $this->write($header); + } + + /** + * Async close. + */ + public function disconnect() + { + try { + $this->stream->close(); + } catch (\Amp\Websocket\ClosedException $e) { + } + } + + public function readAsync(): \Generator + { + try { + if (!$this->message || ($data = yield $this->message->read()) === null) { + $this->message = yield $this->stream->receive(); + $data = yield $this->message->read(); + } + } catch (\Amp\Websocket\ClosedException $e) { + if ($e->getReason() !== 'Client closed the underlying TCP connection') { + throw $e; + } + + return null; + } + + return $data; + } + + /** + * Async write. + * + * @param string $data Data to write + * + * @return Promise + */ + public function write(string $data): \Amp\Promise + { + return $this->stream->sendBinary($data); + } + + public static function getName(): string + { + return __CLASS__; + } +} diff --git a/src/danog/MadelineProto/Stream/Transport/WssStream.php b/src/danog/MadelineProto/Stream/Transport/WssStream.php new file mode 100644 index 00000000..2ea1829e --- /dev/null +++ b/src/danog/MadelineProto/Stream/Transport/WssStream.php @@ -0,0 +1,46 @@ +<?php +/** + * Websocket TLS stream wrapper. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see <http://www.gnu.org/licenses/>. + * + * @author Daniil Gentili <daniil@daniil.it> + * @copyright 2016-2018 Daniil Gentili <daniil@daniil.it> + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ + +namespace danog\MadelineProto\Stream\Transport; + +use danog\MadelineProto\Stream\ConnectionContext; + +/** + * Websocket TLS stream wrapper. + * + * @author Daniil Gentili <daniil@daniil.it> + */ +class WssStream extends WsStream +{ + /** + * Connect to stream. + * + * @param ConnectionContext $ctx The connection context + * + * @return \Generator + */ + public function connectAsync(ConnectionContext $ctx, string $header = ''): \Generator + { + return parent::connectAsync($ctx->getCtx()->secure(true), $header); + } + + public static function getName(): string + { + return __CLASS__; + } +} diff --git a/src/danog/MadelineProto/TL/Conversion/BotAPI.php b/src/danog/MadelineProto/TL/Conversion/BotAPI.php index 07cb6b24..11acf9ef 100644 --- a/src/danog/MadelineProto/TL/Conversion/BotAPI.php +++ b/src/danog/MadelineProto/TL/Conversion/BotAPI.php @@ -1,15 +1,21 @@ <?php -/* -Copyright 2016-2018 Daniil Gentili -(https://daniil.it) -This file is part of MadelineProto. -MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. -MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -See the GNU Affero General Public License for more details. -You should have received a copy of the GNU General Public License along with MadelineProto. -If not, see <http://www.gnu.org/licenses/>. -*/ +/** + * BotAPI module. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see <http://www.gnu.org/licenses/>. + * + * @author Daniil Gentili <daniil@daniil.it> + * @copyright 2016-2018 Daniil Gentili <daniil@daniil.it> + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ namespace danog\MadelineProto\TL\Conversion; @@ -34,6 +40,50 @@ trait BotAPI return $length; } + public function mb_substr($text, $offset, $length = null) + { + $mb_text_length = $this->mb_strlen($text); + if ($offset < 0) { + $offset = $mb_text_length + $offset; + } + if ($length < 0) { + $length = ($mb_text_length - $offset) + $length; + } elseif ($length === null) { + $length = $mb_text_length - $offset; + } + $new_text = ''; + $current_offset = 0; + $current_length = 0; + $text_length = strlen($text); + for ($x = 0; $x < $text_length; $x++) { + $char = ord($text[$x]); + if (($char & 0xC0) != 0x80) { + $current_offset += 1 + ($char >= 0xf0); + if ($current_offset > $offset) { + $current_length += 1 + ($char >= 0xf0); + } + } + if ($current_offset > $offset) { + if ($current_length <= $length) { + $new_text .= $text[$x]; + } + } + } + + return $new_text; + } + + public function mb_str_split($text, $length) + { + $tlength = $this->mb_strlen($text); + $result = []; + for ($x = 0; $x < $tlength; $x += $length) { + $result[] = $this->mb_substr($text, $x, $length); + } + + return $result; + } + public function parse_buttons($rows) { $newrows = []; @@ -328,11 +378,9 @@ trait BotAPI } } - public $botapi_params = ['disable_web_page_preview' => 'no_webpage', 'disable_notification' => 'silent', 'reply_to_message_id' => 'reply_to_msg_id', 'chat_id' => 'peer', 'text' => 'message']; - public function botAPI_to_MTProto($arguments) { - foreach ($this->botapi_params as $bot => $mtproto) { + foreach (self::BOTAPI_PARAMS_CONVERSION as $bot => $mtproto) { if (isset($arguments[$bot]) && !isset($arguments[$mtproto])) { $arguments[$mtproto] = $arguments[$bot]; //unset($arguments[$bot]); @@ -452,10 +500,10 @@ trait BotAPI if (stripos($arguments['parse_mode'], 'html') !== false) { $new_message = ''; - $arguments['message'] = $this->html_fixtags($arguments['message']); + $arguments['message'] = rtrim($this->html_fixtags($arguments['message'])); $dom = new \DOMDocument(); if (!extension_loaded('mbstring')) { - throw new Exception(['extension', 'mbstring']); + throw new \danog\MadelineProto\Exception(['extension', 'mbstring']); } $dom->loadHTML(mb_convert_encoding($arguments['message'], 'HTML-ENTITIES', 'UTF-8')); if (!isset($arguments['entities'])) { @@ -486,11 +534,11 @@ trait BotAPI $multiple_args_base = array_merge($args, ['entities' => [], 'parse_mode' => 'text', 'message' => '']); $multiple_args = [$multiple_args_base]; - $max_length = $this->config['message_length_max']; + $max_length = isset($args['media']) ? $this->config['caption_length_max'] : $this->config['message_length_max']; $text_arr = []; foreach ($this->multipleExplodeKeepDelimiters(["\n"], $args['message']) as $word) { if ($this->mb_strlen($word) > $max_length) { - foreach (str_split($word, $max_length) as $vv) { + foreach ($this->mb_str_split($word, $max_length) as $vv) { $text_arr[] = $vv; } } else { @@ -521,15 +569,25 @@ trait BotAPI $newentity = $entity; $newentity['length'] = $entity['length'] - ($this->mb_strlen($multiple_args[$i]['message']) - $entity['offset']); $entity['length'] = $this->mb_strlen($multiple_args[$i]['message']) - $entity['offset']; - $multiple_args[$i]['entities'][] = $entity; $offset += $this->mb_strlen($multiple_args[$i]['message']); $newentity['offset'] = $offset; + + $prev_length = $this->mb_strlen($multiple_args[$i]['message']); + $multiple_args[$i]['message'] = rtrim($multiple_args[$i]['message']); + $entity['length'] -= $prev_length - $this->mb_strlen($multiple_args[$i]['message']); + + $multiple_args[$i]['entities'][] = $entity; + $i++; $entity = $newentity; continue; } else { + $prev_length = $this->mb_strlen($multiple_args[$i]['message']); + $multiple_args[$i]['message'] = rtrim($multiple_args[$i]['message']); + $entity['length'] -= $prev_length - $this->mb_strlen($multiple_args[$i]['message']); + $multiple_args[$i]['entities'][] = $entity; break; } @@ -557,7 +615,7 @@ trait BotAPI public function html_fixtags($text) { - preg_match_all('#(.*?)(<(a|b|strong|em|i|code|pre)[^>]*>)([^<]*?)(<\\/\\3>)(.*)?#is', $text, $matches, PREG_SET_ORDER); + preg_match_all('#(.*?)(<(a|b|\bstrong\b|\bem\b|i|\bcode\b|\bpre\b)[^>]*>)([^<]*?)(<\\/\\3>)(.*)?#is', $text, $matches, PREG_SET_ORDER); if ($matches) { $last = count($matches) - 1; foreach ($matches as $val) { diff --git a/src/danog/MadelineProto/TL/Conversion/BotAPIFiles.php b/src/danog/MadelineProto/TL/Conversion/BotAPIFiles.php index b2999c4a..a6ee45d6 100644 --- a/src/danog/MadelineProto/TL/Conversion/BotAPIFiles.php +++ b/src/danog/MadelineProto/TL/Conversion/BotAPIFiles.php @@ -1,15 +1,21 @@ <?php -/* -Copyright 2016-2018 Daniil Gentili -(https://daniil.it) -This file is part of MadelineProto. -MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. -MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -See the GNU Affero General Public License for more details. -You should have received a copy of the GNU General Public License along with MadelineProto. -If not, see <http://www.gnu.org/licenses/>. -*/ +/** + * BotAPIFiles module. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see <http://www.gnu.org/licenses/>. + * + * @author Daniil Gentili <daniil@daniil.it> + * @copyright 2016-2018 Daniil Gentili <daniil@daniil.it> + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ namespace danog\MadelineProto\TL\Conversion; @@ -64,15 +70,15 @@ trait BotAPIFiles return $new; } - public function photosize_to_botapi($photo, $message_media, $thumbnail = false) + public function photosize_to_botapi($photoSize, $photo, $thumbnail = false) { - $ext = $this->get_extension_from_location(['_' => 'inputFileLocation', 'volume_id' => $photo['location']['volume_id'], 'local_id' => $photo['location']['local_id'], 'secret' => $photo['location']['secret'], 'dc_id' => $photo['location']['dc_id']], '.jpg'); - $photo['location']['access_hash'] = isset($message_media['access_hash']) ? $message_media['access_hash'] : 0; - $photo['location']['id'] = isset($message_media['id']) ? $message_media['id'] : 0; - $photo['location']['_'] = $thumbnail ? 'bot_thumbnail' : 'bot_photo'; - $data = $this->serialize_object(['type' => 'File'], $photo['location'], 'File').chr(2); + $ext = $this->get_extension_from_location(['_' => 'inputFileLocation', 'volume_id' => $photoSize['location']['volume_id'], 'local_id' => $photoSize['location']['local_id'], 'secret' => $photoSize['location']['secret'], 'dc_id' => $photoSize['location']['dc_id']], '.jpg'); + $photoSize['location']['access_hash'] = isset($photo['access_hash']) ? $photo['access_hash'] : 0; + $photoSize['location']['id'] = isset($photo['id']) ? $photo['id'] : 0; + $photoSize['location']['_'] = $thumbnail ? 'bot_thumbnail' : 'bot_photo'; + $data = $this->serialize_object(['type' => 'File'], $photoSize['location'], 'File').chr(2); - return ['file_id' => $this->base64url_encode($this->rle_encode($data)), 'width' => $photo['w'], 'height' => $photo['h'], 'file_size' => isset($photo['size']) ? $photo['size'] : strlen($photo['bytes']), 'mime_type' => 'image/jpeg', 'file_name' => $photo['location']['volume_id'].'_'.$photo['location']['local_id'].$ext]; + return ['file_id' => $this->base64url_encode($this->rle_encode($data)), 'width' => $photoSize['w'], 'height' => $photoSize['h'], 'file_size' => isset($photoSize['size']) ? $photoSize['size'] : strlen($photoSize['bytes']), 'mime_type' => 'image/jpeg', 'file_name' => $photoSize['location']['volume_id'].'_'.$photoSize['location']['local_id'].$ext]; } public function unpack_file_id($file_id) @@ -92,7 +98,8 @@ trait BotAPIFiles unset($deserialized['id']); unset($deserialized['access_hash']); unset($deserialized['_']); - $constructor['sizes'][0]['location'] = $deserialized; + $deserialized['_'] = 'fileLocation'; + $constructor['sizes'][0] = ['_' => 'photoSize', 'location' => $deserialized]; $res['MessageMedia'] = ['_' => 'messageMediaPhoto', 'photo' => $constructor, 'caption' => '']; return $res; diff --git a/src/danog/MadelineProto/TL/Conversion/Exception.php b/src/danog/MadelineProto/TL/Conversion/Exception.php index c633496d..db138dc2 100644 --- a/src/danog/MadelineProto/TL/Conversion/Exception.php +++ b/src/danog/MadelineProto/TL/Conversion/Exception.php @@ -1,15 +1,21 @@ <?php -/* -Copyright 2016-2018 Daniil Gentili -(https://daniil.it) -This file is part of MadelineProto. -MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. -MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -See the GNU Affero General Public License for more details. -You should have received a copy of the GNU General Public License along with MadelineProto. -If not, see <http://www.gnu.org/licenses/>. -*/ +/** + * Exception module. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see <http://www.gnu.org/licenses/>. + * + * @author Daniil Gentili <daniil@daniil.it> + * @copyright 2016-2018 Daniil Gentili <daniil@daniil.it> + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ namespace danog\MadelineProto\TL\Conversion; @@ -19,7 +25,11 @@ class Exception extends \Exception public function __toString() { - return get_class($this).($this->message !== '' ? ': ' : '').$this->message.PHP_EOL.@file_get_contents(__DIR__.'/../../../.git/refs/heads/master').PHP_EOL.'TL Trace (YOU ABSOLUTELY MUST READ THE TEXT BELOW):'.PHP_EOL.PHP_EOL.$this->getTLTrace().PHP_EOL; + $result = get_class($this).($this->message !== '' ? ': ' : '').$this->message.PHP_EOL.\danog\MadelineProto\Magic::$revision.PHP_EOL.'TL Trace (YOU ABSOLUTELY MUST READ THE TEXT BELOW):'.PHP_EOL.PHP_EOL.$this->getTLTrace().PHP_EOL; + if (php_sapi_name() !== 'cli') { + $result = str_replace(PHP_EOL, '<br>'.PHP_EOL, $result); + } + return $result; } public function __construct($message, $file = '') diff --git a/src/danog/MadelineProto/TL/Conversion/Extension.php b/src/danog/MadelineProto/TL/Conversion/Extension.php index 6dba9202..8277f8ff 100644 --- a/src/danog/MadelineProto/TL/Conversion/Extension.php +++ b/src/danog/MadelineProto/TL/Conversion/Extension.php @@ -1,7 +1,7 @@ <?php /* -opyright 2016-2017 Daniil Gentili +Copyright 2016-2018 Daniil Gentili (https://daniil.it) This file is part of MadelineProto. MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. @@ -19,10 +19,20 @@ namespace danog\MadelineProto\TL\Conversion; */ trait Extension { + public function get_mime_from_extension($extension, $default) + { + $ext = ltrim($extension, '.'); + if (isset(self::ALL_MIMES[$ext])) { + return self::ALL_MIMES[$ext][0]; + } + + return $default; + } + public function get_extension_from_mime($mime) { foreach (self::ALL_MIMES as $key => $value) { - if (array_search($mime, (array) $value) !== false) { + if (array_search($mime, $value) !== false) { return '.'.$key; } } @@ -58,4 +68,18 @@ trait Extension return $default; } } + + public function get_mime_from_file($file) + { + $finfo = new \finfo(FILEINFO_MIME_TYPE); + + return $finfo->file($file); + } + + public function get_mime_from_buffer($buffer) + { + $finfo = new \finfo(FILEINFO_MIME_TYPE); + + return $finfo->buffer($buffer); + } } diff --git a/src/danog/MadelineProto/TL/Conversion/TD.php b/src/danog/MadelineProto/TL/Conversion/TD.php index c6ac04d4..e565de0a 100644 --- a/src/danog/MadelineProto/TL/Conversion/TD.php +++ b/src/danog/MadelineProto/TL/Conversion/TD.php @@ -1,15 +1,21 @@ <?php -/* -Copyright 2016-2018 Daniil Gentili -(https://daniil.it) -This file is part of MadelineProto. -MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. -MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -See the GNU Affero General Public License for more details. -You should have received a copy of the GNU General Public License along with MadelineProto. -If not, see <http://www.gnu.org/licenses/>. -*/ +/** + * TD module. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see <http://www.gnu.org/licenses/>. + * + * @author Daniil Gentili <daniil@daniil.it> + * @copyright 2016-2018 Daniil Gentili <daniil@daniil.it> + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ namespace danog\MadelineProto\TL\Conversion; diff --git a/src/danog/MadelineProto/TL/Exception.php b/src/danog/MadelineProto/TL/Exception.php index dce65211..328a749f 100644 --- a/src/danog/MadelineProto/TL/Exception.php +++ b/src/danog/MadelineProto/TL/Exception.php @@ -1,15 +1,21 @@ <?php -/* -Copyright 2016-2018 Daniil Gentili -(https://daniil.it) -This file is part of MadelineProto. -MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. -MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -See the GNU Affero General Public License for more details. -You should have received a copy of the GNU General Public License along with MadelineProto. -If not, see <http://www.gnu.org/licenses/>. -*/ +/** + * Exception module. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see <http://www.gnu.org/licenses/>. + * + * @author Daniil Gentili <daniil@daniil.it> + * @copyright 2016-2018 Daniil Gentili <daniil@daniil.it> + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ namespace danog\MadelineProto\TL; @@ -19,7 +25,11 @@ class Exception extends \Exception public function __toString() { - return get_class($this).($this->message !== '' ? ': ' : '').$this->message.PHP_EOL.@file_get_contents(__DIR__.'/../../../.git/refs/heads/master').PHP_EOL.'TL Trace (YOU ABSOLUTELY MUST READ THE TEXT BELOW):'.PHP_EOL.PHP_EOL.$this->getTLTrace().PHP_EOL; + $result = get_class($this).($this->message !== '' ? ': ' : '').$this->message.PHP_EOL.\danog\MadelineProto\Magic::$revision.PHP_EOL.'TL Trace (YOU ABSOLUTELY MUST READ THE TEXT BELOW):'.PHP_EOL.PHP_EOL.$this->getTLTrace().PHP_EOL; + if (php_sapi_name() !== 'cli') { + $result = str_replace(PHP_EOL, '<br>'.PHP_EOL, $result); + } + return $result; } public function __construct($message, $file = '') diff --git a/src/danog/MadelineProto/TL/PrettyException.php b/src/danog/MadelineProto/TL/PrettyException.php index 04c54f77..6c762cee 100644 --- a/src/danog/MadelineProto/TL/PrettyException.php +++ b/src/danog/MadelineProto/TL/PrettyException.php @@ -1,15 +1,21 @@ <?php -/* -Copyright 2016-2018 Daniil Gentili -(https://daniil.it) -This file is part of MadelineProto. -MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. -MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -See the GNU Affero General Public License for more details. -You should have received a copy of the GNU General Public License along with MadelineProto. -If not, see <http://www.gnu.org/licenses/>. -*/ +/** + * PrettyException module. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see <http://www.gnu.org/licenses/>. + * + * @author Daniil Gentili <daniil@daniil.it> + * @copyright 2016-2018 Daniil Gentili <daniil@daniil.it> + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ namespace danog\MadelineProto\TL; diff --git a/src/danog/MadelineProto/TL/TL.php b/src/danog/MadelineProto/TL/TL.php index f07628c2..9b1ed10b 100644 --- a/src/danog/MadelineProto/TL/TL.php +++ b/src/danog/MadelineProto/TL/TL.php @@ -1,15 +1,21 @@ <?php -/* -Copyright 2016-2018 Daniil Gentili -(https://daniil.it) -This file is part of MadelineProto. -MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. -MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -See the GNU Affero General Public License for more details. -You should have received a copy of the GNU General Public License along with MadelineProto. -If not, see <http://www.gnu.org/licenses/>. -*/ +/** + * TL module. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see <http://www.gnu.org/licenses/>. + * + * @author Daniil Gentili <daniil@daniil.it> + * @copyright 2016-2018 Daniil Gentili <daniil@daniil.it> + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ namespace danog\MadelineProto\TL; @@ -21,10 +27,12 @@ trait TL public $td_constructors; public $td_methods; public $td_descriptions; + public $tl_callbacks = []; - public function construct_tl($files) + public function construct_tl($files, $objects = []) { $this->logger->logger(\danog\MadelineProto\Lang::$current_lang['TL_loading'], \danog\MadelineProto\Logger::VERBOSE); + $this->update_callbacks($objects); $this->constructors = new TLConstructor(); $this->methods = new TLMethod(); $this->td_constructors = new TLConstructor(); @@ -116,19 +124,24 @@ trait TL $TL_dict[$type][$key][$type === 'constructors' ? 'predicate' : 'method'] = $name; $TL_dict[$type][$key]['id'] = strrev(hex2bin($id)); $TL_dict[$type][$key]['params'] = []; - $TL_dict[$type][$key]['type'] = preg_replace(['/.+\\s/', '/;/'], '', $line); + $TL_dict[$type][$key]['type'] = preg_replace(['/.+\\s+=\\s+/', '/;/'], '', $line); if ($layer !== null) { $TL_dict[$type][$key]['layer'] = $layer; } - foreach (explode(' ', preg_replace(['/^[^\\s]+\\s/', '/=\\s[^\\s]+/', '/\\s$/'], '', $line)) as $param) { - if ($param === '') { - continue; + if ($name !== 'vector' && $TL_dict[$type][$key]['type'] !== 'Vector t') { + foreach (explode(' ', preg_replace(['/^[^\\s]+\\s/', '/=\\s[^\\s]+/', '/\\s$/'], '', $line)) as $param) { + if ($param === '') { + continue; + } + if ($param[0] === '{') { + continue; + } + if ($param === '#') { + continue; + } + $explode = explode(':', $param); + $TL_dict[$type][$key]['params'][] = ['name' => $explode[0], 'type' => $explode[1]]; } - if ($param[0] === '{') { - continue; - } - $explode = explode(':', $param); - $TL_dict[$type][$key]['params'][] = ['name' => $explode[0], 'type' => $explode[1]]; } $key++; } @@ -203,6 +216,36 @@ trait TL return $this->methods->method_namespace; } + public function update_callbacks($objects) + { + $this->tl_callbacks = []; + foreach ($objects as $object) { + if (!isset(class_implements(get_class($object))['danog\\MadelineProto\\TL\\TLCallback'])) { + throw new Exception('Invalid callback object provided!'); + } + $new = [ + TLCallback::METHOD_BEFORE_CALLBACK => $object->getMethodBeforeCallbacks(), + TLCallback::METHOD_CALLBACK => $object->getMethodCallbacks(), + TLCallback::CONSTRUCTOR_BEFORE_CALLBACK => $object->getConstructorBeforeCallbacks(), + TLCallback::CONSTRUCTOR_CALLBACK => $object->getConstructorCallbacks(), + TLCallback::CONSTRUCTOR_SERIALIZE_CALLBACK => $object->getConstructorSerializeCallbacks(), + TLCallback::TYPE_MISMATCH_CALLBACK => $object->getTypeMismatchCallbacks(), + ]; + foreach ($new as $type => $values) { + foreach ($values as $match => $callback) { + if (!isset($this->tl_callbacks[$type][$match])) { + $this->tl_callbacks[$type][$match] = []; + } + if (in_array($type, [TLCallback::TYPE_MISMATCH_CALLBACK, TLCallback::CONSTRUCTOR_SERIALIZE_CALLBACK])) { + $this->tl_callbacks[$type][$match] = $callback; + } else { + $this->tl_callbacks[$type][$match] = array_merge($callback, $this->tl_callbacks[$type][$match]); + } + } + } + } + } + public function deserialize_bool($id) { $tl_elem = $this->constructors->find_by_id($id); @@ -343,20 +386,13 @@ trait TL } } $auto = false; + if ($type['type'] === 'InputMessage' && !is_array($object)) { $object = ['_' => 'inputMessageID', 'id' => $object]; - } - if (in_array($type['type'], ['User', 'InputUser', 'Chat', 'InputChannel', 'Peer', 'InputPeer', 'InputDialogPeer', 'InputNotifyPeer']) && (!is_array($object) || isset($object['_']) && $this->constructors->find_by_predicate($object['_'])['type'] !== $type['type'])) { - $object = $this->get_info($object); + } elseif (isset($this->tl_callbacks[TLCallback::TYPE_MISMATCH_CALLBACK][$type['type']]) && (!is_array($object) || isset($object['_']) && $this->constructors->find_by_predicate($object['_'])['type'] !== $type['type'])) { + $object = $this->tl_callbacks[TLCallback::TYPE_MISMATCH_CALLBACK][$type['type']]($object); if (!isset($object[$type['type']])) { - throw new \danog\MadelineProto\Exception(\danog\MadelineProto\Lang::$current_lang['peer_not_in_db']); - } - $object = $object[$type['type']]; - } - if (in_array($type['type'], ['InputMedia', 'InputDocument', 'InputPhoto']) && (!is_array($object) || isset($object['_']) && $this->constructors->find_by_predicate($object['_'])['type'] !== $type['type'])) { - $object = $this->get_file_info($object); - if (!isset($object[$type['type']])) { - throw new \danog\MadelineProto\Exception('Could not convert media object'); + throw new \danog\MadelineProto\Exception("Could not convert {$type['type']} object"); } $object = $object[$type['type']]; } @@ -368,6 +404,10 @@ trait TL $auto = true; $object['_'] = $constructorData['predicate']; } + if (isset($this->tl_callbacks[TLCallback::CONSTRUCTOR_SERIALIZE_CALLBACK][$object['_']])) { + $object = $this->tl_callbacks[TLCallback::CONSTRUCTOR_SERIALIZE_CALLBACK][$object['_']]($object); + } + $predicate = $object['_']; $constructorData = $this->constructors->find_by_predicate($predicate, $layer); if ($constructorData === false) { @@ -384,6 +424,7 @@ trait TL if ($predicate === 'messageEntityMentionName') { $constructorData = $this->constructors->find_by_predicate('inputMessageEntityMentionName'); } + $concat = ''; if (!$bare) { $concat = $constructorData['id']; @@ -401,17 +442,14 @@ trait TL } else { $arguments['hash'] = $matches[2]; } - } - if ($method === 'messages.checkChatInvite' && isset($arguments['hash']) && is_string($arguments['hash']) && preg_match('@(?:t|telegram)\.(?:me|dog)/joinchat/([a-z0-9_-]*)@i', $arguments['hash'], $matches)) { + } elseif ($method === 'messages.checkChatInvite' && isset($arguments['hash']) && is_string($arguments['hash']) && preg_match('@(?:t|telegram)\.(?:me|dog)/joinchat/([a-z0-9_-]*)@i', $arguments['hash'], $matches)) { $arguments['hash'] = $matches[1]; - } - if ($method === 'channels.joinChannel' && isset($arguments['channel']) && is_string($arguments['channel']) && preg_match('@(?:t|telegram)\.(?:me|dog)/(joinchat/)?([a-z0-9_-]*)@i', $arguments['channel'], $matches)) { + } elseif ($method === 'channels.joinChannel' && isset($arguments['channel']) && is_string($arguments['channel']) && preg_match('@(?:t|telegram)\.(?:me|dog)/(joinchat/)?([a-z0-9_-]*)@i', $arguments['channel'], $matches)) { if ($matches[1] !== '') { $method = 'messages.importChatInvite'; $arguments['hash'] = $matches[2]; } - } - if ($method === 'messages.sendMessage' && isset($arguments['peer']['_']) && $arguments['peer']['_'] === 'inputEncryptedChat') { + } elseif ($method === 'messages.sendMessage' && isset($arguments['peer']['_']) && $arguments['peer']['_'] === 'inputEncryptedChat') { $method = 'messages.sendEncrypted'; $arguments = ['peer' => $arguments['peer'], 'message' => $arguments]; if (!isset($arguments['message']['_'])) { @@ -423,8 +461,7 @@ trait TL if (isset($arguments['message']['reply_to_msg_id'])) { $arguments['message']['reply_to_random_id'] = $arguments['message']['reply_to_msg_id']; } - } - if ($method === 'messages.sendEncryptedFile') { + } elseif ($method === 'messages.sendEncryptedFile') { if (isset($arguments['file'])) { if (!is_array($arguments['file']) && $this->settings['upload']['allow_automatic_upload']) { $arguments['file'] = $this->upload_encrypted($arguments['file']); @@ -436,7 +473,32 @@ trait TL $arguments['message']['media']['iv'] = $arguments['file']['iv']; } } + } elseif (in_array($method, ['messages.addChatUser', 'messages.deleteChatUser', 'messages.editChatAdmin', 'messages.editChatPhoto', 'messages.editChatTitle', 'messages.getFullChat', 'messages.exportChatInvite', 'messages.editChatAdmin', 'messages.migrateChat']) && isset($arguments['chat_id']) && (!is_numeric($arguments['chat_id']) || $arguments['chat_id'] < 0)) { + $res = $this->get_info($arguments['chat_id']); + if ($res['type'] !== 'chat') { + throw new \danog\MadelineProto\Exception('chat_id is not a chat id (only normal groups allowed, not supergroups)!'); + } + $arguments['chat_id'] = $res['chat_id']; + } elseif ($method === 'photos.updateProfilePhoto') { + if (isset($arguments['id'])) { + if (!is_array($arguments['id'])) { + $method = 'photos.uploadProfilePhoto'; + $arguments['file'] = $arguments['id']; + } + } elseif (isset($arguments['file'])) { + $method = 'photos.uploadProfilePhoto'; + } + } elseif ($method === 'photos.uploadProfilePhoto') { + if (isset($arguments['file'])) { + if (is_array($arguments['file']) && !in_array($arguments['file']['_'], ['inputFile', 'inputFileBig'])) { + $method = 'photos.uploadProfilePhoto'; + $arguments['id'] = $arguments['file']; + } + } elseif (isset($arguments['id'])) { + $method = 'photos.updateProfilePhoto'; + } } + $tl = $this->methods->find_by_method($method); if ($tl === false) { throw new Exception(\danog\MadelineProto\Lang::$current_lang['method_not_found'].$method); @@ -478,7 +540,7 @@ trait TL continue; } if ($current_argument['name'] === 'random_bytes') { - $serialized .= $this->serialize_object(['type' => 'bytes'], $this->random(15 + 4 * (random_int(0, PHP_INT_MAX) % 3)), 'random_bytes'); + $serialized .= $this->serialize_object(['type' => 'bytes'], $this->random(15 + 4 * $this->random_int($modulus = 3)), 'random_bytes'); continue; } if ($current_argument['name'] === 'data' && isset($tl['method']) && in_array($tl['method'], ['messages.sendEncrypted', 'messages.sendEncryptedFile', 'messages.sendEncryptedService']) && isset($arguments['message'])) { @@ -705,6 +767,11 @@ trait TL return false; } $x = ['_' => $constructorData['predicate']]; + if (isset($this->tl_callbacks[TLCallback::CONSTRUCTOR_BEFORE_CALLBACK][$x['_']])) { + foreach ($this->tl_callbacks[TLCallback::CONSTRUCTOR_BEFORE_CALLBACK][$x['_']] as $callback) { + $callback($x['_']); + } + } foreach ($constructorData['params'] as $arg) { if (isset($arg['pow'])) { switch ($arg['type']) { @@ -732,8 +799,20 @@ trait TL if (in_array($arg['name'], ['peer_tag', 'file_token', 'cdn_key', 'cdn_iv'])) { $arg['type'] = 'string'; } - if ($x['_'] === 'rpc_result' && $arg['name'] === 'result' && isset($this->datacenter->sockets[$type['datacenter']]->new_outgoing[$x['req_msg_id']]['type']) && stripos($this->datacenter->sockets[$type['datacenter']]->new_outgoing[$x['req_msg_id']]['type'], '<') !== false) { - $arg['subtype'] = preg_replace(['|Vector[<]|', '|[>]|'], '', $this->datacenter->sockets[$type['datacenter']]->new_outgoing[$x['req_msg_id']]['type']); + if ($x['_'] === 'rpc_result' && $arg['name'] === 'result') { + if (isset($this->datacenter->sockets[$type['datacenter']]->outgoing_messages[$x['req_msg_id']]['_']) + && isset($this->tl_callbacks[TLCallback::METHOD_BEFORE_CALLBACK][$this->datacenter->sockets[$type['datacenter']]->outgoing_messages[$x['req_msg_id']]['_']]) + ) { + foreach ($this->tl_callbacks[TLCallback::METHOD_BEFORE_CALLBACK][$this->datacenter->sockets[$type['datacenter']]->outgoing_messages[$x['req_msg_id']]['_']] as $callback) { + $callback($this->datacenter->sockets[$type['datacenter']]->outgoing_messages[$x['req_msg_id']]['_']); + } + } + + if (isset($this->datacenter->sockets[$type['datacenter']]->outgoing_messages[$x['req_msg_id']]['type']) + && stripos($this->datacenter->sockets[$type['datacenter']]->outgoing_messages[$x['req_msg_id']]['type'], '<') !== false + ) { + $arg['subtype'] = str_replace(['Vector<', '>'], '', $this->datacenter->sockets[$type['datacenter']]->outgoing_messages[$x['req_msg_id']]['type']); + } } if (isset($type['datacenter'])) { $arg['datacenter'] = $type['datacenter']; @@ -753,7 +832,35 @@ trait TL } if ($x['_'] === 'dataJSON') { return json_decode($x['data'], true); + } elseif ($constructorData['type'] === 'JSONValue') { + switch ($x['_']) { + case 'jsonNull': + return; + case 'jsonObject': + $res = []; + foreach ($x['value'] as $pair) { + $res[$pair['key']] = $pair['value']; + } + + return $res; + default: + return $x['value']; + } } + + if (isset($this->tl_callbacks[TLCallback::CONSTRUCTOR_CALLBACK][$x['_']])) { + foreach ($this->tl_callbacks[TLCallback::CONSTRUCTOR_CALLBACK][$x['_']] as $callback) { + $callback($x); + } + } elseif ($x['_'] === 'rpc_result' + && isset($this->datacenter->sockets[$type['datacenter']]->outgoing_messages[$x['req_msg_id']]['_']) + && isset($this->tl_callbacks[TLCallback::METHOD_CALLBACK][$this->datacenter->sockets[$type['datacenter']]->outgoing_messages[$x['req_msg_id']]['_']]) + ) { + foreach ($this->tl_callbacks[TLCallback::METHOD_CALLBACK][$this->datacenter->sockets[$type['datacenter']]->outgoing_messages[$x['req_msg_id']]['_']] as $callback) { + $callback($this->datacenter->sockets[$type['datacenter']]->outgoing_messages[$x['req_msg_id']], $x['result']); + } + } + if ($x['_'] === 'message' && isset($x['reply_markup']['rows'])) { foreach ($x['reply_markup']['rows'] as $key => $row) { foreach ($row['buttons'] as $bkey => $button) { diff --git a/src/danog/MadelineProto/TL/TLCallback.php b/src/danog/MadelineProto/TL/TLCallback.php new file mode 100644 index 00000000..e21959f8 --- /dev/null +++ b/src/danog/MadelineProto/TL/TLCallback.php @@ -0,0 +1,41 @@ +<?php +/** + * TL callback module. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see <http://www.gnu.org/licenses/>. + * + * @author Daniil Gentili <daniil@daniil.it> + * @copyright 2016-2018 Daniil Gentili <daniil@daniil.it> + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ + +namespace danog\MadelineProto\TL; + +interface TLCallback +{ + const METHOD_CALLBACK = 0; + const METHOD_BEFORE_CALLBACK = 1; + const CONSTRUCTOR_CALLBACK = 2; + const CONSTRUCTOR_BEFORE_CALLBACK = 3; + const CONSTRUCTOR_SERIALIZE_CALLBACK = 4; + const TYPE_MISMATCH_CALLBACK = 5; + + public function getMethodCallbacks(): array; + + public function getMethodBeforeCallbacks(): array; + + public function getConstructorCallbacks(): array; + + public function getConstructorBeforeCallbacks(): array; + + public function getConstructorSerializeCallbacks(): array; + + public function getTypeMismatchCallbacks(): array; +} diff --git a/src/danog/MadelineProto/TL/TLConstructor.php b/src/danog/MadelineProto/TL/TLConstructor.php index 633512b2..9749c6f8 100644 --- a/src/danog/MadelineProto/TL/TLConstructor.php +++ b/src/danog/MadelineProto/TL/TLConstructor.php @@ -1,15 +1,21 @@ <?php -/* -Copyright 2016-2018 Daniil Gentili -(https://daniil.it) -This file is part of MadelineProto. -MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. -MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -See the GNU Affero General Public License for more details. -You should have received a copy of the GNU General Public License along with MadelineProto. -If not, see <http://www.gnu.org/licenses/>. -*/ +/** + * TLConstructor module. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see <http://www.gnu.org/licenses/>. + * + * @author Daniil Gentili <daniil@daniil.it> + * @copyright 2016-2018 Daniil Gentili <daniil@daniil.it> + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ namespace danog\MadelineProto\TL; @@ -22,10 +28,6 @@ class TLConstructor public $by_predicate_and_layer = []; public $layers = []; - //public $type = []; - //public $params = []; - //public $layer = []; - //public $key = 0; public function __sleep() { return ['by_predicate_and_layer', 'by_id', 'layers']; diff --git a/src/danog/MadelineProto/TL/TLMethod.php b/src/danog/MadelineProto/TL/TLMethod.php index f7b57926..6d4826d2 100644 --- a/src/danog/MadelineProto/TL/TLMethod.php +++ b/src/danog/MadelineProto/TL/TLMethod.php @@ -1,15 +1,21 @@ <?php -/* -Copyright 2016-2018 Daniil Gentili -(https://daniil.it) -This file is part of MadelineProto. -MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. -MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -See the GNU Affero General Public License for more details. -You should have received a copy of the GNU General Public License along with MadelineProto. -If not, see <http://www.gnu.org/licenses/>. -*/ +/** + * TLMethod module. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see <http://www.gnu.org/licenses/>. + * + * @author Daniil Gentili <daniil@daniil.it> + * @copyright 2016-2018 Daniil Gentili <daniil@daniil.it> + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ namespace danog\MadelineProto\TL; diff --git a/src/danog/MadelineProto/TL/TLParams.php b/src/danog/MadelineProto/TL/TLParams.php index b83d9402..57f51c61 100644 --- a/src/danog/MadelineProto/TL/TLParams.php +++ b/src/danog/MadelineProto/TL/TLParams.php @@ -1,15 +1,21 @@ <?php -/* -Copyright 2016-2018 Daniil Gentili -(https://daniil.it) -This file is part of MadelineProto. -MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. -MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -See the GNU Affero General Public License for more details. -You should have received a copy of the GNU General Public License along with MadelineProto. -If not, see <http://www.gnu.org/licenses/>. -*/ +/** + * TLParams module. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see <http://www.gnu.org/licenses/>. + * + * @author Daniil Gentili <daniil@daniil.it> + * @copyright 2016-2018 Daniil Gentili <daniil@daniil.it> + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ namespace danog\MadelineProto\TL; diff --git a/src/danog/MadelineProto/TL/Types/Button.php b/src/danog/MadelineProto/TL/Types/Button.php index 0acc039c..14bbba51 100644 --- a/src/danog/MadelineProto/TL/Types/Button.php +++ b/src/danog/MadelineProto/TL/Types/Button.php @@ -1,15 +1,21 @@ <?php -/* -Copyright 2016-2018 Daniil Gentili -(https://daniil.it) -This file is part of MadelineProto. -MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. -MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -See the GNU Affero General Public License for more details. -You should have received a copy of the GNU General Public License along with MadelineProto. -If not, see <http://www.gnu.org/licenses/>. -*/ +/** + * Button module. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see <http://www.gnu.org/licenses/>. + * + * @author Daniil Gentili <daniil@daniil.it> + * @copyright 2016-2018 Daniil Gentili <daniil@daniil.it> + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ namespace danog\MadelineProto\TL\Types; diff --git a/src/danog/MadelineProto/TL/Types/Bytes.php b/src/danog/MadelineProto/TL/Types/Bytes.php index 34c70de4..9f277c8e 100644 --- a/src/danog/MadelineProto/TL/Types/Bytes.php +++ b/src/danog/MadelineProto/TL/Types/Bytes.php @@ -1,15 +1,21 @@ <?php -/* -Copyright 2016-2018 Daniil Gentili -(https://daniil.it) -This file is part of MadelineProto. -MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. -MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -See the GNU Affero General Public License for more details. -You should have received a copy of the GNU General Public License along with MadelineProto. -If not, see <http://www.gnu.org/licenses/>. -*/ +/** + * Bytes module. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see <http://www.gnu.org/licenses/>. + * + * @author Daniil Gentili <daniil@daniil.it> + * @copyright 2016-2018 Daniil Gentili <daniil@daniil.it> + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ namespace danog\MadelineProto\TL\Types; diff --git a/src/danog/MadelineProto/TL_mtproto_v1.tl b/src/danog/MadelineProto/TL_mtproto_v1.tl new file mode 100644 index 00000000..16e7f39c --- /dev/null +++ b/src/danog/MadelineProto/TL_mtproto_v1.tl @@ -0,0 +1,86 @@ +resPQ#05162463 nonce:int128 server_nonce:int128 pq:string server_public_key_fingerprints:Vector<long> = ResPQ; + +vector {t:Type} # [ t ] = Vector t; + +p_q_inner_data_dc#a9f55f95 pq:string p:string q:string nonce:int128 server_nonce:int128 new_nonce:int256 dc:int = P_Q_inner_data; +p_q_inner_data_temp_dc#56fddf88 pq:string p:string q:string nonce:int128 server_nonce:int128 new_nonce:int256 dc:int expires_in:int = P_Q_inner_data; + +p_q_inner_data pq:string p:string q:string nonce:int128 server_nonce:int128 new_nonce:int256 = P_Q_inner_data; +p_q_inner_data_temp pq:string p:string q:string nonce:int128 server_nonce:int128 new_nonce:int256 expires_in:int = P_Q_inner_data; + +server_DH_params_fail#79cb045d nonce:int128 server_nonce:int128 new_nonce_hash:int128 = Server_DH_Params; +server_DH_params_ok#d0e8075c nonce:int128 server_nonce:int128 encrypted_answer:string = Server_DH_Params; + +server_DH_inner_data#b5890dba nonce:int128 server_nonce:int128 g:int dh_prime:string g_a:string server_time:int = Server_DH_inner_data; + +client_DH_inner_data#6643b654 nonce:int128 server_nonce:int128 retry_id:long g_b:string = Client_DH_Inner_Data; + +dh_gen_ok#3bcbf734 nonce:int128 server_nonce:int128 new_nonce_hash1:int128 = Set_client_DH_params_answer; +dh_gen_retry#46dc1fb9 nonce:int128 server_nonce:int128 new_nonce_hash2:int128 = Set_client_DH_params_answer; +dh_gen_fail#a69dae02 nonce:int128 server_nonce:int128 new_nonce_hash3:int128 = Set_client_DH_params_answer; + +bind_auth_key_inner#75a3f765 nonce:long temp_auth_key_id:long perm_auth_key_id:long temp_session_id:long expires_at:int = BindAuthKeyInner; + +rpc_result#f35c6d01 req_msg_id:long result:Object = RpcResult; +rpc_error#2144ca19 error_code:int error_message:string = RpcError; + +rpc_answer_unknown#5e2ad36e = RpcDropAnswer; +rpc_answer_dropped_running#cd78e586 = RpcDropAnswer; +rpc_answer_dropped#a43ad8b7 msg_id:long seq_no:int bytes:int = RpcDropAnswer; + +future_salt#0949d9dc valid_since:int valid_until:int salt:long = FutureSalt; +future_salts#ae500895 req_msg_id:long now:int salts:vector<future_salt> = FutureSalts; + +pong#347773c5 msg_id:long ping_id:long = Pong; + +destroy_session_ok#e22045fc session_id:long = DestroySessionRes; +destroy_session_none#62d350c9 session_id:long = DestroySessionRes; + +new_session_created#9ec20908 first_msg_id:long unique_id:long server_salt:long = NewSession; + +msg_container#73f1f8dc messages:vector<%Message> = MessageContainer; +message msg_id:long seqno:int bytes:int body:Object = Message; +msg_copy#e06046b2 orig_message:Message = MessageCopy; + +gzip_packed#3072cfa1 packed_data:bytes = Object; + +msgs_ack#62d6b459 msg_ids:Vector<long> = MsgsAck; + +bad_msg_notification#a7eff811 bad_msg_id:long bad_msg_seqno:int error_code:int = BadMsgNotification; +bad_server_salt#edab447b bad_msg_id:long bad_msg_seqno:int error_code:int new_server_salt:long = BadMsgNotification; + +msg_resend_ans_req#8610baeb msg_ids:Vector<long> = MsgResendReq; +msg_resend_req#7d861a08 msg_ids:Vector<long> = MsgResendReq; +msgs_state_req#da69fb52 msg_ids:Vector<long> = MsgsStateReq; +msgs_state_info#04deb57d req_msg_id:long info:string = MsgsStateInfo; +msgs_all_info#8cc0d131 msg_ids:Vector<long> info:string = MsgsAllInfo; +msg_detailed_info#276d3ec6 msg_id:long answer_msg_id:long bytes:int status:int = MsgDetailedInfo; +msg_new_detailed_info#809db6df answer_msg_id:long bytes:int status:int = MsgDetailedInfo; + +rsa_public_key n:string e:string = RSAPublicKey; + +http_wait#9299359f max_delay:int wait_after:int max_wait:int = HttpWait; + +---functions--- + +req_pq_multi#be7e8ef1 nonce:int128 = ResPQ; + +req_pq nonce:int128 = ResPQ; + +req_DH_params#d712e4be nonce:int128 server_nonce:int128 p:string q:string public_key_fingerprint:long encrypted_data:string = Server_DH_Params; + +set_client_DH_params#f5045f1f nonce:int128 server_nonce:int128 encrypted_data:string = Set_client_DH_params_answer; + +rpc_drop_answer#58e4a740 req_msg_id:long = RpcDropAnswer; +get_future_salts#b921bd04 num:int = FutureSalts; +ping#7abe77ec ping_id:long = Pong; +ping_delay_disconnect#f3427b8c ping_id:long disconnect_delay:int = Pong; +destroy_session#e7512126 session_id:long = DestroySessionRes; + +//test.useGzipPacked = GzipPacked; +//test.useServerDhInnerData = Server_DH_inner_data; +//test.useNewSessionCreated = NewSession; +//test.useMsgsAck = MsgsAck; +//test.useBadMsgNotification = BadMsgNotification; + +//test.useOther key:rsa_public_key p_q_data:P_Q_inner_data dh_data:client_DH_inner_data = RpcError; diff --git a/src/danog/MadelineProto/TL_telegram_v86.tl b/src/danog/MadelineProto/TL_telegram_v86.tl new file mode 100644 index 00000000..7510dc81 --- /dev/null +++ b/src/danog/MadelineProto/TL_telegram_v86.tl @@ -0,0 +1,1203 @@ +---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<IpPort> = AccessPointRule; +help.configSimple#5a592a6c date:int expires:int rules:vector<AccessPointRule> = 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<InputDocument> ttl_seconds:flags.1?int = InputMedia; +inputMediaPhoto#b3ba0635 flags:# id:InputPhoto ttl_seconds:flags.0?int = InputMedia; +inputMediaGeoPoint#f9c44144 geo_point:InputGeoPoint = InputMedia; +inputMediaContact#f8ab7dfb phone_number:string first_name:string last_name:string vcard:string = InputMedia; +inputMediaUploadedDocument#5b38c6c1 flags:# nosound_video:flags.3?true file:InputFile thumb:flags.2?InputFile mime_type:string attributes:Vector<DocumentAttribute> stickers:flags.0?Vector<InputDocument> 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#3bb3b94a id:long access_hash:long file_reference:bytes = InputPhoto; + +inputFileLocation#dfdaabe1 volume_id:long local_id:int secret:long file_reference:bytes = InputFileLocation; +inputEncryptedFileLocation#f5235d55 id:long access_hash:long = InputFileLocation; +inputDocumentFileLocation#196683d9 id:long access_hash:long file_reference:bytes = 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#91d11eb dc_id:int volume_id:long local_id:int secret:long file_reference:bytes = 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<BotInfo> = 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<BotInfo> migrated_from_chat_id:flags.4?int migrated_from_max_id:flags.4?int pinned_msg_id:flags.5?int stickerset:flags.8?StickerSet available_min_id:flags.9?int = 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<ChatParticipant> 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<MessageEntity> 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#cbf24940 phone_number:string first_name:string last_name:string vcard: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<int> = MessageAction; +messageActionChatEditTitle#b5a1ce5a title:string = MessageAction; +messageActionChatEditPhoto#7fcb13a8 photo:Photo = MessageAction; +messageActionChatDeletePhoto#95e3fbef = MessageAction; +messageActionChatAddUser#488a7337 users:Vector<int> = 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<SecureValue> credentials:SecureCredentialsEncrypted = MessageAction; +messageActionSecureValuesSent#d95c6154 types:Vector<SecureValueType> = MessageAction; + +dialog#e4def5db flags:# pinned:flags.2?true unread_mark:flags.3?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#9c477dd8 flags:# has_stickers:flags.0?true id:long access_hash:long file_reference:bytes date:int sizes:Vector<PhotoSize> = 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#296f104 long:double lat:double access_hash:long = 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<PhotoSize> 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; +inputReportReasonCopyright#9b89f93a = 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<Contact> saved_count:int users:Vector<User> = contacts.Contacts; + +contacts.importedContacts#77d01c3b imported:Vector<ImportedContact> popular_invites:Vector<PopularContact> retry_contacts:Vector<long> users:Vector<User> = contacts.ImportedContacts; + +contacts.blocked#1c138d15 blocked:Vector<ContactBlocked> users:Vector<User> = contacts.Blocked; +contacts.blockedSlice#900802a1 count:int blocked:Vector<ContactBlocked> users:Vector<User> = contacts.Blocked; + +messages.dialogs#15ba6c40 dialogs:Vector<Dialog> messages:Vector<Message> chats:Vector<Chat> users:Vector<User> = messages.Dialogs; +messages.dialogsSlice#71e094f3 count:int dialogs:Vector<Dialog> messages:Vector<Message> chats:Vector<Chat> users:Vector<User> = messages.Dialogs; +messages.dialogsNotModified#f0e3e596 count:int = messages.Dialogs; + +messages.messages#8c718e87 messages:Vector<Message> chats:Vector<Chat> users:Vector<User> = messages.Messages; +messages.messagesSlice#b446ae3 count:int messages:Vector<Message> chats:Vector<Chat> users:Vector<User> = messages.Messages; +messages.channelMessages#99262e37 flags:# pts:int count:int messages:Vector<Message> chats:Vector<Chat> users:Vector<User> = messages.Messages; +messages.messagesNotModified#74535f21 count:int = messages.Messages; + +messages.chats#64ff9fd5 chats:Vector<Chat> = messages.Chats; +messages.chatsSlice#9cd81144 count:int chats:Vector<Chat> = messages.Chats; + +messages.chatFull#e5d7d19c full_chat:ChatFull chats:Vector<Chat> users:Vector<User> = 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<int> 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<DcOption> = 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<MessageEntity> = Update; +updatePrivacy#ee3b272a key:PrivacyKey rules:Vector<PrivacyRule> = 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<int> 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<int> 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<long> = 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<DialogPeer> = 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<int> = Update; +updateContactsReset#7084a7be = Update; +updateChannelAvailableMessages#70db6837 channel_id:int available_min_id:int = Update; +updateDialogUnreadMark#e16459c3 flags:# unread:flags.0?true peer:DialogPeer = 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<Message> new_encrypted_messages:Vector<EncryptedMessage> other_updates:Vector<Update> chats:Vector<Chat> users:Vector<User> state:updates.State = updates.Difference; +updates.differenceSlice#a8fb1981 new_messages:Vector<Message> new_encrypted_messages:Vector<EncryptedMessage> other_updates:Vector<Update> chats:Vector<Chat> users:Vector<User> 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<MessageEntity> = 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<MessageEntity> = Updates; +updateShort#78d4dec1 update:Update date:int = Updates; +updatesCombined#725b04c3 updates:Vector<Update> users:Vector<User> chats:Vector<Chat> date:int seq_start:int seq:int = Updates; +updates#74ae4240 updates:Vector<Update> users:Vector<User> chats:Vector<Chat> 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<MessageEntity> = Updates; + +photos.photos#8dca6aa5 photos:Vector<Photo> users:Vector<User> = photos.Photos; +photos.photosSlice#15051f54 count:int photos:Vector<Photo> users:Vector<User> = photos.Photos; + +photos.photo#20212ca8 photo:Photo users:Vector<User> = 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<FileHash> = 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#3213dbba 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<DcOption> dc_txt_domain_name:string 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 gif_search_username:flags.9?string venue_search_username:flags.10?string img_search_username:flags.11?string static_maps_provider:flags.12?string caption_length_max:int message_length_max:int webfile_dc_id:int 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#1da7158f flags:# popup:flags.0?true id:int version:string text:string entities:Vector<MessageEntity> document:flags.1?Document url:flags.2?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#1abfb575 id:long access_hash:long file_reference:bytes = InputDocument; + +documentEmpty#36f8c871 id:long = Document; +document#59534e4c id:long access_hash:long file_reference:bytes date:int mime_type:string size:int thumb:PhotoSize dc_id:int attributes:Vector<DocumentAttribute> = 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<Peer> results:Vector<Peer> chats:Vector<Chat> users:Vector<User> = 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<InputUser> = InputPrivacyRule; +inputPrivacyValueDisallowContacts#ba52007 = InputPrivacyRule; +inputPrivacyValueDisallowAll#d66b66c9 = InputPrivacyRule; +inputPrivacyValueDisallowUsers#90110467 users:Vector<InputUser> = InputPrivacyRule; + +privacyValueAllowContacts#fffe1bac = PrivacyRule; +privacyValueAllowAll#65427b82 = PrivacyRule; +privacyValueAllowUsers#4d5bbe0c users:Vector<int> = PrivacyRule; +privacyValueDisallowContacts#f888fa1a = PrivacyRule; +privacyValueDisallowAll#8b73e763 = PrivacyRule; +privacyValueDisallowUsers#c7f49b7 users:Vector<int> = PrivacyRule; + +account.privacyRules#554abb6f rules:Vector<PrivacyRule> users:Vector<User> = 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<Document> = messages.Stickers; + +stickerPack#12b299d4 emoticon:string documents:Vector<long> = StickerPack; + +messages.allStickersNotModified#e86602c3 = messages.AllStickers; +messages.allStickers#edfd405f hash:int sets:Vector<StickerSet> = 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<Authorization> = account.Authorizations; + + +account.password#ad2641f8 flags:# has_recovery:flags.0?true has_secure_values:flags.1?true has_password:flags.2?true current_algo:flags.2?PasswordKdfAlgo srp_B:flags.2?bytes srp_id:flags.2?long hint:flags.3?string email_unconfirmed_pattern:flags.4?string new_algo:PasswordKdfAlgo new_secure_algo:SecurePasswordKdfAlgo secure_random:bytes = account.Password; + +account.passwordSettings#9a5c33e5 flags:# email:flags.0?string secure_settings:flags.1?SecureSecretSettings = account.PasswordSettings; + +account.passwordInputSettings#c23727c9 flags:# new_algo:flags.0?PasswordKdfAlgo new_password_hash:flags.0?bytes hint:flags.0?string email:flags.1?string new_secure_settings:flags.2?SecureSecretSettings = 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<User> = 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<StickerPack> documents:Vector<Document> = messages.StickerSet; + +botCommand#c27ac8c7 command:string description:string = BotCommand; + +botInfo#98e81d3a user_id:int description:string commands:Vector<BotCommand> = 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<KeyboardButton> = 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<KeyboardButtonRow> = ReplyMarkup; +replyInlineMarkup#48a30254 rows:Vector<KeyboardButtonRow> = 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<Chat> users:Vector<User> = 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<Message> chats:Vector<Chat> users:Vector<User> = updates.ChannelDifference; +updates.channelDifference#2064674e flags:# final:flags.0?true pts:int timeout:flags.1?int new_messages:Vector<Message> other_updates:Vector<Update> chats:Vector<Chat> users:Vector<User> = updates.ChannelDifference; + +channelMessagesFilterEmpty#94d42ee7 = ChannelMessagesFilter; +channelMessagesFilter#cd77d957 flags:# exclude_new_messages:flags.1?true ranges:Vector<MessageRange> = 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<ChannelParticipant> users:Vector<User> = channels.ChannelParticipants; +channels.channelParticipantsNotModified#f0173fe9 = channels.ChannelParticipants; + +channels.channelParticipant#d0d9b163 participant:ChannelParticipant users:Vector<User> = channels.ChannelParticipant; + +help.termsOfService#780a0310 flags:# popup:flags.0?true id:DataJSON text:string entities:Vector<MessageEntity> min_age_confirm:flags.1?int = help.TermsOfService; + +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<FoundGif> = messages.FoundGifs; + +messages.savedGifsNotModified#e8025ca2 = messages.SavedGifs; +messages.savedGifs#2e0709a5 hash:int gifs:Vector<Document> = messages.SavedGifs; + +inputBotInlineMessageMediaAuto#3380c786 flags:# message:string entities:flags.1?Vector<MessageEntity> reply_markup:flags.2?ReplyMarkup = InputBotInlineMessage; +inputBotInlineMessageText#3dcd7a87 flags:# no_webpage:flags.0?true message:string entities:flags.1?Vector<MessageEntity> reply_markup:flags.2?ReplyMarkup = InputBotInlineMessage; +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#a6edbffd flags:# phone_number:string first_name:string last_name:string vcard: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<MessageEntity> reply_markup:flags.2?ReplyMarkup = BotInlineMessage; +botInlineMessageText#8c7f65e2 flags:# no_webpage:flags.0?true message:string entities:flags.1?Vector<MessageEntity> 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#18d1cdc2 flags:# phone_number:string first_name:string last_name:string vcard: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<BotInlineResult> cache_time:int users:Vector<User> = 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<Dialog> messages:Vector<Message> chats:Vector<Chat> users:Vector<User> 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<TopPeer> = TopPeerCategoryPeers; + +contacts.topPeersNotModified#de266ef5 = contacts.TopPeers; +contacts.topPeers#70b772a8 categories:Vector<TopPeerCategoryPeers> chats:Vector<Chat> users:Vector<User> = contacts.TopPeers; +contacts.topPeersDisabled#b52c939d = contacts.TopPeers; + +draftMessageEmpty#1b0c841a flags:# date:flags.0?int = DraftMessage; +draftMessage#fd8e711f flags:# no_webpage:flags.1?true reply_to_msg_id:flags.0?int message:string entities:flags.3?Vector<MessageEntity> date:int = DraftMessage; + +messages.featuredStickersNotModified#4ede3cf = messages.FeaturedStickers; +messages.featuredStickers#f89d88e5 hash:int sets:Vector<StickerSetCovered> unread:Vector<long> = messages.FeaturedStickers; + +messages.recentStickersNotModified#b17f890 = messages.RecentStickers; +messages.recentStickers#22f3afb3 hash:int packs:Vector<StickerPack> stickers:Vector<Document> dates:Vector<int> = messages.RecentStickers; + +messages.archivedStickers#4fcba9c8 count:int sets:Vector<StickerSetCovered> = messages.ArchivedStickers; + +messages.stickerSetInstallResultSuccess#38641628 = messages.StickerSetInstallResult; +messages.stickerSetInstallResultArchive#35e410a8 sets:Vector<StickerSetCovered> = messages.StickerSetInstallResult; + +stickerSetCovered#6410a5d2 set:StickerSet cover:Document = StickerSetCovered; +stickerSetMultiCovered#3407e51b set:StickerSet covers:Vector<Document> = 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<HighScore> users:Vector<User> = 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> = 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<RichText> = 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<PageBlock> caption:RichText = PageBlock; +pageBlockCollage#8b31c4f items:Vector<PageBlock> caption:RichText = PageBlock; +pageBlockSlideshow#130c8963 items:Vector<PageBlock> caption:RichText = PageBlock; +pageBlockChannel#ef1751b5 channel:Chat = PageBlock; +pageBlockAudio#31b81a7f audio_id:long caption:RichText = PageBlock; + +pagePart#8e3f9ebe blocks:Vector<PageBlock> photos:Vector<Photo> documents:Vector<Document> = Page; +pageFull#556ec7aa blocks:Vector<PageBlock> photos:Vector<Photo> documents:Vector<Document> = 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<LabeledPrice> = 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#1c570ed1 url:string access_hash:long size:int mime_type:string attributes:Vector<DocumentAttribute> = WebDocument; +webDocumentNoProxy#f9c8bcc6 url:string size:int mime_type:string attributes:Vector<DocumentAttribute> = WebDocument; + +inputWebDocument#9bed434d url:string size:int mime_type:string attributes:Vector<DocumentAttribute> = InputWebDocument; + +inputWebFileLocation#c239d686 url:string access_hash:long = InputWebFileLocation; +inputWebFileGeoPointLocation#9f2221c9 geo_point:InputGeoPoint access_hash:long w:int h:int zoom:int scale:int = 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<User> = payments.PaymentForm; + +payments.validatedRequestedInfo#d1451883 flags:# id:flags.0?string shipping_options:flags.1?Vector<ShippingOption> = 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<User> = 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<LabeledPrice> = 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<PhoneConnection> 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<User> = 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<CdnPublicKey> = 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<LangPackString> = 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<ChannelAdminLogEvent> chats:Vector<Chat> users:Vector<User> = 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<StickerPack> stickers:Vector<Document> = 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<RecentMeUrl> chats:Vector<Chat> users:Vector<User> = help.RecentMeUrls; + +inputSingleMedia#1cc6e91f flags:# media:InputMedia random_id:long message:string entities:flags.0?Vector<MessageEntity> = InputSingleMedia; + +webAuthorization#cac943f2 hash:long bot_id:int domain:string browser:string platform:string date_created:int date_active:int ip:string region:string = WebAuthorization; + +account.webAuthorizations#ed56c9fc authorizations:Vector<WebAuthorization> users:Vector<User> = 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<StickerSetCovered> = 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<Chat> users:Vector<User> = 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#187fa0ca flags:# type:SecureValueType data:flags.0?SecureData front_side:flags.1?SecureFile reverse_side:flags.2?SecureFile selfie:flags.3?SecureFile translation:flags.6?Vector<SecureFile> files:flags.4?Vector<SecureFile> plain_data:flags.5?SecurePlainData hash:bytes = SecureValue; + +inputSecureValue#db21d0a7 flags:# type:SecureValueType data:flags.0?SecureData front_side:flags.1?InputSecureFile reverse_side:flags.2?InputSecureFile selfie:flags.3?InputSecureFile translation:flags.6?Vector<InputSecureFile> files:flags.4?Vector<InputSecureFile> 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<bytes> text:string = SecureValueError; +secureValueError#869d758f type:SecureValueType hash:bytes text:string = SecureValueError; +secureValueErrorTranslationFile#a1144770 type:SecureValueType file_hash:bytes text:string = SecureValueError; +secureValueErrorTranslationFiles#34636dd8 type:SecureValueType file_hash:Vector<bytes> text:string = SecureValueError; + +secureCredentialsEncrypted#33f0ea47 data:bytes hash:bytes secret:bytes = SecureCredentialsEncrypted; + +account.authorizationForm#ad2e1cd8 flags:# required_types:Vector<SecureRequiredType> values:Vector<SecureValue> errors:Vector<SecureValueError> users:Vector<User> 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<MessageEntity> = help.DeepLinkInfo; + +savedPhoneContact#1142bd56 phone:string first_name:string last_name:string date:int = SavedContact; + +account.takeout#4dba4501 id:long = account.Takeout; + +passwordKdfAlgoUnknown#d45ab096 = PasswordKdfAlgo; +passwordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow#3a912d4a salt1:bytes salt2:bytes g:int p:bytes = PasswordKdfAlgo; + +securePasswordKdfAlgoUnknown#4a8537 = SecurePasswordKdfAlgo; +securePasswordKdfAlgoPBKDF2HMACSHA512iter100000#bbf2dda0 salt:bytes = SecurePasswordKdfAlgo; +securePasswordKdfAlgoSHA512#86471d92 salt:bytes = SecurePasswordKdfAlgo; + +secureSecretSettings#1527bcac secure_algo:SecurePasswordKdfAlgo secure_secret:bytes secure_secret_id:long = SecureSecretSettings; + +inputCheckPasswordEmpty#9880f658 = InputCheckPasswordSRP; +inputCheckPasswordSRP#d27ff082 srp_id:long A:bytes M1:bytes = InputCheckPasswordSRP; + +secureRequiredType#829d99da flags:# native_names:flags.0?true selfie_required:flags.1?true translation_required:flags.2?true type:SecureValueType = SecureRequiredType; +secureRequiredTypeOneOf#27477b4 types:Vector<SecureRequiredType> = SecureRequiredType; + +help.passportConfigNotModified#bfb9f457 = help.PassportConfig; +help.passportConfig#a098d6af hash:int countries_langs:DataJSON = help.PassportConfig; + +---functions--- + +invokeAfterMsg#cb9f372d {X:Type} msg_id:long query:!X = X; +invokeAfterMsgs#3dc4b4f0 {X:Type} msg_ids:Vector<long> 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#d18b4d16 password:InputCheckPasswordSRP = 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<long> = Bool; + +account.registerDevice#5cbea590 token_type:int token:string app_sandbox:Bool secret:bytes other_uids:Vector<int> = Bool; +account.unregisterDevice#3076c4bf token_type:int token:string other_uids:Vector<int> = 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<WallPaper>; +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<InputPrivacyRule> = 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#9cd4eaf9 password:InputCheckPasswordSRP = account.PasswordSettings; +account.updatePasswordSettings#a59b102f password:InputCheckPasswordSRP 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#449e0b51 password:InputCheckPasswordSRP period:int = account.TmpPassword; +account.getWebAuthorizations#182e6d6f = account.WebAuthorizations; +account.resetWebAuthorization#2d01b9ef hash:long = Bool; +account.resetWebAuthorizations#682d2594 = Bool; +account.getAllSecureValues#b288bc7d = Vector<SecureValue>; +account.getSecureValue#73665bc2 types:Vector<SecureValueType> = Vector<SecureValue>; +account.saveSecureValue#899fe31d value:InputSecureValue secure_secret_id:long = SecureValue; +account.deleteSecureValue#b880bc4b types:Vector<SecureValueType> = 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<SecureValueHash> 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<InputUser> = Vector<User>; +users.getFullUser#ca30a5b1 id:InputUser = UserFull; +users.setSecureValueErrors#90c894b5 id:InputUser errors:Vector<SecureValueError> = Bool; + +contacts.getStatuses#c4a353ee = Vector<ContactStatus>; +contacts.getContacts#c023849f hash:int = contacts.Contacts; +contacts.importContacts#2c800be5 contacts:Vector<InputContact> = contacts.ImportedContacts; +contacts.deleteContact#8e953744 id:InputUser = contacts.Link; +contacts.deleteContacts#59ab389e id:Vector<InputUser> = 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<int>; +contacts.importCard#4fe196fe export_card:Vector<int> = 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<SavedContact>; +contacts.toggleTopPeers#8514bdda enabled:Bool = Bool; + +messages.getMessages#63c66506 id:Vector<InputMessage> = messages.Messages; +messages.getDialogs#b098aee6 flags:# exclude_pinned:flags.0?true offset_date:int offset_id:int offset_peer:InputPeer limit:int hash: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<int> = messages.AffectedMessages; +messages.receivedMessages#5a954c0 max_id:int = Vector<ReceivedNotifyMessage>; +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<MessageEntity> = 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<MessageEntity> = 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<int> random_id:Vector<long> 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<int> reason:ReportReason = Bool; +messages.getChats#3c6aa187 id:Vector<int> = 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<InputUser> 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<long>; +messages.reportEncryptedSpam#4b0c8c0f peer:InputEncryptedChat = Bool; +messages.readMessageContents#36a73f77 id:Vector<int> = 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<MessageEntity> = 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<int> increment:Bool = Vector<int>; +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<long> = 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<InputBotInlineResult> 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<MessageEntity> 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<MessageEntity> 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<InputDialogPeer> = messages.PeerDialogs; +messages.saveDraft#bc39e14b flags:# no_webpage:flags.1?true reply_to_msg_id:flags.0?int peer:InputPeer message:string entities:flags.3?Vector<MessageEntity> = Bool; +messages.getAllDrafts#6a3f8d65 = Updates; +messages.getFeaturedStickers#2dacca4f hash:int = messages.FeaturedStickers; +messages.readFeaturedStickers#5b118126 id:Vector<long> = 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<StickerSetCovered>; +messages.setGameScore#8ef8ecc0 flags:# edit_message:flags.0?true force:flags.1?true peer:InputPeer id:int user_id:InputUser score:int = Updates; +messages.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<int> = 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<InputDialogPeer> = Bool; +messages.getPinnedDialogs#e254d64e = messages.PeerDialogs; +messages.setBotShippingResults#e5f672fa flags:# query_id:long error:flags.0?string shipping_options:flags.1?Vector<ShippingOption> = 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<InputSingleMedia> = 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<MessageRange>; +messages.markDialogUnread#c286d98f flags:# unread:flags.0?true peer:InputDialogPeer = Bool; +messages.getDialogUnreadMarks#22e24e22 = Vector<DialogPeer>; +messages.clearAllDrafts#7e58ee9c = Bool; + +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<InputPhoto> = Vector<long>; +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<FileHash>; +upload.getCdnFileHashes#4da54231 file_token:bytes offset:int = Vector<FileHash>; +upload.getFileHashes#c7025931 location:InputFileLocation offset:int = Vector<FileHash>; + +help.getConfig#c4f9186b = Config; +help.getNearestDc#1fb33026 = NearestDc; +help.getAppUpdate#522d5a7d source:string = help.AppUpdate; +help.saveAppLog#6f02f748 events:Vector<InputAppEvent> = 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; +help.getPassportConfig#c661ad08 hash:int = help.PassportConfig; + +channels.readHistory#cc104937 channel:InputChannel max_id:int = Bool; +channels.deleteMessages#84c1fd4e channel:InputChannel id:Vector<int> = messages.AffectedMessages; +channels.deleteUserHistory#d10dd71b channel:InputChannel user_id:InputUser = messages.AffectedHistory; +channels.reportSpam#fe087810 channel:InputChannel user_id:InputUser id:Vector<int> = Bool; +channels.getMessages#ad8c9a23 channel:InputChannel id:Vector<InputMessage> = messages.Messages; +channels.getParticipants#123e05e9 channel:InputChannel filter:ChannelParticipantsFilter offset:int limit:int hash:int = channels.ChannelParticipants; +channels.getParticipant#546dd7a6 channel:InputChannel user_id:InputUser = channels.ChannelParticipant; +channels.getChannels#a7f6bbb id:Vector<InputChannel> = 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<InputUser> = 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<InputUser> 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<int> = 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<InputStickerSetItem> = 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#f2f2330a lang_pack:string lang_code:string = LangPackDifference; +langpack.getStrings#efea3803 lang_pack:string lang_code:string keys:Vector<string> = Vector<LangPackString>; +langpack.getDifference#b2e4d7d from_version:int = LangPackDifference; +langpack.getLanguages#42c6978f lang_pack:string = Vector<LangPackLanguage>; + +// LAYER 86 diff --git a/src/danog/MadelineProto/TL_telegram_v89.tl b/src/danog/MadelineProto/TL_telegram_v89.tl new file mode 100644 index 00000000..a3f797b0 --- /dev/null +++ b/src/danog/MadelineProto/TL_telegram_v89.tl @@ -0,0 +1,1246 @@ +---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<IpPort> = AccessPointRule; +help.configSimple#5a592a6c date:int expires:int rules:vector<AccessPointRule> = 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<InputDocument> ttl_seconds:flags.1?int = InputMedia; +inputMediaPhoto#b3ba0635 flags:# id:InputPhoto ttl_seconds:flags.0?int = InputMedia; +inputMediaGeoPoint#f9c44144 geo_point:InputGeoPoint = InputMedia; +inputMediaContact#f8ab7dfb phone_number:string first_name:string last_name:string vcard:string = InputMedia; +inputMediaUploadedDocument#5b38c6c1 flags:# nosound_video:flags.3?true file:InputFile thumb:flags.2?InputFile mime_type:string attributes:Vector<DocumentAttribute> stickers:flags.0?Vector<InputDocument> 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#3bb3b94a id:long access_hash:long file_reference:bytes = InputPhoto; + +inputFileLocation#dfdaabe1 volume_id:long local_id:int secret:long file_reference:bytes = InputFileLocation; +inputEncryptedFileLocation#f5235d55 id:long access_hash:long = InputFileLocation; +inputDocumentFileLocation#196683d9 id:long access_hash:long file_reference:bytes = 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#91d11eb dc_id:int volume_id:long local_id:int secret:long file_reference:bytes = 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#edd2a791 flags:# id:int participants:ChatParticipants chat_photo:flags.2?Photo notify_settings:PeerNotifySettings exported_invite:ExportedChatInvite bot_info:flags.3?Vector<BotInfo> pinned_msg_id:flags.6?int = 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<BotInfo> migrated_from_chat_id:flags.4?int migrated_from_max_id:flags.4?int pinned_msg_id:flags.5?int stickerset:flags.8?StickerSet available_min_id:flags.9?int = 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<ChatParticipant> 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 from_scheduled:flags.18?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<MessageEntity> 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#cbf24940 phone_number:string first_name:string last_name:string vcard: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<int> = MessageAction; +messageActionChatEditTitle#b5a1ce5a title:string = MessageAction; +messageActionChatEditPhoto#7fcb13a8 photo:Photo = MessageAction; +messageActionChatDeletePhoto#95e3fbef = MessageAction; +messageActionChatAddUser#488a7337 users:Vector<int> = 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<SecureValue> credentials:SecureCredentialsEncrypted = MessageAction; +messageActionSecureValuesSent#d95c6154 types:Vector<SecureValueType> = MessageAction; + +dialog#e4def5db flags:# pinned:flags.2?true unread_mark:flags.3?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#9c477dd8 flags:# has_stickers:flags.0?true id:long access_hash:long file_reference:bytes date:int sizes:Vector<PhotoSize> = 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#296f104 long:double lat:double access_hash:long = 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; +inputNotifyBroadcasts#b1db7c7e = 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<PhotoSize> 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; +inputReportReasonCopyright#9b89f93a = ReportReason; + +userFull#8ea4a881 flags:# blocked:flags.0?true phone_calls_available:flags.4?true phone_calls_private:flags.5?true can_pin_message:flags.7?true user:User about:flags.1?string link:contacts.Link profile_photo:flags.2?Photo notify_settings:PeerNotifySettings bot_info:flags.3?BotInfo pinned_msg_id:flags.6?int 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<Contact> saved_count:int users:Vector<User> = contacts.Contacts; + +contacts.importedContacts#77d01c3b imported:Vector<ImportedContact> popular_invites:Vector<PopularContact> retry_contacts:Vector<long> users:Vector<User> = contacts.ImportedContacts; + +contacts.blocked#1c138d15 blocked:Vector<ContactBlocked> users:Vector<User> = contacts.Blocked; +contacts.blockedSlice#900802a1 count:int blocked:Vector<ContactBlocked> users:Vector<User> = contacts.Blocked; + +messages.dialogs#15ba6c40 dialogs:Vector<Dialog> messages:Vector<Message> chats:Vector<Chat> users:Vector<User> = messages.Dialogs; +messages.dialogsSlice#71e094f3 count:int dialogs:Vector<Dialog> messages:Vector<Message> chats:Vector<Chat> users:Vector<User> = messages.Dialogs; +messages.dialogsNotModified#f0e3e596 count:int = messages.Dialogs; + +messages.messages#8c718e87 messages:Vector<Message> chats:Vector<Chat> users:Vector<User> = messages.Messages; +messages.messagesSlice#b446ae3 count:int messages:Vector<Message> chats:Vector<Chat> users:Vector<User> = messages.Messages; +messages.channelMessages#99262e37 flags:# pts:int count:int messages:Vector<Message> chats:Vector<Chat> users:Vector<User> = messages.Messages; +messages.messagesNotModified#74535f21 count:int = messages.Messages; + +messages.chats#64ff9fd5 chats:Vector<Chat> = messages.Chats; +messages.chatsSlice#9cd81144 count:int chats:Vector<Chat> = messages.Chats; + +messages.chatFull#e5d7d19c full_chat:ChatFull chats:Vector<Chat> users:Vector<User> = 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<int> 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<DcOption> = 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<MessageEntity> = Update; +updatePrivacy#ee3b272a key:PrivacyKey rules:Vector<PrivacyRule> = 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<int> 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<int> 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<long> = 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<DialogPeer> = 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#46560264 lang_code:string = Update; +updateLangPack#56022f4d difference:LangPackDifference = Update; +updateFavedStickers#e511996d = Update; +updateChannelReadMessagesContents#89893b45 channel_id:int messages:Vector<int> = Update; +updateContactsReset#7084a7be = Update; +updateChannelAvailableMessages#70db6837 channel_id:int available_min_id:int = Update; +updateDialogUnreadMark#e16459c3 flags:# unread:flags.0?true peer:DialogPeer = Update; +updateUserPinnedMessage#4c43da18 user_id:int id:int = Update; +updateChatPinnedMessage#22893b26 chat_id:int 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<Message> new_encrypted_messages:Vector<EncryptedMessage> other_updates:Vector<Update> chats:Vector<Chat> users:Vector<User> state:updates.State = updates.Difference; +updates.differenceSlice#a8fb1981 new_messages:Vector<Message> new_encrypted_messages:Vector<EncryptedMessage> other_updates:Vector<Update> chats:Vector<Chat> users:Vector<User> 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<MessageEntity> = 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<MessageEntity> = Updates; +updateShort#78d4dec1 update:Update date:int = Updates; +updatesCombined#725b04c3 updates:Vector<Update> users:Vector<User> chats:Vector<Chat> date:int seq_start:int seq:int = Updates; +updates#74ae4240 updates:Vector<Update> users:Vector<User> chats:Vector<Chat> 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<MessageEntity> = Updates; + +photos.photos#8dca6aa5 photos:Vector<Photo> users:Vector<User> = photos.Photos; +photos.photosSlice#15051f54 count:int photos:Vector<Photo> users:Vector<User> = photos.Photos; + +photos.photo#20212ca8 photo:Photo users:Vector<User> = 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<FileHash> = 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#e6ca25f6 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<DcOption> dc_txt_domain_name:string 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 gif_search_username:flags.9?string venue_search_username:flags.10?string img_search_username:flags.11?string static_maps_provider:flags.12?string caption_length_max:int message_length_max:int webfile_dc_id:int suggested_lang_code:flags.2?string lang_pack_version:flags.2?int base_lang_pack_version:flags.2?int = Config; + +nearestDc#8e1a1775 country:string this_dc:int nearest_dc:int = NearestDc; + +help.appUpdate#1da7158f flags:# popup:flags.0?true id:int version:string text:string entities:Vector<MessageEntity> document:flags.1?Document url:flags.2?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#1abfb575 id:long access_hash:long file_reference:bytes = InputDocument; + +documentEmpty#36f8c871 id:long = Document; +document#59534e4c id:long access_hash:long file_reference:bytes date:int mime_type:string size:int thumb:PhotoSize dc_id:int attributes:Vector<DocumentAttribute> = Document; + +help.support#17c6b5f6 phone_number:string user:User = help.Support; + +notifyPeer#9fd40bd8 peer:Peer = NotifyPeer; +notifyUsers#b4c83b4c = NotifyPeer; +notifyChats#c007cec3 = NotifyPeer; +notifyBroadcasts#d612e8ef = 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<Peer> results:Vector<Peer> chats:Vector<Chat> users:Vector<User> = contacts.Found; + +inputPrivacyKeyStatusTimestamp#4f96cb18 = InputPrivacyKey; +inputPrivacyKeyChatInvite#bdfb0426 = InputPrivacyKey; +inputPrivacyKeyPhoneCall#fabadc5f = InputPrivacyKey; +inputPrivacyKeyPhoneP2P#db9e70d2 = InputPrivacyKey; + +privacyKeyStatusTimestamp#bc2eab30 = PrivacyKey; +privacyKeyChatInvite#500e6dfa = PrivacyKey; +privacyKeyPhoneCall#3d662b7b = PrivacyKey; +privacyKeyPhoneP2P#39491cc8 = PrivacyKey; + +inputPrivacyValueAllowContacts#d09e07b = InputPrivacyRule; +inputPrivacyValueAllowAll#184b35ce = InputPrivacyRule; +inputPrivacyValueAllowUsers#131cc67f users:Vector<InputUser> = InputPrivacyRule; +inputPrivacyValueDisallowContacts#ba52007 = InputPrivacyRule; +inputPrivacyValueDisallowAll#d66b66c9 = InputPrivacyRule; +inputPrivacyValueDisallowUsers#90110467 users:Vector<InputUser> = InputPrivacyRule; + +privacyValueAllowContacts#fffe1bac = PrivacyRule; +privacyValueAllowAll#65427b82 = PrivacyRule; +privacyValueAllowUsers#4d5bbe0c users:Vector<int> = PrivacyRule; +privacyValueDisallowContacts#f888fa1a = PrivacyRule; +privacyValueDisallowAll#8b73e763 = PrivacyRule; +privacyValueDisallowUsers#c7f49b7 users:Vector<int> = PrivacyRule; + +account.privacyRules#554abb6f rules:Vector<PrivacyRule> users:Vector<User> = 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<Document> = messages.Stickers; + +stickerPack#12b299d4 emoticon:string documents:Vector<long> = StickerPack; + +messages.allStickersNotModified#e86602c3 = messages.AllStickers; +messages.allStickers#edfd405f hash:int sets:Vector<StickerSet> = 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#ad01d61d flags:# current:flags.0?true official_app:flags.1?true password_pending:flags.2?true hash:long 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<Authorization> = account.Authorizations; + +account.password#ad2641f8 flags:# has_recovery:flags.0?true has_secure_values:flags.1?true has_password:flags.2?true current_algo:flags.2?PasswordKdfAlgo srp_B:flags.2?bytes srp_id:flags.2?long hint:flags.3?string email_unconfirmed_pattern:flags.4?string new_algo:PasswordKdfAlgo new_secure_algo:SecurePasswordKdfAlgo secure_random:bytes = account.Password; + +account.passwordSettings#9a5c33e5 flags:# email:flags.0?string secure_settings:flags.1?SecureSecretSettings = account.PasswordSettings; + +account.passwordInputSettings#c23727c9 flags:# new_algo:flags.0?PasswordKdfAlgo new_password_hash:flags.0?bytes hint:flags.0?string email:flags.1?string new_secure_settings:flags.2?SecureSecretSettings = 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<User> = 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<StickerPack> documents:Vector<Document> = messages.StickerSet; + +botCommand#c27ac8c7 command:string description:string = BotCommand; + +botInfo#98e81d3a user_id:int description:string commands:Vector<BotCommand> = 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<KeyboardButton> = 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<KeyboardButtonRow> = ReplyMarkup; +replyInlineMarkup#48a30254 rows:Vector<KeyboardButtonRow> = 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<Chat> users:Vector<User> = 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<Message> chats:Vector<Chat> users:Vector<User> = updates.ChannelDifference; +updates.channelDifference#2064674e flags:# final:flags.0?true pts:int timeout:flags.1?int new_messages:Vector<Message> other_updates:Vector<Update> chats:Vector<Chat> users:Vector<User> = updates.ChannelDifference; + +channelMessagesFilterEmpty#94d42ee7 = ChannelMessagesFilter; +channelMessagesFilter#cd77d957 flags:# exclude_new_messages:flags.1?true ranges:Vector<MessageRange> = 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<ChannelParticipant> users:Vector<User> = channels.ChannelParticipants; +channels.channelParticipantsNotModified#f0173fe9 = channels.ChannelParticipants; + +channels.channelParticipant#d0d9b163 participant:ChannelParticipant users:Vector<User> = channels.ChannelParticipant; + +help.termsOfService#780a0310 flags:# popup:flags.0?true id:DataJSON text:string entities:Vector<MessageEntity> min_age_confirm:flags.1?int = help.TermsOfService; + +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<FoundGif> = messages.FoundGifs; + +messages.savedGifsNotModified#e8025ca2 = messages.SavedGifs; +messages.savedGifs#2e0709a5 hash:int gifs:Vector<Document> = messages.SavedGifs; + +inputBotInlineMessageMediaAuto#3380c786 flags:# message:string entities:flags.1?Vector<MessageEntity> reply_markup:flags.2?ReplyMarkup = InputBotInlineMessage; +inputBotInlineMessageText#3dcd7a87 flags:# no_webpage:flags.0?true message:string entities:flags.1?Vector<MessageEntity> reply_markup:flags.2?ReplyMarkup = InputBotInlineMessage; +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#a6edbffd flags:# phone_number:string first_name:string last_name:string vcard: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<MessageEntity> reply_markup:flags.2?ReplyMarkup = BotInlineMessage; +botInlineMessageText#8c7f65e2 flags:# no_webpage:flags.0?true message:string entities:flags.1?Vector<MessageEntity> 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#18d1cdc2 flags:# phone_number:string first_name:string last_name:string vcard: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<BotInlineResult> cache_time:int users:Vector<User> = 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<Dialog> messages:Vector<Message> chats:Vector<Chat> users:Vector<User> 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<TopPeer> = TopPeerCategoryPeers; + +contacts.topPeersNotModified#de266ef5 = contacts.TopPeers; +contacts.topPeers#70b772a8 categories:Vector<TopPeerCategoryPeers> chats:Vector<Chat> users:Vector<User> = contacts.TopPeers; +contacts.topPeersDisabled#b52c939d = contacts.TopPeers; + +draftMessageEmpty#1b0c841a flags:# date:flags.0?int = DraftMessage; +draftMessage#fd8e711f flags:# no_webpage:flags.1?true reply_to_msg_id:flags.0?int message:string entities:flags.3?Vector<MessageEntity> date:int = DraftMessage; + +messages.featuredStickersNotModified#4ede3cf = messages.FeaturedStickers; +messages.featuredStickers#f89d88e5 hash:int sets:Vector<StickerSetCovered> unread:Vector<long> = messages.FeaturedStickers; + +messages.recentStickersNotModified#b17f890 = messages.RecentStickers; +messages.recentStickers#22f3afb3 hash:int packs:Vector<StickerPack> stickers:Vector<Document> dates:Vector<int> = messages.RecentStickers; + +messages.archivedStickers#4fcba9c8 count:int sets:Vector<StickerSetCovered> = messages.ArchivedStickers; + +messages.stickerSetInstallResultSuccess#38641628 = messages.StickerSetInstallResult; +messages.stickerSetInstallResultArchive#35e410a8 sets:Vector<StickerSetCovered> = messages.StickerSetInstallResult; + +stickerSetCovered#6410a5d2 set:StickerSet cover:Document = StickerSetCovered; +stickerSetMultiCovered#3407e51b set:StickerSet covers:Vector<Document> = 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<HighScore> users:Vector<User> = 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> = RichText; +textSubscript#ed6a8504 text:RichText = RichText; +textSuperscript#c7fb5e01 text:RichText = RichText; +textMarked#34b8621 text:RichText = RichText; +textPhone#1ccb966a text:RichText phone:string = RichText; +textImage#81ccf4f document_id:long w:int h:int = RichText; +textAnchor#35553762 text:RichText name:string = 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#e4e88011 items:Vector<PageListItem> = PageBlock; +pageBlockBlockquote#263d7c26 text:RichText caption:RichText = PageBlock; +pageBlockPullquote#4f4456d3 text:RichText caption:RichText = PageBlock; +pageBlockPhoto#1759c560 flags:# photo_id:long caption:PageCaption url:flags.0?string webpage_id:flags.0?long = PageBlock; +pageBlockVideo#7c8fe7b6 flags:# autoplay:flags.0?true loop:flags.1?true video_id:long caption:PageCaption = PageBlock; +pageBlockCover#39f23300 cover:PageBlock = PageBlock; +pageBlockEmbed#a8718dc5 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:flags.5?int h:flags.5?int caption:PageCaption = PageBlock; +pageBlockEmbedPost#f259a80b url:string webpage_id:long author_photo_id:long author:string date:int blocks:Vector<PageBlock> caption:PageCaption = PageBlock; +pageBlockCollage#65a0fa4d items:Vector<PageBlock> caption:PageCaption = PageBlock; +pageBlockSlideshow#31f9590 items:Vector<PageBlock> caption:PageCaption = PageBlock; +pageBlockChannel#ef1751b5 channel:Chat = PageBlock; +pageBlockAudio#804361ea audio_id:long caption:PageCaption = PageBlock; +pageBlockKicker#1e148390 text:RichText = PageBlock; +pageBlockTable#bf4dea82 flags:# bordered:flags.0?true striped:flags.1?true title:RichText rows:Vector<PageTableRow> = PageBlock; +pageBlockOrderedList#9a8ae1e1 items:Vector<PageListOrderedItem> = PageBlock; +pageBlockDetails#76768bed flags:# open:flags.0?true blocks:Vector<PageBlock> title:RichText = PageBlock; +pageBlockRelatedArticles#16115a96 title:RichText articles:Vector<PageRelatedArticle> = PageBlock; +pageBlockMap#a44f3ef6 geo:GeoPoint zoom:int w:int h:int caption:PageCaption = PageBlock; + +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<LabeledPrice> = 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#1c570ed1 url:string access_hash:long size:int mime_type:string attributes:Vector<DocumentAttribute> = WebDocument; +webDocumentNoProxy#f9c8bcc6 url:string size:int mime_type:string attributes:Vector<DocumentAttribute> = WebDocument; + +inputWebDocument#9bed434d url:string size:int mime_type:string attributes:Vector<DocumentAttribute> = InputWebDocument; + +inputWebFileLocation#c239d686 url:string access_hash:long = InputWebFileLocation; +inputWebFileGeoPointLocation#9f2221c9 geo_point:InputGeoPoint access_hash:long w:int h:int zoom:int scale:int = 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<User> = payments.PaymentForm; + +payments.validatedRequestedInfo#d1451883 flags:# id:flags.0?string shipping_options:flags.1?Vector<ShippingOption> = 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<User> = 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<LabeledPrice> = 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#e6f9ddf3 flags:# p2p_allowed:flags.5?true 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<PhoneConnection> 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<User> = 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<CdnPublicKey> = 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<LangPackString> = LangPackDifference; + +langPackLanguage#eeca5ce3 flags:# official:flags.0?true rtl:flags.2?true name:string native_name:string lang_code:string base_lang_code:flags.1?string plural_code:string strings_count:int translated_count:int translations_url: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<ChannelAdminLogEvent> chats:Vector<Chat> users:Vector<User> = 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<StickerPack> stickers:Vector<Document> = 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<RecentMeUrl> chats:Vector<Chat> users:Vector<User> = help.RecentMeUrls; + +inputSingleMedia#1cc6e91f flags:# media:InputMedia random_id:long message:string entities:flags.0?Vector<MessageEntity> = InputSingleMedia; + +webAuthorization#cac943f2 hash:long bot_id:int domain:string browser:string platform:string date_created:int date_active:int ip:string region:string = WebAuthorization; + +account.webAuthorizations#ed56c9fc authorizations:Vector<WebAuthorization> users:Vector<User> = 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<StickerSetCovered> = 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<Chat> users:Vector<User> = 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#187fa0ca flags:# type:SecureValueType data:flags.0?SecureData front_side:flags.1?SecureFile reverse_side:flags.2?SecureFile selfie:flags.3?SecureFile translation:flags.6?Vector<SecureFile> files:flags.4?Vector<SecureFile> plain_data:flags.5?SecurePlainData hash:bytes = SecureValue; + +inputSecureValue#db21d0a7 flags:# type:SecureValueType data:flags.0?SecureData front_side:flags.1?InputSecureFile reverse_side:flags.2?InputSecureFile selfie:flags.3?InputSecureFile translation:flags.6?Vector<InputSecureFile> files:flags.4?Vector<InputSecureFile> 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<bytes> text:string = SecureValueError; +secureValueError#869d758f type:SecureValueType hash:bytes text:string = SecureValueError; +secureValueErrorTranslationFile#a1144770 type:SecureValueType file_hash:bytes text:string = SecureValueError; +secureValueErrorTranslationFiles#34636dd8 type:SecureValueType file_hash:Vector<bytes> text:string = SecureValueError; + +secureCredentialsEncrypted#33f0ea47 data:bytes hash:bytes secret:bytes = SecureCredentialsEncrypted; + +account.authorizationForm#ad2e1cd8 flags:# required_types:Vector<SecureRequiredType> values:Vector<SecureValue> errors:Vector<SecureValueError> users:Vector<User> 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<MessageEntity> = help.DeepLinkInfo; + +savedPhoneContact#1142bd56 phone:string first_name:string last_name:string date:int = SavedContact; + +account.takeout#4dba4501 id:long = account.Takeout; + +passwordKdfAlgoUnknown#d45ab096 = PasswordKdfAlgo; +passwordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow#3a912d4a salt1:bytes salt2:bytes g:int p:bytes = PasswordKdfAlgo; + +securePasswordKdfAlgoUnknown#4a8537 = SecurePasswordKdfAlgo; +securePasswordKdfAlgoPBKDF2HMACSHA512iter100000#bbf2dda0 salt:bytes = SecurePasswordKdfAlgo; +securePasswordKdfAlgoSHA512#86471d92 salt:bytes = SecurePasswordKdfAlgo; + +secureSecretSettings#1527bcac secure_algo:SecurePasswordKdfAlgo secure_secret:bytes secure_secret_id:long = SecureSecretSettings; + +inputCheckPasswordEmpty#9880f658 = InputCheckPasswordSRP; +inputCheckPasswordSRP#d27ff082 srp_id:long A:bytes M1:bytes = InputCheckPasswordSRP; + +secureRequiredType#829d99da flags:# native_names:flags.0?true selfie_required:flags.1?true translation_required:flags.2?true type:SecureValueType = SecureRequiredType; +secureRequiredTypeOneOf#27477b4 types:Vector<SecureRequiredType> = SecureRequiredType; + +help.passportConfigNotModified#bfb9f457 = help.PassportConfig; +help.passportConfig#a098d6af hash:int countries_langs:DataJSON = help.PassportConfig; + +pageTableCell#34566b6a flags:# header:flags.0?true align_center:flags.3?true align_right:flags.4?true valign_middle:flags.5?true valign_bottom:flags.6?true text:flags.7?RichText colspan:flags.1?int rowspan:flags.2?int = PageTableCell; + +pageTableRow#e0c0c5e5 cells:Vector<PageTableCell> = PageTableRow; + +pageCaption#6f747657 text:RichText credit:RichText = PageCaption; + +pageListItemText#b92fb6cd text:RichText = PageListItem; +pageListItemBlocks#25e073fc blocks:Vector<PageBlock> = PageListItem; + +pageListOrderedItemText#5e068047 num:string text:RichText = PageListOrderedItem; +pageListOrderedItemBlocks#98dd8936 num:string blocks:Vector<PageBlock> = PageListOrderedItem; + +pageRelatedArticle#b390dc08 flags:# url:string webpage_id:long title:flags.0?string description:flags.1?string photo_id:flags.2?long author:flags.3?string published_date:flags.4?int = PageRelatedArticle; + +page#ae891bec flags:# part:flags.0?true rtl:flags.1?true url:string blocks:Vector<PageBlock> photos:Vector<Photo> documents:Vector<Document> = Page; + +help.supportName#8c05f1c9 name:string = help.SupportName; + +help.userInfoEmpty#f3ae2eed = help.UserInfo; +help.userInfo#1eb3758 message:string entities:Vector<MessageEntity> author:string date:int = help.UserInfo; + +---functions--- + +invokeAfterMsg#cb9f372d {X:Type} msg_id:long query:!X = X; +invokeAfterMsgs#3dc4b4f0 {X:Type} msg_ids:Vector<long> 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#d18b4d16 password:InputCheckPasswordSRP = 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<long> = Bool; + +account.registerDevice#5cbea590 token_type:int token:string app_sandbox:Bool secret:bytes other_uids:Vector<int> = Bool; +account.unregisterDevice#3076c4bf token_type:int token:string other_uids:Vector<int> = 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<WallPaper>; +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<InputPrivacyRule> = 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#9cd4eaf9 password:InputCheckPasswordSRP = account.PasswordSettings; +account.updatePasswordSettings#a59b102f password:InputCheckPasswordSRP 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#449e0b51 password:InputCheckPasswordSRP period:int = account.TmpPassword; +account.getWebAuthorizations#182e6d6f = account.WebAuthorizations; +account.resetWebAuthorization#2d01b9ef hash:long = Bool; +account.resetWebAuthorizations#682d2594 = Bool; +account.getAllSecureValues#b288bc7d = Vector<SecureValue>; +account.getSecureValue#73665bc2 types:Vector<SecureValueType> = Vector<SecureValue>; +account.saveSecureValue#899fe31d value:InputSecureValue secure_secret_id:long = SecureValue; +account.deleteSecureValue#b880bc4b types:Vector<SecureValueType> = 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<SecureValueHash> 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; +account.confirmPasswordEmail#8fdf1920 code:string = Bool; +account.resendPasswordEmail#7a7f2a15 = Bool; +account.cancelPasswordEmail#c1cbd5b6 = Bool; + +users.getUsers#d91a548 id:Vector<InputUser> = Vector<User>; +users.getFullUser#ca30a5b1 id:InputUser = UserFull; +users.setSecureValueErrors#90c894b5 id:InputUser errors:Vector<SecureValueError> = Bool; + +contacts.getContactIDs#2caa4a42 hash:int = Vector<int>; +contacts.getStatuses#c4a353ee = Vector<ContactStatus>; +contacts.getContacts#c023849f hash:int = contacts.Contacts; +contacts.importContacts#2c800be5 contacts:Vector<InputContact> = contacts.ImportedContacts; +contacts.deleteContact#8e953744 id:InputUser = contacts.Link; +contacts.deleteContacts#59ab389e id:Vector<InputUser> = 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<int>; +contacts.importCard#4fe196fe export_card:Vector<int> = 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<SavedContact>; +contacts.toggleTopPeers#8514bdda enabled:Bool = Bool; + +messages.getMessages#63c66506 id:Vector<InputMessage> = messages.Messages; +messages.getDialogs#b098aee6 flags:# exclude_pinned:flags.0?true offset_date:int offset_id:int offset_peer:InputPeer limit:int hash: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<int> = messages.AffectedMessages; +messages.receivedMessages#5a954c0 max_id:int = Vector<ReceivedNotifyMessage>; +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<MessageEntity> = 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<MessageEntity> = 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<int> random_id:Vector<long> 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<int> reason:ReportReason = Bool; +messages.getChats#3c6aa187 id:Vector<int> = 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<InputUser> 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<long>; +messages.reportEncryptedSpam#4b0c8c0f peer:InputEncryptedChat = Bool; +messages.readMessageContents#36a73f77 id:Vector<int> = 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<MessageEntity> = 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<int> increment:Bool = Vector<int>; +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<long> = 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<InputBotInlineResult> 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<MessageEntity> 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<MessageEntity> 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<InputDialogPeer> = messages.PeerDialogs; +messages.saveDraft#bc39e14b flags:# no_webpage:flags.1?true reply_to_msg_id:flags.0?int peer:InputPeer message:string entities:flags.3?Vector<MessageEntity> = Bool; +messages.getAllDrafts#6a3f8d65 = Updates; +messages.getFeaturedStickers#2dacca4f hash:int = messages.FeaturedStickers; +messages.readFeaturedStickers#5b118126 id:Vector<long> = 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<StickerSetCovered>; +messages.setGameScore#8ef8ecc0 flags:# edit_message:flags.0?true force:flags.1?true peer:InputPeer id:int user_id:InputUser score:int = Updates; +messages.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<int> = 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<InputDialogPeer> = Bool; +messages.getPinnedDialogs#e254d64e = messages.PeerDialogs; +messages.setBotShippingResults#e5f672fa flags:# query_id:long error:flags.0?string shipping_options:flags.1?Vector<ShippingOption> = 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<InputSingleMedia> = 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<MessageRange>; +messages.markDialogUnread#c286d98f flags:# unread:flags.0?true peer:InputDialogPeer = Bool; +messages.getDialogUnreadMarks#22e24e22 = Vector<DialogPeer>; +messages.clearAllDrafts#7e58ee9c = Bool; +messages.updatePinnedMessage#d2aaf7ec flags:# silent:flags.0?true peer:InputPeer id:int = Updates; + +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<InputPhoto> = Vector<long>; +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<FileHash>; +upload.getCdnFileHashes#4da54231 file_token:bytes offset:int = Vector<FileHash>; +upload.getFileHashes#c7025931 location:InputFileLocation offset:int = Vector<FileHash>; + +help.getConfig#c4f9186b = Config; +help.getNearestDc#1fb33026 = NearestDc; +help.getAppUpdate#522d5a7d source:string = help.AppUpdate; +help.saveAppLog#6f02f748 events:Vector<InputAppEvent> = 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; +help.getPassportConfig#c661ad08 hash:int = help.PassportConfig; +help.getSupportName#d360e72c = help.SupportName; +help.getUserInfo#38a08d3 user_id:InputUser = help.UserInfo; +help.editUserInfo#66b91b70 user_id:InputUser message:string entities:Vector<MessageEntity> = help.UserInfo; + +channels.readHistory#cc104937 channel:InputChannel max_id:int = Bool; +channels.deleteMessages#84c1fd4e channel:InputChannel id:Vector<int> = messages.AffectedMessages; +channels.deleteUserHistory#d10dd71b channel:InputChannel user_id:InputUser = messages.AffectedHistory; +channels.reportSpam#fe087810 channel:InputChannel user_id:InputUser id:Vector<int> = Bool; +channels.getMessages#ad8c9a23 channel:InputChannel id:Vector<InputMessage> = messages.Messages; +channels.getParticipants#123e05e9 channel:InputChannel filter:ChannelParticipantsFilter offset:int limit:int hash:int = channels.ChannelParticipants; +channels.getParticipant#546dd7a6 channel:InputChannel user_id:InputUser = channels.ChannelParticipant; +channels.getChannels#a7f6bbb id:Vector<InputChannel> = 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<InputUser> = 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<InputUser> 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<int> = 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<InputStickerSetItem> = 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#f2f2330a lang_pack:string lang_code:string = LangPackDifference; +langpack.getStrings#efea3803 lang_pack:string lang_code:string keys:Vector<string> = Vector<LangPackString>; +langpack.getDifference#9d51e814 lang_code:string from_version:int = LangPackDifference; +langpack.getLanguages#42c6978f lang_pack:string = Vector<LangPackLanguage>; +langpack.getLanguage#6a596502 lang_pack:string lang_code:string = LangPackLanguage; + +// LAYER 89 diff --git a/src/danog/MadelineProto/TL_telegram_v91.tl b/src/danog/MadelineProto/TL_telegram_v91.tl new file mode 100644 index 00000000..1edfc963 --- /dev/null +++ b/src/danog/MadelineProto/TL_telegram_v91.tl @@ -0,0 +1,1277 @@ +---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<IpPort> = AccessPointRule; +help.configSimple#5a592a6c date:int expires:int rules:vector<AccessPointRule> = 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<InputDocument> ttl_seconds:flags.1?int = InputMedia; +inputMediaPhoto#b3ba0635 flags:# id:InputPhoto ttl_seconds:flags.0?int = InputMedia; +inputMediaGeoPoint#f9c44144 geo_point:InputGeoPoint = InputMedia; +inputMediaContact#f8ab7dfb phone_number:string first_name:string last_name:string vcard:string = InputMedia; +inputMediaUploadedDocument#5b38c6c1 flags:# nosound_video:flags.3?true file:InputFile thumb:flags.2?InputFile mime_type:string attributes:Vector<DocumentAttribute> stickers:flags.0?Vector<InputDocument> 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#ce4e82fd flags:# stopped:flags.0?true geo_point:InputGeoPoint period:flags.1?int = InputMedia; +inputMediaPoll#6b3765b poll:Poll = 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#3bb3b94a id:long access_hash:long file_reference:bytes = InputPhoto; + +inputFileLocation#dfdaabe1 volume_id:long local_id:int secret:long file_reference:bytes = InputFileLocation; +inputEncryptedFileLocation#f5235d55 id:long access_hash:long = InputFileLocation; +inputDocumentFileLocation#196683d9 id:long access_hash:long file_reference:bytes = InputFileLocation; +inputSecureFileLocation#cbc7ee28 id:long access_hash:long = InputFileLocation; +inputTakeoutFileLocation#29be5899 = InputFileLocation; + +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#91d11eb dc_id:int volume_id:long local_id:int secret:long file_reference:bytes = 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#edd2a791 flags:# id:int participants:ChatParticipants chat_photo:flags.2?Photo notify_settings:PeerNotifySettings exported_invite:ExportedChatInvite bot_info:flags.3?Vector<BotInfo> pinned_msg_id:flags.6?int = ChatFull; +channelFull#1c87a71a flags:# can_view_participants:flags.3?true can_set_username:flags.6?true can_set_stickers:flags.7?true hidden_prehistory:flags.10?true can_view_stats:flags.12?true id:int about:string participants_count:flags.0?int admins_count:flags.1?int kicked_count:flags.2?int banned_count:flags.2?int online_count:flags.13?int read_inbox_max_id:int read_outbox_max_id:int unread_count:int chat_photo:Photo notify_settings:PeerNotifySettings exported_invite:ExportedChatInvite bot_info:Vector<BotInfo> migrated_from_chat_id:flags.4?int migrated_from_max_id:flags.4?int pinned_msg_id:flags.5?int stickerset:flags.8?StickerSet available_min_id:flags.9?int = 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<ChatParticipant> 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 from_scheduled:flags.18?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<MessageEntity> 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#cbf24940 phone_number:string first_name:string last_name:string vcard: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; +messageMediaPoll#4bd6e798 poll:Poll results:PollResults = MessageMedia; + +messageActionEmpty#b6aef7b0 = MessageAction; +messageActionChatCreate#a6638b9a title:string users:Vector<int> = MessageAction; +messageActionChatEditTitle#b5a1ce5a title:string = MessageAction; +messageActionChatEditPhoto#7fcb13a8 photo:Photo = MessageAction; +messageActionChatDeletePhoto#95e3fbef = MessageAction; +messageActionChatAddUser#488a7337 users:Vector<int> = 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<SecureValue> credentials:SecureCredentialsEncrypted = MessageAction; +messageActionSecureValuesSent#d95c6154 types:Vector<SecureValueType> = MessageAction; +messageActionContactSignUp#f3f25f76 = MessageAction; + +dialog#e4def5db flags:# pinned:flags.2?true unread_mark:flags.3?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#9c477dd8 flags:# has_stickers:flags.0?true id:long access_hash:long file_reference:bytes date:int sizes:Vector<PhotoSize> = 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#296f104 long:double lat:double access_hash:long = 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; +inputNotifyBroadcasts#b1db7c7e = 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<PhotoSize> color:int = WallPaper; +wallPaperSolid#63117f24 id:int title:string bg_color:int color:int = WallPaper; + +inputReportReasonSpam#58dbcab8 = ReportReason; +inputReportReasonViolence#1e22c78d = ReportReason; +inputReportReasonPornography#2e59d922 = ReportReason; +inputReportReasonChildAbuse#adf44ee3 = ReportReason; +inputReportReasonOther#e1746d0a text:string = ReportReason; +inputReportReasonCopyright#9b89f93a = ReportReason; + +userFull#8ea4a881 flags:# blocked:flags.0?true phone_calls_available:flags.4?true phone_calls_private:flags.5?true can_pin_message:flags.7?true user:User about:flags.1?string link:contacts.Link profile_photo:flags.2?Photo notify_settings:PeerNotifySettings bot_info:flags.3?BotInfo pinned_msg_id:flags.6?int 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<Contact> saved_count:int users:Vector<User> = contacts.Contacts; + +contacts.importedContacts#77d01c3b imported:Vector<ImportedContact> popular_invites:Vector<PopularContact> retry_contacts:Vector<long> users:Vector<User> = contacts.ImportedContacts; + +contacts.blocked#1c138d15 blocked:Vector<ContactBlocked> users:Vector<User> = contacts.Blocked; +contacts.blockedSlice#900802a1 count:int blocked:Vector<ContactBlocked> users:Vector<User> = contacts.Blocked; + +messages.dialogs#15ba6c40 dialogs:Vector<Dialog> messages:Vector<Message> chats:Vector<Chat> users:Vector<User> = messages.Dialogs; +messages.dialogsSlice#71e094f3 count:int dialogs:Vector<Dialog> messages:Vector<Message> chats:Vector<Chat> users:Vector<User> = messages.Dialogs; +messages.dialogsNotModified#f0e3e596 count:int = messages.Dialogs; + +messages.messages#8c718e87 messages:Vector<Message> chats:Vector<Chat> users:Vector<User> = messages.Messages; +messages.messagesSlice#b446ae3 count:int messages:Vector<Message> chats:Vector<Chat> users:Vector<User> = messages.Messages; +messages.channelMessages#99262e37 flags:# inexact:flags.1?true pts:int count:int messages:Vector<Message> chats:Vector<Chat> users:Vector<User> = messages.Messages; +messages.messagesNotModified#74535f21 count:int = messages.Messages; + +messages.chats#64ff9fd5 chats:Vector<Chat> = messages.Chats; +messages.chatsSlice#9cd81144 count:int chats:Vector<Chat> = messages.Chats; + +messages.chatFull#e5d7d19c full_chat:ChatFull chats:Vector<Chat> users:Vector<User> = 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<int> 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; +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<DcOption> = 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<MessageEntity> = Update; +updatePrivacy#ee3b272a key:PrivacyKey rules:Vector<PrivacyRule> = 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<int> 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<int> 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<long> = 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<DialogPeer> = 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#46560264 lang_code:string = Update; +updateLangPack#56022f4d difference:LangPackDifference = Update; +updateFavedStickers#e511996d = Update; +updateChannelReadMessagesContents#89893b45 channel_id:int messages:Vector<int> = Update; +updateContactsReset#7084a7be = Update; +updateChannelAvailableMessages#70db6837 channel_id:int available_min_id:int = Update; +updateDialogUnreadMark#e16459c3 flags:# unread:flags.0?true peer:DialogPeer = Update; +updateUserPinnedMessage#4c43da18 user_id:int id:int = Update; +updateChatPinnedMessage#22893b26 chat_id:int id:int = Update; +updateMessagePoll#aca1657b flags:# poll_id:long poll:flags.0?Poll results:PollResults = 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<Message> new_encrypted_messages:Vector<EncryptedMessage> other_updates:Vector<Update> chats:Vector<Chat> users:Vector<User> state:updates.State = updates.Difference; +updates.differenceSlice#a8fb1981 new_messages:Vector<Message> new_encrypted_messages:Vector<EncryptedMessage> other_updates:Vector<Update> chats:Vector<Chat> users:Vector<User> 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<MessageEntity> = 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<MessageEntity> = Updates; +updateShort#78d4dec1 update:Update date:int = Updates; +updatesCombined#725b04c3 updates:Vector<Update> users:Vector<User> chats:Vector<Chat> date:int seq_start:int seq:int = Updates; +updates#74ae4240 updates:Vector<Update> users:Vector<User> chats:Vector<Chat> 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<MessageEntity> = Updates; + +photos.photos#8dca6aa5 photos:Vector<Photo> users:Vector<User> = photos.Photos; +photos.photosSlice#15051f54 count:int photos:Vector<Photo> users:Vector<User> = photos.Photos; + +photos.photo#20212ca8 photo:Photo users:Vector<User> = 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<FileHash> = 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#e6ca25f6 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 pfs_enabled:flags.13?true date:int expires:int test_mode:Bool this_dc:int dc_options:Vector<DcOption> dc_txt_domain_name:string 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 gif_search_username:flags.9?string venue_search_username:flags.10?string img_search_username:flags.11?string static_maps_provider:flags.12?string caption_length_max:int message_length_max:int webfile_dc_id:int suggested_lang_code:flags.2?string lang_pack_version:flags.2?int base_lang_pack_version:flags.2?int = Config; + +nearestDc#8e1a1775 country:string this_dc:int nearest_dc:int = NearestDc; + +help.appUpdate#1da7158f flags:# popup:flags.0?true id:int version:string text:string entities:Vector<MessageEntity> document:flags.1?Document url:flags.2?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#1abfb575 id:long access_hash:long file_reference:bytes = InputDocument; + +documentEmpty#36f8c871 id:long = Document; +document#59534e4c id:long access_hash:long file_reference:bytes date:int mime_type:string size:int thumb:PhotoSize dc_id:int attributes:Vector<DocumentAttribute> = Document; + +help.support#17c6b5f6 phone_number:string user:User = help.Support; + +notifyPeer#9fd40bd8 peer:Peer = NotifyPeer; +notifyUsers#b4c83b4c = NotifyPeer; +notifyChats#c007cec3 = NotifyPeer; +notifyBroadcasts#d612e8ef = 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<Peer> results:Vector<Peer> chats:Vector<Chat> users:Vector<User> = contacts.Found; + +inputPrivacyKeyStatusTimestamp#4f96cb18 = InputPrivacyKey; +inputPrivacyKeyChatInvite#bdfb0426 = InputPrivacyKey; +inputPrivacyKeyPhoneCall#fabadc5f = InputPrivacyKey; +inputPrivacyKeyPhoneP2P#db9e70d2 = InputPrivacyKey; + +privacyKeyStatusTimestamp#bc2eab30 = PrivacyKey; +privacyKeyChatInvite#500e6dfa = PrivacyKey; +privacyKeyPhoneCall#3d662b7b = PrivacyKey; +privacyKeyPhoneP2P#39491cc8 = PrivacyKey; + +inputPrivacyValueAllowContacts#d09e07b = InputPrivacyRule; +inputPrivacyValueAllowAll#184b35ce = InputPrivacyRule; +inputPrivacyValueAllowUsers#131cc67f users:Vector<InputUser> = InputPrivacyRule; +inputPrivacyValueDisallowContacts#ba52007 = InputPrivacyRule; +inputPrivacyValueDisallowAll#d66b66c9 = InputPrivacyRule; +inputPrivacyValueDisallowUsers#90110467 users:Vector<InputUser> = InputPrivacyRule; + +privacyValueAllowContacts#fffe1bac = PrivacyRule; +privacyValueAllowAll#65427b82 = PrivacyRule; +privacyValueAllowUsers#4d5bbe0c users:Vector<int> = PrivacyRule; +privacyValueDisallowContacts#f888fa1a = PrivacyRule; +privacyValueDisallowAll#8b73e763 = PrivacyRule; +privacyValueDisallowUsers#c7f49b7 users:Vector<int> = PrivacyRule; + +account.privacyRules#554abb6f rules:Vector<PrivacyRule> users:Vector<User> = 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<Document> = messages.Stickers; + +stickerPack#12b299d4 emoticon:string documents:Vector<long> = StickerPack; + +messages.allStickersNotModified#e86602c3 = messages.AllStickers; +messages.allStickers#edfd405f hash:int sets:Vector<StickerSet> = 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#ad01d61d flags:# current:flags.0?true official_app:flags.1?true password_pending:flags.2?true hash:long 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<Authorization> = account.Authorizations; + +account.password#ad2641f8 flags:# has_recovery:flags.0?true has_secure_values:flags.1?true has_password:flags.2?true current_algo:flags.2?PasswordKdfAlgo srp_B:flags.2?bytes srp_id:flags.2?long hint:flags.3?string email_unconfirmed_pattern:flags.4?string new_algo:PasswordKdfAlgo new_secure_algo:SecurePasswordKdfAlgo secure_random:bytes = account.Password; + +account.passwordSettings#9a5c33e5 flags:# email:flags.0?string secure_settings:flags.1?SecureSecretSettings = account.PasswordSettings; + +account.passwordInputSettings#c23727c9 flags:# new_algo:flags.0?PasswordKdfAlgo new_password_hash:flags.0?bytes hint:flags.0?string email:flags.1?string new_secure_settings:flags.2?SecureSecretSettings = 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<User> = 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<StickerPack> documents:Vector<Document> = messages.StickerSet; + +botCommand#c27ac8c7 command:string description:string = BotCommand; + +botInfo#98e81d3a user_id:int description:string commands:Vector<BotCommand> = 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<KeyboardButton> = 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<KeyboardButtonRow> = ReplyMarkup; +replyInlineMarkup#48a30254 rows:Vector<KeyboardButtonRow> = 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<Chat> users:Vector<User> = 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<Message> chats:Vector<Chat> users:Vector<User> = updates.ChannelDifference; +updates.channelDifference#2064674e flags:# final:flags.0?true pts:int timeout:flags.1?int new_messages:Vector<Message> other_updates:Vector<Update> chats:Vector<Chat> users:Vector<User> = updates.ChannelDifference; + +channelMessagesFilterEmpty#94d42ee7 = ChannelMessagesFilter; +channelMessagesFilter#cd77d957 flags:# exclude_new_messages:flags.1?true ranges:Vector<MessageRange> = 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<ChannelParticipant> users:Vector<User> = channels.ChannelParticipants; +channels.channelParticipantsNotModified#f0173fe9 = channels.ChannelParticipants; + +channels.channelParticipant#d0d9b163 participant:ChannelParticipant users:Vector<User> = channels.ChannelParticipant; + +help.termsOfService#780a0310 flags:# popup:flags.0?true id:DataJSON text:string entities:Vector<MessageEntity> min_age_confirm:flags.1?int = help.TermsOfService; + +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<FoundGif> = messages.FoundGifs; + +messages.savedGifsNotModified#e8025ca2 = messages.SavedGifs; +messages.savedGifs#2e0709a5 hash:int gifs:Vector<Document> = messages.SavedGifs; + +inputBotInlineMessageMediaAuto#3380c786 flags:# message:string entities:flags.1?Vector<MessageEntity> reply_markup:flags.2?ReplyMarkup = InputBotInlineMessage; +inputBotInlineMessageText#3dcd7a87 flags:# no_webpage:flags.0?true message:string entities:flags.1?Vector<MessageEntity> reply_markup:flags.2?ReplyMarkup = InputBotInlineMessage; +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#a6edbffd flags:# phone_number:string first_name:string last_name:string vcard: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<MessageEntity> reply_markup:flags.2?ReplyMarkup = BotInlineMessage; +botInlineMessageText#8c7f65e2 flags:# no_webpage:flags.0?true message:string entities:flags.1?Vector<MessageEntity> 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#18d1cdc2 flags:# phone_number:string first_name:string last_name:string vcard: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<BotInlineResult> cache_time:int users:Vector<User> = 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<Dialog> messages:Vector<Message> chats:Vector<Chat> users:Vector<User> 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<TopPeer> = TopPeerCategoryPeers; + +contacts.topPeersNotModified#de266ef5 = contacts.TopPeers; +contacts.topPeers#70b772a8 categories:Vector<TopPeerCategoryPeers> chats:Vector<Chat> users:Vector<User> = contacts.TopPeers; +contacts.topPeersDisabled#b52c939d = contacts.TopPeers; + +draftMessageEmpty#1b0c841a flags:# date:flags.0?int = DraftMessage; +draftMessage#fd8e711f flags:# no_webpage:flags.1?true reply_to_msg_id:flags.0?int message:string entities:flags.3?Vector<MessageEntity> date:int = DraftMessage; + +messages.featuredStickersNotModified#4ede3cf = messages.FeaturedStickers; +messages.featuredStickers#f89d88e5 hash:int sets:Vector<StickerSetCovered> unread:Vector<long> = messages.FeaturedStickers; + +messages.recentStickersNotModified#b17f890 = messages.RecentStickers; +messages.recentStickers#22f3afb3 hash:int packs:Vector<StickerPack> stickers:Vector<Document> dates:Vector<int> = messages.RecentStickers; + +messages.archivedStickers#4fcba9c8 count:int sets:Vector<StickerSetCovered> = messages.ArchivedStickers; + +messages.stickerSetInstallResultSuccess#38641628 = messages.StickerSetInstallResult; +messages.stickerSetInstallResultArchive#35e410a8 sets:Vector<StickerSetCovered> = messages.StickerSetInstallResult; + +stickerSetCovered#6410a5d2 set:StickerSet cover:Document = StickerSetCovered; +stickerSetMultiCovered#3407e51b set:StickerSet covers:Vector<Document> = 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<HighScore> users:Vector<User> = 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> = RichText; +textSubscript#ed6a8504 text:RichText = RichText; +textSuperscript#c7fb5e01 text:RichText = RichText; +textMarked#34b8621 text:RichText = RichText; +textPhone#1ccb966a text:RichText phone:string = RichText; +textImage#81ccf4f document_id:long w:int h:int = RichText; +textAnchor#35553762 text:RichText name:string = 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#e4e88011 items:Vector<PageListItem> = PageBlock; +pageBlockBlockquote#263d7c26 text:RichText caption:RichText = PageBlock; +pageBlockPullquote#4f4456d3 text:RichText caption:RichText = PageBlock; +pageBlockPhoto#1759c560 flags:# photo_id:long caption:PageCaption url:flags.0?string webpage_id:flags.0?long = PageBlock; +pageBlockVideo#7c8fe7b6 flags:# autoplay:flags.0?true loop:flags.1?true video_id:long caption:PageCaption = PageBlock; +pageBlockCover#39f23300 cover:PageBlock = PageBlock; +pageBlockEmbed#a8718dc5 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:flags.5?int h:flags.5?int caption:PageCaption = PageBlock; +pageBlockEmbedPost#f259a80b url:string webpage_id:long author_photo_id:long author:string date:int blocks:Vector<PageBlock> caption:PageCaption = PageBlock; +pageBlockCollage#65a0fa4d items:Vector<PageBlock> caption:PageCaption = PageBlock; +pageBlockSlideshow#31f9590 items:Vector<PageBlock> caption:PageCaption = PageBlock; +pageBlockChannel#ef1751b5 channel:Chat = PageBlock; +pageBlockAudio#804361ea audio_id:long caption:PageCaption = PageBlock; +pageBlockKicker#1e148390 text:RichText = PageBlock; +pageBlockTable#bf4dea82 flags:# bordered:flags.0?true striped:flags.1?true title:RichText rows:Vector<PageTableRow> = PageBlock; +pageBlockOrderedList#9a8ae1e1 items:Vector<PageListOrderedItem> = PageBlock; +pageBlockDetails#76768bed flags:# open:flags.0?true blocks:Vector<PageBlock> title:RichText = PageBlock; +pageBlockRelatedArticles#16115a96 title:RichText articles:Vector<PageRelatedArticle> = PageBlock; +pageBlockMap#a44f3ef6 geo:GeoPoint zoom:int w:int h:int caption:PageCaption = PageBlock; + +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<LabeledPrice> = 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#1c570ed1 url:string access_hash:long size:int mime_type:string attributes:Vector<DocumentAttribute> = WebDocument; +webDocumentNoProxy#f9c8bcc6 url:string size:int mime_type:string attributes:Vector<DocumentAttribute> = WebDocument; + +inputWebDocument#9bed434d url:string size:int mime_type:string attributes:Vector<DocumentAttribute> = InputWebDocument; + +inputWebFileLocation#c239d686 url:string access_hash:long = InputWebFileLocation; +inputWebFileGeoPointLocation#9f2221c9 geo_point:InputGeoPoint access_hash:long w:int h:int zoom:int scale:int = 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<User> = payments.PaymentForm; + +payments.validatedRequestedInfo#d1451883 flags:# id:flags.0?string shipping_options:flags.1?Vector<ShippingOption> = 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<User> = 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<LabeledPrice> = 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#e6f9ddf3 flags:# p2p_allowed:flags.5?true 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<PhoneConnection> 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<User> = 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<CdnPublicKey> = 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<LangPackString> = LangPackDifference; + +langPackLanguage#eeca5ce3 flags:# official:flags.0?true rtl:flags.2?true beta:flags.3?true name:string native_name:string lang_code:string base_lang_code:flags.1?string plural_code:string strings_count:int translated_count:int translations_url: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<ChannelAdminLogEvent> chats:Vector<Chat> users:Vector<User> = 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<StickerPack> stickers:Vector<Document> = 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<RecentMeUrl> chats:Vector<Chat> users:Vector<User> = help.RecentMeUrls; + +inputSingleMedia#1cc6e91f flags:# media:InputMedia random_id:long message:string entities:flags.0?Vector<MessageEntity> = InputSingleMedia; + +webAuthorization#cac943f2 hash:long bot_id:int domain:string browser:string platform:string date_created:int date_active:int ip:string region:string = WebAuthorization; + +account.webAuthorizations#ed56c9fc authorizations:Vector<WebAuthorization> users:Vector<User> = 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<StickerSetCovered> = 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<Chat> users:Vector<User> = 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#187fa0ca flags:# type:SecureValueType data:flags.0?SecureData front_side:flags.1?SecureFile reverse_side:flags.2?SecureFile selfie:flags.3?SecureFile translation:flags.6?Vector<SecureFile> files:flags.4?Vector<SecureFile> plain_data:flags.5?SecurePlainData hash:bytes = SecureValue; + +inputSecureValue#db21d0a7 flags:# type:SecureValueType data:flags.0?SecureData front_side:flags.1?InputSecureFile reverse_side:flags.2?InputSecureFile selfie:flags.3?InputSecureFile translation:flags.6?Vector<InputSecureFile> files:flags.4?Vector<InputSecureFile> 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<bytes> text:string = SecureValueError; +secureValueError#869d758f type:SecureValueType hash:bytes text:string = SecureValueError; +secureValueErrorTranslationFile#a1144770 type:SecureValueType file_hash:bytes text:string = SecureValueError; +secureValueErrorTranslationFiles#34636dd8 type:SecureValueType file_hash:Vector<bytes> text:string = SecureValueError; + +secureCredentialsEncrypted#33f0ea47 data:bytes hash:bytes secret:bytes = SecureCredentialsEncrypted; + +account.authorizationForm#ad2e1cd8 flags:# required_types:Vector<SecureRequiredType> values:Vector<SecureValue> errors:Vector<SecureValueError> users:Vector<User> 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<MessageEntity> = help.DeepLinkInfo; + +savedPhoneContact#1142bd56 phone:string first_name:string last_name:string date:int = SavedContact; + +account.takeout#4dba4501 id:long = account.Takeout; + +passwordKdfAlgoUnknown#d45ab096 = PasswordKdfAlgo; +passwordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow#3a912d4a salt1:bytes salt2:bytes g:int p:bytes = PasswordKdfAlgo; + +securePasswordKdfAlgoUnknown#4a8537 = SecurePasswordKdfAlgo; +securePasswordKdfAlgoPBKDF2HMACSHA512iter100000#bbf2dda0 salt:bytes = SecurePasswordKdfAlgo; +securePasswordKdfAlgoSHA512#86471d92 salt:bytes = SecurePasswordKdfAlgo; + +secureSecretSettings#1527bcac secure_algo:SecurePasswordKdfAlgo secure_secret:bytes secure_secret_id:long = SecureSecretSettings; + +inputCheckPasswordEmpty#9880f658 = InputCheckPasswordSRP; +inputCheckPasswordSRP#d27ff082 srp_id:long A:bytes M1:bytes = InputCheckPasswordSRP; + +secureRequiredType#829d99da flags:# native_names:flags.0?true selfie_required:flags.1?true translation_required:flags.2?true type:SecureValueType = SecureRequiredType; +secureRequiredTypeOneOf#27477b4 types:Vector<SecureRequiredType> = SecureRequiredType; + +help.passportConfigNotModified#bfb9f457 = help.PassportConfig; +help.passportConfig#a098d6af hash:int countries_langs:DataJSON = help.PassportConfig; + +inputAppEvent#1d1b1245 time:double type:string peer:long data:JSONValue = InputAppEvent; + +jsonObjectValue#c0de1bd9 key:string value:JSONValue = JSONObjectValue; + +jsonNull#3f6d7b68 = JSONValue; +jsonBool#c7345e6a value:Bool = JSONValue; +jsonNumber#2be0dfa4 value:double = JSONValue; +jsonString#b71e767a value:string = JSONValue; +jsonArray#f7444763 value:Vector<JSONValue> = JSONValue; +jsonObject#99c1d49d value:Vector<JSONObjectValue> = JSONValue; + +pageTableCell#34566b6a flags:# header:flags.0?true align_center:flags.3?true align_right:flags.4?true valign_middle:flags.5?true valign_bottom:flags.6?true text:flags.7?RichText colspan:flags.1?int rowspan:flags.2?int = PageTableCell; + +pageTableRow#e0c0c5e5 cells:Vector<PageTableCell> = PageTableRow; + +pageCaption#6f747657 text:RichText credit:RichText = PageCaption; + +pageListItemText#b92fb6cd text:RichText = PageListItem; +pageListItemBlocks#25e073fc blocks:Vector<PageBlock> = PageListItem; + +pageListOrderedItemText#5e068047 num:string text:RichText = PageListOrderedItem; +pageListOrderedItemBlocks#98dd8936 num:string blocks:Vector<PageBlock> = PageListOrderedItem; + +pageRelatedArticle#b390dc08 flags:# url:string webpage_id:long title:flags.0?string description:flags.1?string photo_id:flags.2?long author:flags.3?string published_date:flags.4?int = PageRelatedArticle; + +page#ae891bec flags:# part:flags.0?true rtl:flags.1?true v2:flags.2?true url:string blocks:Vector<PageBlock> photos:Vector<Photo> documents:Vector<Document> = Page; + +help.supportName#8c05f1c9 name:string = help.SupportName; + +help.userInfoEmpty#f3ae2eed = help.UserInfo; +help.userInfo#1eb3758 message:string entities:Vector<MessageEntity> author:string date:int = help.UserInfo; + +pollAnswer#6ca9c2e9 text:string option:bytes = PollAnswer; + +poll#d5529d06 id:long flags:# closed:flags.0?true question:string answers:Vector<PollAnswer> = Poll; + +pollAnswerVoters#3b6ddad2 flags:# chosen:flags.0?true option:bytes voters:int = PollAnswerVoters; + +pollResults#5755785a flags:# min:flags.0?true results:flags.1?Vector<PollAnswerVoters> total_voters:flags.2?int = PollResults; + +chatOnlines#f041e250 onlines:int = ChatOnlines; + +statsURL#47a971e0 url:string = StatsURL; + +---functions--- + +invokeAfterMsg#cb9f372d {X:Type} msg_id:long query:!X = X; +invokeAfterMsgs#3dc4b4f0 {X:Type} msg_ids:Vector<long> 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#d18b4d16 password:InputCheckPasswordSRP = 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<long> = Bool; + +account.registerDevice#5cbea590 token_type:int token:string app_sandbox:Bool secret:bytes other_uids:Vector<int> = Bool; +account.unregisterDevice#3076c4bf token_type:int token:string other_uids:Vector<int> = 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<WallPaper>; +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<InputPrivacyRule> = 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#9cd4eaf9 password:InputCheckPasswordSRP = account.PasswordSettings; +account.updatePasswordSettings#a59b102f password:InputCheckPasswordSRP 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#449e0b51 password:InputCheckPasswordSRP period:int = account.TmpPassword; +account.getWebAuthorizations#182e6d6f = account.WebAuthorizations; +account.resetWebAuthorization#2d01b9ef hash:long = Bool; +account.resetWebAuthorizations#682d2594 = Bool; +account.getAllSecureValues#b288bc7d = Vector<SecureValue>; +account.getSecureValue#73665bc2 types:Vector<SecureValueType> = Vector<SecureValue>; +account.saveSecureValue#899fe31d value:InputSecureValue secure_secret_id:long = SecureValue; +account.deleteSecureValue#b880bc4b types:Vector<SecureValueType> = 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<SecureValueHash> 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; +account.confirmPasswordEmail#8fdf1920 code:string = Bool; +account.resendPasswordEmail#7a7f2a15 = Bool; +account.cancelPasswordEmail#c1cbd5b6 = Bool; +account.getContactSignUpNotification#9f07c728 = Bool; +account.setContactSignUpNotification#cff43f61 silent:Bool = Bool; +account.getNotifyExceptions#53577479 flags:# compare_sound:flags.1?true peer:flags.0?InputNotifyPeer = Updates; + +users.getUsers#d91a548 id:Vector<InputUser> = Vector<User>; +users.getFullUser#ca30a5b1 id:InputUser = UserFull; +users.setSecureValueErrors#90c894b5 id:InputUser errors:Vector<SecureValueError> = Bool; + +contacts.getContactIDs#2caa4a42 hash:int = Vector<int>; +contacts.getStatuses#c4a353ee = Vector<ContactStatus>; +contacts.getContacts#c023849f hash:int = contacts.Contacts; +contacts.importContacts#2c800be5 contacts:Vector<InputContact> = contacts.ImportedContacts; +contacts.deleteContact#8e953744 id:InputUser = contacts.Link; +contacts.deleteContacts#59ab389e id:Vector<InputUser> = Bool; +contacts.deleteByPhones#1013fd9e phones:Vector<string> = Bool; +contacts.block#332b49fc id:InputUser = Bool; +contacts.unblock#e54100bd id:InputUser = Bool; +contacts.getBlocked#f57c350f offset:int limit:int = contacts.Blocked; +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<SavedContact>; +contacts.toggleTopPeers#8514bdda enabled:Bool = Bool; + +messages.getMessages#63c66506 id:Vector<InputMessage> = messages.Messages; +messages.getDialogs#b098aee6 flags:# exclude_pinned:flags.0?true offset_date:int offset_id:int offset_peer:InputPeer limit:int hash: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<int> = messages.AffectedMessages; +messages.receivedMessages#5a954c0 max_id:int = Vector<ReceivedNotifyMessage>; +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<MessageEntity> = 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<MessageEntity> = 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<int> random_id:Vector<long> 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<int> reason:ReportReason = Bool; +messages.getChats#3c6aa187 id:Vector<int> = 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<InputUser> 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<long>; +messages.reportEncryptedSpam#4b0c8c0f peer:InputEncryptedChat = Bool; +messages.readMessageContents#36a73f77 id:Vector<int> = 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<MessageEntity> = 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<int> increment:Bool = Vector<int>; +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<long> = 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<InputBotInlineResult> 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 hide_via:flags.11?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#d116f31e flags:# no_webpage:flags.1?true peer:InputPeer id:int message:flags.11?string media:flags.14?InputMedia reply_markup:flags.2?ReplyMarkup entities:flags.3?Vector<MessageEntity> = Updates; +messages.editInlineBotMessage#83557dba flags:# no_webpage:flags.1?true id:InputBotInlineMessageID message:flags.11?string media:flags.14?InputMedia reply_markup:flags.2?ReplyMarkup entities:flags.3?Vector<MessageEntity> = 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<InputDialogPeer> = messages.PeerDialogs; +messages.saveDraft#bc39e14b flags:# no_webpage:flags.1?true reply_to_msg_id:flags.0?int peer:InputPeer message:string entities:flags.3?Vector<MessageEntity> = Bool; +messages.getAllDrafts#6a3f8d65 = Updates; +messages.getFeaturedStickers#2dacca4f hash:int = messages.FeaturedStickers; +messages.readFeaturedStickers#5b118126 id:Vector<long> = 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<StickerSetCovered>; +messages.setGameScore#8ef8ecc0 flags:# edit_message:flags.0?true force:flags.1?true peer:InputPeer id:int user_id:InputUser score:int = Updates; +messages.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<int> = 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<InputDialogPeer> = Bool; +messages.getPinnedDialogs#e254d64e = messages.PeerDialogs; +messages.setBotShippingResults#e5f672fa flags:# query_id:long error:flags.0?string shipping_options:flags.1?Vector<ShippingOption> = 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<InputSingleMedia> = 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<MessageRange>; +messages.markDialogUnread#c286d98f flags:# unread:flags.0?true peer:InputDialogPeer = Bool; +messages.getDialogUnreadMarks#22e24e22 = Vector<DialogPeer>; +messages.clearAllDrafts#7e58ee9c = Bool; +messages.updatePinnedMessage#d2aaf7ec flags:# silent:flags.0?true peer:InputPeer id:int = Updates; +messages.sendVote#10ea6184 peer:InputPeer msg_id:int options:Vector<bytes> = Updates; +messages.getPollResults#73bb643b peer:InputPeer msg_id:int = Updates; +messages.getOnlines#6e2be050 peer:InputPeer = ChatOnlines; +messages.getStatsURL#83f6c0cd peer:InputPeer = StatsURL; + +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<InputPhoto> = Vector<long>; +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<FileHash>; +upload.getCdnFileHashes#4da54231 file_token:bytes offset:int = Vector<FileHash>; +upload.getFileHashes#c7025931 location:InputFileLocation offset:int = Vector<FileHash>; + +help.getConfig#c4f9186b = Config; +help.getNearestDc#1fb33026 = NearestDc; +help.getAppUpdate#522d5a7d source:string = help.AppUpdate; +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; +help.getAppConfig#98914110 = JSONValue; +help.saveAppLog#6f02f748 events:Vector<InputAppEvent> = Bool; +help.getPassportConfig#c661ad08 hash:int = help.PassportConfig; +help.getSupportName#d360e72c = help.SupportName; +help.getUserInfo#38a08d3 user_id:InputUser = help.UserInfo; +help.editUserInfo#66b91b70 user_id:InputUser message:string entities:Vector<MessageEntity> = help.UserInfo; + +channels.readHistory#cc104937 channel:InputChannel max_id:int = Bool; +channels.deleteMessages#84c1fd4e channel:InputChannel id:Vector<int> = messages.AffectedMessages; +channels.deleteUserHistory#d10dd71b channel:InputChannel user_id:InputUser = messages.AffectedHistory; +channels.reportSpam#fe087810 channel:InputChannel user_id:InputUser id:Vector<int> = Bool; +channels.getMessages#ad8c9a23 channel:InputChannel id:Vector<InputMessage> = messages.Messages; +channels.getParticipants#123e05e9 channel:InputChannel filter:ChannelParticipantsFilter offset:int limit:int hash:int = channels.ChannelParticipants; +channels.getParticipant#546dd7a6 channel:InputChannel user_id:InputUser = channels.ChannelParticipant; +channels.getChannels#a7f6bbb id:Vector<InputChannel> = 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<InputUser> = 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.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<InputUser> 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<int> = 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<InputStickerSetItem> = 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#f2f2330a lang_pack:string lang_code:string = LangPackDifference; +langpack.getStrings#efea3803 lang_pack:string lang_code:string keys:Vector<string> = Vector<LangPackString>; +langpack.getDifference#9d51e814 lang_code:string from_version:int = LangPackDifference; +langpack.getLanguages#42c6978f lang_pack:string = Vector<LangPackLanguage>; +langpack.getLanguage#6a596502 lang_pack:string lang_code:string = LangPackLanguage; + +// LAYER 91 diff --git a/src/danog/MadelineProto/Threads/SocketHandler.php b/src/danog/MadelineProto/Threads/SocketHandler.php index 851f1cfe..b785f16a 100644 --- a/src/danog/MadelineProto/Threads/SocketHandler.php +++ b/src/danog/MadelineProto/Threads/SocketHandler.php @@ -1,15 +1,21 @@ <?php -/* -Copyright 2016-2018 Daniil Gentili -(https://daniil.it) -This file is part of MadelineProto. -MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. -MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -See the GNU Affero General Public License for more details. -You should have received a copy of the GNU General Public License along with MadelineProto. -If not, see <http://www.gnu.org/licenses/>. -*/ +/** + * SocketHandler module. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see <http://www.gnu.org/licenses/>. + * + * @author Daniil Gentili <daniil@daniil.it> + * @copyright 2016-2018 Daniil Gentili <daniil@daniil.it> + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ namespace danog\MadelineProto\Threads; diff --git a/src/danog/MadelineProto/Threads/SocketReader.php b/src/danog/MadelineProto/Threads/SocketReader.php index 8a2b58ea..c6f29ea3 100644 --- a/src/danog/MadelineProto/Threads/SocketReader.php +++ b/src/danog/MadelineProto/Threads/SocketReader.php @@ -1,15 +1,21 @@ <?php -/* -Copyright 2016-2018 Daniil Gentili -(https://daniil.it) -This file is part of MadelineProto. -MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. -MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -See the GNU Affero General Public License for more details. -You should have received a copy of the GNU General Public License along with MadelineProto. -If not, see <http://www.gnu.org/licenses/>. -*/ +/** + * SocketReader module. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see <http://www.gnu.org/licenses/>. + * + * @author Daniil Gentili <daniil@daniil.it> + * @copyright 2016-2018 Daniil Gentili <daniil@daniil.it> + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ namespace danog\MadelineProto\Threads; diff --git a/src/danog/MadelineProto/Tools.php b/src/danog/MadelineProto/Tools.php index 3415f9c0..f8195f92 100644 --- a/src/danog/MadelineProto/Tools.php +++ b/src/danog/MadelineProto/Tools.php @@ -1,17 +1,29 @@ <?php -/* -Copyright 2016-2018 Daniil Gentili -(https://daniil.it) -This file is part of MadelineProto. -MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. -MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -See the GNU Affero General Public License for more details. -You should have received a copy of the GNU General Public License along with the MadelineProto. -If not, see <http://www.gnu.org/licenses/>. -*/ +/** + * Tools module. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see <http://www.gnu.org/licenses/>. + * + * @author Daniil Gentili <daniil@daniil.it> + * @copyright 2016-2018 Daniil Gentili <daniil@daniil.it> + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ namespace danog\MadelineProto; +use Amp\Deferred; +use Amp\Loop; +use Amp\Promise; +use Amp\Success; +use function Amp\Promise\wait; + /** * Some tools. */ @@ -36,6 +48,34 @@ trait Tools return $hash; } + public function random_int($modulus = false) + { + if ($modulus === false) { + $modulus = PHP_INT_MAX; + } + + try { + return \random_int(0, PHP_INT_MAX) % $modulus; + } catch (\Exception $e) { + // random_compat will throw an Exception, which in PHP 5 does not implement Throwable + } catch (\Throwable $e) { + // If a sufficient source of randomness is unavailable, random_bytes() will throw an + // object that implements the Throwable interface (Exception, TypeError, Error). + // We don't actually need to do anything here. The string() method should just continue + // as normal. Note, however, that if we don't have a sufficient source of randomness for + // random_bytes(), most of the other calls here will fail too, so we'll end up using + // the PHP implementation. + } + + if (Magic::$bigint) { + $number = $this->unpack_signed_int($this->random(4)); + } else { + $number = $this->unpack_signed_long($this->random(8)); + } + + return ($number & PHP_INT_MAX) % $modulus; + } + public function random($length) { return $length === 0 ? '' : \phpseclib\Crypt\Random::string($length); @@ -143,4 +183,66 @@ trait Tools return unpack('d', \danog\MadelineProto\Magic::$BIG_ENDIAN ? strrev($value) : $value)[1]; } + + public function infloop() + { + while (true) { + Loop::loop(); + } + } + + public function wait($promise) + { + if ($promise instanceof \Generator) { + $promise = new Coroutine($promise); + } elseif (!($promise instanceof Promise)) { + return $promise; + } + do { + try { + return wait($promise); + } catch (\Throwable $e) { + if ($e->getMessage() !== 'Loop stopped without resolving the promise') { + //$this->logger->logger("AN EXCEPTION SURFACED " . $e, \danog\MadelineProto\Logger::ERROR); + throw $e; + } + } + } while (true); + } + + public function call($promise) + { + if ($promise instanceof \Generator) { + $promise = new Coroutine($promise); + } elseif (!($promise instanceof Promise)) { + return new Success($promise); + } + + return $promise; + } + + public function after($a, $b) + { + $a = $this->call($a); + $deferred = new Deferred(); + $a->onResolve(function ($e, $res) use ($b, $deferred) { + if ($e) { + throw $e; + } + $b = $this->call($b()); + $b->onResolve(static function ($e, $res) use ($deferred) { + if ($e) { + throw $e; + } + $deferred->resolve($res); + }); + }); + + return $deferred->promise(); + } + + public function sleep_async($time) + { + return new \Amp\Delayed($time * 1000); + } } diff --git a/src/danog/MadelineProto/VoIP/AuthKeyHandler.php b/src/danog/MadelineProto/VoIP/AuthKeyHandler.php index 8415042c..1ee838dc 100644 --- a/src/danog/MadelineProto/VoIP/AuthKeyHandler.php +++ b/src/danog/MadelineProto/VoIP/AuthKeyHandler.php @@ -1,15 +1,21 @@ <?php -/* -Copyright 2016-2018 Daniil Gentili -(https://daniil.it) -This file is part of MadelineProto. -MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. -MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -See the GNU Affero General Public License for more details. -You should have received a copy of the GNU General Public License along with MadelineProto. -If not, see <http://www.gnu.org/licenses/>. -*/ +/** + * AuthKeyHandler module. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see <http://www.gnu.org/licenses/>. + * + * @author Daniil Gentili <daniil@daniil.it> + * @copyright 2016-2018 Daniil Gentili <daniil@daniil.it> + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ namespace danog\MadelineProto\VoIP; @@ -77,7 +83,7 @@ trait AuthKeyHandler $this->check_G($g_b, $dh_config['p']); try { - $res = $this->method_call('phone.acceptCall', ['peer' => $call, 'g_b' => $g_b->toBytes(), 'protocol' => ['_' => 'phoneCallProtocol', 'udp_reflector' => true, 'udp_p2p' => true, 'min_layer' => 65, 'max_layer' => 65]], ['datacenter' => $this->datacenter->curdc]); + $res = $this->method_call('phone.acceptCall', ['peer' => $call, 'g_b' => $g_b->toBytes(), 'protocol' => ['_' => 'phoneCallProtocol', 'udp_reflector' => true, 'udp_p2p' => $call['p2p_allowed'], 'min_layer' => 65, 'max_layer' => 65]], ['datacenter' => $this->datacenter->curdc]); } catch (\danog\MadelineProto\RPCErrorException $e) { if ($e->rpc === 'CALL_ALREADY_ACCEPTED') { $this->logger->logger(sprintf(\danog\MadelineProto\Lang::$current_lang['call_already_accepted'], $call['id'])); diff --git a/src/danog/MadelineProto/VoIP/MessageHandler.php b/src/danog/MadelineProto/VoIP/MessageHandler.php deleted file mode 100644 index 78774873..00000000 --- a/src/danog/MadelineProto/VoIP/MessageHandler.php +++ /dev/null @@ -1,153 +0,0 @@ -<?php - -/* -Copyright 2016-2018 Daniil Gentili -(https://daniil.it) -This file is part of MadelineProto. -MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. -MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -See the GNU Affero General Public License for more details. -You should have received a copy of the GNU General Public License along with MadelineProto. -If not, see <http://www.gnu.org/licenses/>. -*/ - -namespace danog\MadelineProto\VoIP; - -/** - * Manages packing and unpacking of messages, and the list of sent and received messages. - */ -trait MessageHandler -{ - public function send_message($message, $datacenter) - { - //$has_ack = false; - - if (count($this->datacenter->sockets[$datacenter]->object_queue) > 1) { - $messages = []; - $this->logger->logger("Sending msg_container as encrypted message to DC $datacenter", \danog\MadelineProto\Logger::ULTRA_VERBOSE); - - foreach ($this->datacenter->sockets[$datacenter]->object_queue as $message) { - $message['seqno'] = $this->generate_out_seq_no($datacenter, $message['content_related']); - $message['bytes'] = strlen($message['body']); - //$has_ack = $has_ack || $message['_'] === 'msgs_ack'; - $this->logger->logger("Inside of msg_container, sending {$message['_']} as encrypted message to DC $datacenter", \danog\MadelineProto\Logger::ULTRA_VERBOSE); - $message['_'] = 'MTmessage'; - $messages[] = $message; - $this->datacenter->sockets[$datacenter]->outgoing_messages[$message['msg_id']] = ['seq_no' => $message['seqno'], 'response' => -1]; //, 'content' => $this->deserialize($message['body'], ['type' => '', 'datacenter' => $datacenter])]; - } - $message_data = $this->serialize_object(['type' => ''], ['_' => 'msg_container', 'messages' => $messages], 'lol'); - $message_id = $this->generate_message_id($datacenter); - $seq_no = $this->generate_out_seq_no($datacenter, false); - } elseif (count($this->datacenter->sockets[$datacenter]->object_queue)) { - $message = array_shift($this->datacenter->sockets[$datacenter]->object_queue); - $this->logger->logger("Sending {$message['_']} as encrypted message to DC $datacenter", \danog\MadelineProto\Logger::ULTRA_VERBOSE); - $message_data = $message['body']; - $message_id = $message['msg_id']; - $seq_no = $this->generate_out_seq_no($datacenter, $message['content_related']); - } else { - return; - } - $plaintext = $this->datacenter->sockets[$datacenter]->temp_auth_key['server_salt'].$this->datacenter->sockets[$datacenter]->session_id.$message_id.pack('VV', $seq_no, strlen($message_data)).$message_data; - $padding = $this->posmod(-strlen($plaintext), 16); - if ($padding < 12) { - $padding += 16; - } - $padding = $this->random($padding); - $message_key = substr(hash('sha256', substr($this->datacenter->sockets[$datacenter]->temp_auth_key['auth_key'], 88, 32).$plaintext.$padding, true), 8, 16); - list($aes_key, $aes_iv) = $this->aes_calculate($message_key, $this->datacenter->sockets[$datacenter]->temp_auth_key['auth_key']); - $message = $this->datacenter->sockets[$datacenter]->temp_auth_key['id'].$message_key.$this->ige_encrypt($plaintext.$padding, $aes_key, $aes_iv); - $this->datacenter->sockets[$datacenter]->outgoing_messages[$message_id] = ['seq_no' => $seq_no, 'response' => -1]; - $this->datacenter->sockets[$datacenter]->send_message($message); - $this->datacenter->sockets[$datacenter]->object_queue = []; - - /*if ($has_ack) { - foreach ($this->datacenter->sockets[$datacenter]->ack_queue as $msg_id) { - $this->datacenter->sockets[$datacenter]->incoming_messages[$msg_id]['ack'] = true; - } - $this->datacenter->sockets[$datacenter]->ack_queue = []; - }*/ - } - - /** - * Reading connection and receiving message from server. - */ - public function recv_message($datacenter) - { - if ($this->datacenter->sockets[$datacenter]->must_open) { - $this->logger->logger('Trying to read from closed socket, sending initial ping'); - if ($this->is_http($datacenter)) { - $this->method_call('http_wait', ['max_wait' => 500, 'wait_after' => 150, 'max_delay' => 500], ['datacenter' => $datacenter]); - } elseif (isset($this->datacenter->sockets[$datacenter]->temp_auth_key['connection_inited']) && $this->datacenter->sockets[$datacenter]->temp_auth_key['connection_inited']) { - $this->method_call('ping', ['ping_id' => 0], ['datacenter' => $datacenter]); - } else { - throw new \danog\MadelineProto\Exception('Resend query'); - } - } - $payload = $this->datacenter->sockets[$datacenter]->read_message(); - if (strlen($payload) === 4) { - $payload = $this->unpack_signed_int($payload); - $this->logger->logger("Received $payload from DC $datacenter", \danog\MadelineProto\Logger::ULTRA_VERBOSE); - - return $payload; - } - $auth_key_id = substr($payload, 0, 8); - if ($auth_key_id === "\0\0\0\0\0\0\0\0") { - $message_id = substr($payload, 8, 8); - $this->check_message_id($message_id, ['outgoing' => false, 'datacenter' => $datacenter, 'container' => false]); - $message_length = unpack('V', substr($payload, 16, 4))[1]; - $message_data = substr($payload, 20, $message_length); - $this->datacenter->sockets[$datacenter]->incoming_messages[$message_id] = []; - } elseif ($auth_key_id === $this->datacenter->sockets[$datacenter]->temp_auth_key['id']) { - $message_key = substr($payload, 8, 16); - $encrypted_data = substr($payload, 24); - list($aes_key, $aes_iv) = $this->aes_calculate($message_key, $this->datacenter->sockets[$datacenter]->temp_auth_key['auth_key'], false); - $decrypted_data = $this->ige_decrypt($encrypted_data, $aes_key, $aes_iv); - /* - $server_salt = substr($decrypted_data, 0, 8); - if ($server_salt != $this->datacenter->sockets[$datacenter]->temp_auth_key['server_salt']) { - $this->logger->logger('WARNING: Server salt mismatch (my server salt '.$this->datacenter->sockets[$datacenter]->temp_auth_key['server_salt'].' is not equal to server server salt '.$server_salt.').', \danog\MadelineProto\Logger::WARNING); - } - */ - $session_id = substr($decrypted_data, 8, 8); - if ($session_id != $this->datacenter->sockets[$datacenter]->session_id) { - throw new \danog\MadelineProto\Exception('Session id mismatch.'); - } - $message_id = substr($decrypted_data, 16, 8); - $this->check_message_id($message_id, ['outgoing' => false, 'datacenter' => $datacenter, 'container' => false]); - $seq_no = unpack('V', substr($decrypted_data, 24, 4))[1]; - // Dunno how to handle any incorrect sequence numbers - $message_data_length = unpack('V', substr($decrypted_data, 28, 4))[1]; - if ($message_data_length > strlen($decrypted_data)) { - throw new \danog\MadelineProto\SecurityException('message_data_length is too big'); - } - if (strlen($decrypted_data) - 32 - $message_data_length < 12) { - throw new \danog\MadelineProto\SecurityException('padding is too small'); - } - if (strlen($decrypted_data) - 32 - $message_data_length > 1024) { - throw new \danog\MadelineProto\SecurityException('padding is too big'); - } - if ($message_data_length < 0) { - throw new \danog\MadelineProto\SecurityException('message_data_length not positive'); - } - if ($message_data_length % 4 != 0) { - throw new \danog\MadelineProto\SecurityException('message_data_length not divisible by 4'); - } - $message_data = substr($decrypted_data, 32, $message_data_length); - if ($message_key != substr(hash('sha256', substr($this->datacenter->sockets[$datacenter]->temp_auth_key['auth_key'], 96, 32).$decrypted_data, true), 8, 16)) { - throw new \danog\MadelineProto\SecurityException('msg_key mismatch'); - } - $this->datacenter->sockets[$datacenter]->incoming_messages[$message_id] = ['seq_no' => $seq_no]; - } else { - $this->close_and_reopen($datacenter); - - throw new \danog\MadelineProto\Exception('Got unknown auth_key id'); - } - $deserialized = $this->deserialize($message_data, ['type' => '', 'datacenter' => $datacenter]); - $this->datacenter->sockets[$datacenter]->incoming_messages[$message_id]['content'] = $deserialized; - $this->datacenter->sockets[$datacenter]->incoming_messages[$message_id]['response'] = -1; - $this->datacenter->sockets[$datacenter]->new_incoming[$message_id] = $message_id; - $this->datacenter->sockets[$datacenter]->last_recv = time(); - - return true; - } -} diff --git a/src/danog/MadelineProto/Wrappers/ApiStart.php b/src/danog/MadelineProto/Wrappers/ApiStart.php index 1ba1a7fa..c54127f4 100644 --- a/src/danog/MadelineProto/Wrappers/ApiStart.php +++ b/src/danog/MadelineProto/Wrappers/ApiStart.php @@ -1,15 +1,21 @@ <?php -/* -Copyright 2016-2018 Daniil Gentili -(https://daniil.it) -This file is part of MadelineProto. -MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. -MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -See the GNU Affero General Public License for more details. -You should have received a copy of the GNU General Public License along with MadelineProto. -If not, see <http://www.gnu.org/licenses/>. -*/ +/** + * ApiStart module. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see <http://www.gnu.org/licenses/>. + * + * @author Daniil Gentili <daniil@daniil.it> + * @copyright 2016-2018 Daniil Gentili <daniil@daniil.it> + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ namespace danog\MadelineProto\Wrappers; @@ -22,8 +28,7 @@ trait ApiStart { if (php_sapi_name() === 'cli') { if (!function_exists('readline')) { - function readline($prompt = null) - { + $readline = function ($prompt = null) { if ($prompt) { echo $prompt; } @@ -31,28 +36,34 @@ trait ApiStart $line = rtrim(fgets($fp, 1024)); return $line; - } + }; + } else { + $readline = 'readline'; } 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) { + 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 Short name: your app\'s short name, can be anything URL: your app/website\'s URL, or t.me/yourusername - Platform: Web + Platform: anything Description: Describe your app here 4) Click on create application'.PHP_EOL; - $app['api_id'] = readline('5) Enter your API ID: '); - $app['api_hash'] = readline('6) Enter your API hash: '); + $app['api_id'] = $readline('5) Enter your API ID: '); + $app['api_hash'] = $readline('6) Enter your API hash: '); return $app; } else { - $this->my_telegram_org_wrapper = new \danog\MadelineProto\MyTelegramOrgWrapper(readline('Enter a phone number that is already registered on Telegram: ')); - $this->my_telegram_org_wrapper->complete_login(readline('Enter the verification code you received in telegram: ')); + $this->my_telegram_org_wrapper = new \danog\MadelineProto\MyTelegramOrgWrapper($readline('Enter a phone number that is already registered on Telegram: ')); + $this->my_telegram_org_wrapper->complete_login($readline('Enter the verification code you received in telegram: ')); if (!$this->my_telegram_org_wrapper->has_app()) { - $app = $this->my_telegram_org_wrapper->create_app(['app_title' => 'MadelineProto app', 'app_shortname' => 'MadelineProtoApp', 'app_url' => 'https://madelineproto.xyz', 'app_platform' => 'web', 'app_desc' => 'MadelineProto application']); + $app_title = $readline('Enter the app\'s name, can be anything: '); + $short_name = $readline('Enter the app\'s short name, can be anything: '); + $url = $readline('Enter the app/website\'s URL, or t.me/yourusername: '); + $description = $readline('Describe your app: '); + $app = $this->my_telegram_org_wrapper->create_app(['app_title' => $app_title, 'app_shortname' => $short_name, 'app_url' => $short_name, 'app_platform' => 'web', 'app_desc' => $description]); } else { $app = $this->my_telegram_org_wrapper->get_app(); } @@ -75,12 +86,22 @@ Note that you can also provide the API parameters directly in the code using the } } elseif (!$this->my_telegram_org_wrapper->logged_in()) { if (isset($_POST['code'])) { - $app = $this->web_api_complete_login(); + $this->web_api_complete_login(); + if ($this->my_telegram_org_wrapper->has_app()) { + return $this->my_telegram_org_wrapper->get_app(); + } + $this->web_api_echo(); + } else { + $this->web_api_echo("You didn't provide a phone code!"); + } + } else { + if (isset($_POST['app_title'], $_POST['app_shortname'], $_POST['app_url'], $_POST['app_platform'], $_POST['app_desc'])) { + $app = $this->web_api_create_app(); $this->getting_api_id = false; return $app; } else { - $this->web_api_echo("You didn't provide a phone code!"); + $this->web_api_echo("You didn't provide all of the required parameters!"); } } exit; @@ -103,17 +124,25 @@ Note that you can also provide the API parameters directly in the code using the { try { $this->my_telegram_org_wrapper->complete_login($_POST['code']); - if (!$this->my_telegram_org_wrapper->has_app()) { - $app = $this->my_telegram_org_wrapper->create_app(['app_title' => 'MadelineProto app', 'app_shortname' => 'MadelineProtoApp', 'app_url' => 'https://madelineproto.xyz', 'app_platform' => 'web', 'app_desc' => 'MadelineProto application']); - } else { - $app = $this->my_telegram_org_wrapper->get_app(); - } - - return $app; } catch (\danog\MadelineProto\RPCErrorException $e) { $this->web_api_echo('ERROR: '.$e->getMessage().'. Try again.'); } catch (\danog\MadelineProto\Exception $e) { $this->web_api_echo('ERROR: '.$e->getMessage().'. Try again.'); } } + + public function web_api_create_app() + { + try { + $params = $_POST; + unset($params['creating_app']); + $app = $this->my_telegram_org_wrapper->create_app($params); + + return $app; + } catch (\danog\MadelineProto\RPCErrorException $e) { + $this->web_api_echo('ERROR: '.$e->getMessage().' Try again.'); + } catch (\danog\MadelineProto\Exception $e) { + $this->web_api_echo('ERROR: '.$e->getMessage().' Try again.'); + } + } } diff --git a/src/danog/MadelineProto/Wrappers/ApiTemplates.php b/src/danog/MadelineProto/Wrappers/ApiTemplates.php index 4e237ad6..53908052 100644 --- a/src/danog/MadelineProto/Wrappers/ApiTemplates.php +++ b/src/danog/MadelineProto/Wrappers/ApiTemplates.php @@ -1,15 +1,21 @@ <?php -/* -Copyright 2016-2018 Daniil Gentili -(https://daniil.it) -This file is part of MadelineProto. -MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. -MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -See the GNU Affero General Public License for more details. -You should have received a copy of the GNU General Public License along with MadelineProto. -If not, see <http://www.gnu.org/licenses/>. -*/ +/** + * ApiTemplates module. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see <http://www.gnu.org/licenses/>. + * + * @author Daniil Gentili <daniil@daniil.it> + * @copyright 2016-2018 Daniil Gentili <daniil@daniil.it> + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ namespace danog\MadelineProto\Wrappers; @@ -22,17 +28,17 @@ trait ApiTemplates </head> <body> <h1>MadelineProto</h1> + <p>%s</p> <form method="POST"> %s <button type="submit"/>Go</button> </form> - <p>%s</p> </body> </html>'; public function web_api_echo_template($message, $form) { - return sprintf($this->web_api_template, $form, $message); + return sprintf($this->web_api_template, $message, $form); } public function get_web_api_template() @@ -70,7 +76,43 @@ trait ApiTemplates echo $this->web_api_echo_template('Do you want to enter the API id and the API hash manually or automatically?<br>Note that you can also provide it directly in the code using the <a href="https://docs.madelineproto.xyz/docs/SETTINGS.html#settingsapp_infoapi_id">settings</a>.<b>'.$message.'</b>', '<select name="type"><option value="automatic">Automatically</option><option value="manual">Manually</option></select>'); } } else { - echo $this->web_api_echo_template('Enter your code<br><b>'.$message.'</b>', '<input type="text" name="code" placeholder="Code" required/>'); + if (!$this->my_telegram_org_wrapper->logged_in()) { + echo $this->web_api_echo_template('Enter your code<br><b>'.$message.'</b>', '<input type="text" name="code" placeholder="Code" required/>'); + } else { + echo $this->web_api_echo_template( + 'Enter the API info<br><b>'.$message.'</b>', + '<input type="hidden" name="creating_app" value="yes" required/> + Enter the app name, can be anything: <br><input type="text" name="app_title" required/><br> + <br>Enter the app's short name, alphanumeric, 5-32 chars: <br><input type="text" name="app_shortname" required/><br> + <br>Enter the app/website URL, or https://t.me/yourusername: <br><input type="text" name="app_url" required/><br> + <br>Enter the app platform: <br> + <label> + <input type="radio" name="app_platform" value="android" checked> Android + </label> + <label> + <input type="radio" name="app_platform" value="ios"> iOS + </label> + <label> + <input type="radio" name="app_platform" value="wp"> Windows Phone + </label> + <label> + <input type="radio" name="app_platform" value="bb"> BlackBerry + </label> + <label> + <input type="radio" name="app_platform" value="desktop"> Desktop + </label> + <label> + <input type="radio" name="app_platform" value="web"> Web + </label> + <label> + <input type="radio" name="app_platform" value="ubp"> Ubuntu phone + </label> + <label> + <input type="radio" name="app_platform" value="other"> Other (specify in description) + </label> + <br><br>Enter the app description, can be anything: <br><textarea name="app_desc" required></textarea><br><br> + '); + } } } } diff --git a/src/danog/MadelineProto/Wrappers/Callback.php b/src/danog/MadelineProto/Wrappers/Callback.php index 29f98b90..30eef04b 100644 --- a/src/danog/MadelineProto/Wrappers/Callback.php +++ b/src/danog/MadelineProto/Wrappers/Callback.php @@ -1,15 +1,21 @@ <?php -/* -Copyright 2016-2018 Daniil Gentili -(https://daniil.it) -This file is part of MadelineProto. -MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. -MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -See the GNU Affero General Public License for more details. -You should have received a copy of the GNU General Public License along with MadelineProto. -If not, see <http://www.gnu.org/licenses/>. -*/ +/** + * Callback module. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see <http://www.gnu.org/licenses/>. + * + * @author Daniil Gentili <daniil@daniil.it> + * @copyright 2016-2018 Daniil Gentili <daniil@daniil.it> + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ namespace danog\MadelineProto\Wrappers; @@ -21,6 +27,9 @@ trait Callback public function setCallback($callback) { $this->settings['updates']['callback'] = $callback; + $this->settings['updates']['run_callback'] = true; $this->settings['updates']['handle_updates'] = true; + + return $this->datacenter->sockets[$this->settings['connection_settings']['default_dc']]->updater->start(); } } diff --git a/src/danog/MadelineProto/Wrappers/DialogHandler.php b/src/danog/MadelineProto/Wrappers/DialogHandler.php index c2b8a933..3ad9ad74 100644 --- a/src/danog/MadelineProto/Wrappers/DialogHandler.php +++ b/src/danog/MadelineProto/Wrappers/DialogHandler.php @@ -1,15 +1,21 @@ <?php -/* -Copyright 2016-2018 Daniil Gentili -(https://daniil.it) -This file is part of MadelineProto. -MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. -MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -See the GNU Affero General Public License for more details. -You should have received a copy of the GNU General Public License along with MadelineProto. -If not, see <http://www.gnu.org/licenses/>. -*/ +/** + * DialogHandler module. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see <http://www.gnu.org/licenses/>. + * + * @author Daniil Gentili <daniil@daniil.it> + * @copyright 2016-2018 Daniil Gentili <daniil@daniil.it> + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ namespace danog\MadelineProto\Wrappers; diff --git a/src/danog/MadelineProto/Wrappers/Events.php b/src/danog/MadelineProto/Wrappers/Events.php index 32ff3cff..243efce1 100644 --- a/src/danog/MadelineProto/Wrappers/Events.php +++ b/src/danog/MadelineProto/Wrappers/Events.php @@ -1,15 +1,21 @@ <?php -/* -Copyright 2016-2018 Daniil Gentili -(https://daniil.it) -This file is part of MadelineProto. -MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. -MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -See the GNU Affero General Public License for more details. -You should have received a copy of the GNU General Public License along with MadelineProto. -If not, see <http://www.gnu.org/licenses/>. -*/ +/** + * Events module. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see <http://www.gnu.org/licenses/>. + * + * @author Daniil Gentili <daniil@daniil.it> + * @copyright 2016-2018 Daniil Gentili <daniil@daniil.it> + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ namespace danog\MadelineProto\Wrappers; @@ -20,6 +26,7 @@ trait Events { public $event_handler; private $event_handler_instance; + private $event_handler_methods = []; public function setEventHandler($event_handler) { @@ -31,14 +38,33 @@ trait Events if (!($this->event_handler_instance instanceof $this->event_handler)) { $class_name = $this->event_handler; - $this->event_handler_instance = new $class_name($this); + $this->event_handler_instance = new $class_name($this->wrapper); + } elseif ($this->wrapper) { + $this->event_handler_instance->__construct($this->wrapper); } - if (method_exists($this->event_handler_instance, 'onLoop')) { - $this->loop_callback = [$this->event_handler_instance, 'onLoop']; + $this->event_handler_methods = []; + foreach (\get_class_methods($this->event_handler) as $method) { + if ($method === 'onLoop') { + $this->loop_callback = [$this->event_handler_instance, 'onLoop']; + } elseif ($method === 'onAny') { + foreach ($this->constructors->by_id as $id => $constructor) { + if ($constructor['type'] === 'Update' && !isset($this->event_handler_methods[$constructor['predicate']])) { + $this->event_handler_methods[$constructor['predicate']] = [$this->event_handler_instance, 'onAny']; + } + } + } else { + $method_name = lcfirst(substr($method, 2)); + $this->event_handler_methods[$method_name] = [$this->event_handler_instance, $method]; + } } $this->settings['updates']['callback'] = [$this, 'event_update_handler']; $this->settings['updates']['handle_updates'] = true; + $this->settings['updates']['run_callback'] = true; + + if (isset($this->datacenter->sockets[$this->settings['connection_settings']['default_dc']]->updater)) { + $this->datacenter->sockets[$this->settings['connection_settings']['default_dc']]->updater->start(); + } } public function getEventHandler() @@ -48,11 +74,8 @@ trait Events public function event_update_handler($update) { - $method_name = 'on'.ucfirst($update['_']); - if (method_exists($this->event_handler_instance, $method_name)) { - $this->event_handler_instance->$method_name($update); - } elseif (method_exists($this->event_handler_instance, 'onAny')) { - $this->event_handler_instance->onAny($update); + if (isset($this->event_handler_methods[$update['_']])) { + return $this->event_handler_methods[$update['_']]($update); } } } diff --git a/src/danog/MadelineProto/Wrappers/Login.php b/src/danog/MadelineProto/Wrappers/Login.php index 7ec13432..61fd2b02 100644 --- a/src/danog/MadelineProto/Wrappers/Login.php +++ b/src/danog/MadelineProto/Wrappers/Login.php @@ -1,18 +1,26 @@ <?php -/* -Copyright 2016-2018 Daniil Gentili -(https://daniil.it) -This file is part of MadelineProto. -MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. -MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -See the GNU Affero General Public License for more details. -You should have received a copy of the GNU General Public License along with MadelineProto. -If not, see <http://www.gnu.org/licenses/>. -*/ +/** + * Login module. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see <http://www.gnu.org/licenses/>. + * + * @author Daniil Gentili <daniil@daniil.it> + * @copyright 2016-2018 Daniil Gentili <daniil@daniil.it> + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ namespace danog\MadelineProto\Wrappers; +use danog\MadelineProto\MTProtoTools\PasswordCalculator; + /** * Manages logging in and out. */ @@ -53,9 +61,6 @@ trait Login $this->datacenter->sockets[$this->datacenter->curdc]->authorized = true; $this->updates = []; $this->updates_key = 0; - if (!isset($this->settings['pwr']['pwr']) || !$this->settings['pwr']['pwr']) { - @file_get_contents('https://api.pwrtelegram.xyz/bot'.$token.'/getme'); - } $this->init_authorization(); $this->logger->logger(\danog\MadelineProto\Lang::$current_lang['login_ok'], \danog\MadelineProto\Logger::NOTICE); @@ -94,8 +99,8 @@ trait Login } catch (\danog\MadelineProto\RPCErrorException $e) { if ($e->rpc === 'SESSION_PASSWORD_NEEDED') { $this->logger->logger(\danog\MadelineProto\Lang::$current_lang['login_2fa_enabled'], \danog\MadelineProto\Logger::NOTICE); - $this->authorized = self::WAITING_PASSWORD; $this->authorization = $this->method_call('account.getPassword', [], ['datacenter' => $this->datacenter->curdc]); + $this->authorized = self::WAITING_PASSWORD; return $this->authorization; } @@ -179,8 +184,10 @@ trait Login throw new \danog\MadelineProto\Exception(\danog\MadelineProto\Lang::$current_lang['2fa_uncalled']); } $this->authorized = self::NOT_LOGGED_IN; + $hasher = new PasswordCalculator($this->logger); + $hasher->addInfo($this->authorization); $this->logger->logger(\danog\MadelineProto\Lang::$current_lang['login_user'], \danog\MadelineProto\Logger::NOTICE); - $this->authorization = $this->method_call('auth.checkPassword', ['password_hash' => hash('sha256', $this->authorization['current_salt'].$password.$this->authorization['current_salt'], true)], ['datacenter' => $this->datacenter->curdc]); + $this->authorization = $this->method_call('auth.checkPassword', ['password' => $hasher->getCheckPassword($password)], ['datacenter' => $this->datacenter->curdc]); $this->authorized = self::LOGGED_IN; $this->datacenter->sockets[$this->datacenter->curdc]->authorized = true; $this->init_authorization(); @@ -188,4 +195,12 @@ trait Login return $this->authorization; } + + public function update_2fa(array $params): bool + { + $hasher = new PasswordCalculator($this->logger); + $hasher->addInfo($this->method_call('account.getPassword', [], ['datacenter' => $this->datacenter->curdc])); + + return $this->method_call('account.updatePasswordSettings', $hasher->getPassword($params), ['datacenter' => $this->datacenter->curdc]); + } } diff --git a/src/danog/MadelineProto/Wrappers/Loop.php b/src/danog/MadelineProto/Wrappers/Loop.php index 176829b7..762d7fe5 100644 --- a/src/danog/MadelineProto/Wrappers/Loop.php +++ b/src/danog/MadelineProto/Wrappers/Loop.php @@ -1,18 +1,26 @@ <?php -/* -Copyright 2016-2018 Daniil Gentili -(https://daniil.it) -This file is part of MadelineProto. -MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. -MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -See the GNU Affero General Public License for more details. -You should have received a copy of the GNU General Public License along with MadelineProto. -If not, see <http://www.gnu.org/licenses/>. -*/ +/** + * Loop module. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see <http://www.gnu.org/licenses/>. + * + * @author Daniil Gentili <daniil@daniil.it> + * @copyright 2016-2018 Daniil Gentili <daniil@daniil.it> + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ namespace danog\MadelineProto\Wrappers; +use Amp\Deferred; + /** * Manages logging in and out. */ @@ -25,8 +33,11 @@ trait Loop $this->loop_callback = $callback; } - public function loop($max_forks = 0) + public function loop_async($max_forks = 0) { + if (is_callable($max_forks)) { + return $max_forks(); + } if (in_array($this->settings['updates']['callback'], [['danog\\MadelineProto\\API', 'get_updates_update_handler'], 'get_updates_update_handler'])) { return true; } @@ -44,35 +55,37 @@ trait Loop }); } } + if (!$this->settings['updates']['handle_updates']) { + $this->settings['updates']['handle_updates'] = true; + } + if (!$this->settings['updates']['run_callback']) { + $this->settings['updates']['run_callback'] = true; + } + $this->datacenter->sockets[$this->settings['connection_settings']['default_dc']]->updater->start(); + $this->logger->logger('Started update loop', \danog\MadelineProto\Logger::NOTICE); $offset = 0; - if ($max_forks === -1) { - while (true) { - $updates = $this->get_updates(['offset' => $offset]); - foreach ($updates as $update) { - $offset = $update['update_id'] + 1; - if (!pcntl_fork()) { - $this->settings['updates']['callback']($update['update']); - die; - } - } - if ($this->loop_callback !== null) { - $callback = $this->loop_callback; - $callback(); + + while (true) { + foreach ($this->updates as $update) { + $r = $this->settings['updates']['callback']($update); + if (is_object($r)) { + \Amp\Promise\rethrow($this->call($r)); } } - } else { - while (true) { - $updates = $this->get_updates(['offset' => $offset]); - foreach ($updates as $update) { - $offset = $update['update_id'] + 1; - $this->settings['updates']['callback']($update['update']); - } - if ($this->loop_callback !== null) { - $callback = $this->loop_callback; - $callback(); - } + $this->updates = []; + + if ($this->loop_callback !== null) { + $callback = $this->loop_callback; + $callback(); } + array_walk($this->calls, function ($controller, $id) { + if ($controller->getCallState() === \danog\MadelineProto\VoIP::CALL_STATE_ENDED) { + $controller->discard(); + } + }); + $this->update_deferred = new Deferred(); + yield $this->update_deferred->promise(); } } } diff --git a/src/danog/MadelineProto/Wrappers/Noop.php b/src/danog/MadelineProto/Wrappers/Noop.php index 42e022ab..5ee1f22d 100644 --- a/src/danog/MadelineProto/Wrappers/Noop.php +++ b/src/danog/MadelineProto/Wrappers/Noop.php @@ -1,15 +1,21 @@ <?php -/* -Copyright 2016-2018 Daniil Gentili -(https://daniil.it) -This file is part of MadelineProto. -MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. -MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -See the GNU Affero General Public License for more details. -You should have received a copy of the GNU General Public License along with MadelineProto. -If not, see <http://www.gnu.org/licenses/>. -*/ +/** + * Noop module. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see <http://www.gnu.org/licenses/>. + * + * @author Daniil Gentili <daniil@daniil.it> + * @copyright 2016-2018 Daniil Gentili <daniil@daniil.it> + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ namespace danog\MadelineProto\Wrappers; @@ -18,7 +24,9 @@ trait Noop public function setNoop() { $this->settings['updates']['callback'] = [$this, 'noop']; + $this->settings['updates']['run_callback'] = false; $this->settings['updates']['handle_updates'] = true; + $this->datacenter->sockets[$this->settings['connection_settings']['default_dc']]->updater->start(); } public function noop() diff --git a/src/danog/MadelineProto/Wrappers/Start.php b/src/danog/MadelineProto/Wrappers/Start.php index 795ee3b0..02e76a89 100644 --- a/src/danog/MadelineProto/Wrappers/Start.php +++ b/src/danog/MadelineProto/Wrappers/Start.php @@ -1,15 +1,21 @@ <?php -/* -Copyright 2016-2018 Daniil Gentili -(https://daniil.it) -This file is part of MadelineProto. -MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. -MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -See the GNU Affero General Public License for more details. -You should have received a copy of the GNU General Public License along with MadelineProto. -If not, see <http://www.gnu.org/licenses/>. -*/ +/** + * Start module. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see <http://www.gnu.org/licenses/>. + * + * @author Daniil Gentili <daniil@daniil.it> + * @copyright 2016-2018 Daniil Gentili <daniil@daniil.it> + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ namespace danog\MadelineProto\Wrappers; @@ -25,8 +31,7 @@ trait Start } if (php_sapi_name() === 'cli') { if (!function_exists('readline')) { - function readline($prompt = null) - { + $readline = function ($prompt = null) { if ($prompt) { echo $prompt; } @@ -34,18 +39,20 @@ trait Start $line = rtrim(fgets($fp, 1024)); return $line; - } - } - if (strpos(readline('Do you want to login as user or bot (u/b)? '), 'b') !== false) { - $this->bot_login(readline('Enter your bot token: ')); + }; } else { - $this->phone_login(readline('Enter your phone number: ')); - $authorization = $this->complete_phone_login(readline('Enter the phone code: ')); + $readline = 'readline'; + } + if (strpos($readline('Do you want to login as user or bot (u/b)? '), 'b') !== false) { + $this->bot_login($readline('Enter your bot token: ')); + } else { + $this->phone_login($readline('Enter your phone number: ')); + $authorization = $this->complete_phone_login($readline('Enter the phone code: ')); if ($authorization['_'] === 'account.password') { - $authorization = $this->complete_2fa_login(readline('Please enter your password (hint '.$authorization['hint'].'): ')); + $authorization = $this->complete_2fa_login($readline('Please enter your password (hint '.$authorization['hint'].'): ')); } if ($authorization['_'] === 'account.needSignup') { - $authorization = $this->complete_signup(readline('Please enter your first name: '), readline('Please enter your last name (can be empty): ')); + $authorization = $this->complete_signup($readline('Please enter your first name: '), $readline('Please enter your last name (can be empty): ')); } } $this->serialize(); diff --git a/src/danog/MadelineProto/Wrappers/TOS.php b/src/danog/MadelineProto/Wrappers/TOS.php index c41e48fa..b1293dcd 100644 --- a/src/danog/MadelineProto/Wrappers/TOS.php +++ b/src/danog/MadelineProto/Wrappers/TOS.php @@ -1,15 +1,21 @@ <?php -/* -Copyright 2016-2018 Daniil Gentili -(https://daniil.it) -This file is part of MadelineProto. -MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. -MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -See the GNU Affero General Public License for more details. -You should have received a copy of the GNU General Public License along with MadelineProto. -If not, see <http://www.gnu.org/licenses/>. -*/ +/** + * TOS module. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see <http://www.gnu.org/licenses/>. + * + * @author Daniil Gentili <daniil@daniil.it> + * @copyright 2016-2018 Daniil Gentili <daniil@daniil.it> + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ namespace danog\MadelineProto\Wrappers; diff --git a/src/danog/MadelineProto/Wrappers/Templates.php b/src/danog/MadelineProto/Wrappers/Templates.php index 6b3ba52f..0a122dbf 100644 --- a/src/danog/MadelineProto/Wrappers/Templates.php +++ b/src/danog/MadelineProto/Wrappers/Templates.php @@ -1,15 +1,21 @@ <?php -/* -Copyright 2016-2018 Daniil Gentili -(https://daniil.it) -This file is part of MadelineProto. -MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. -MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -See the GNU Affero General Public License for more details. -You should have received a copy of the GNU General Public License along with MadelineProto. -If not, see <http://www.gnu.org/licenses/>. -*/ +/** + * Templates module. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see <http://www.gnu.org/licenses/>. + * + * @author Daniil Gentili <daniil@daniil.it> + * @copyright 2016-2018 Daniil Gentili <daniil@daniil.it> + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ namespace danog\MadelineProto\Wrappers; diff --git a/src/danog/MadelineProto/Wrappers/Webhook.php b/src/danog/MadelineProto/Wrappers/Webhook.php index df52b380..45fa833a 100644 --- a/src/danog/MadelineProto/Wrappers/Webhook.php +++ b/src/danog/MadelineProto/Wrappers/Webhook.php @@ -1,15 +1,21 @@ <?php -/* -Copyright 2016-2018 Daniil Gentili -(https://daniil.it) -This file is part of MadelineProto. -MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. -MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -See the GNU Affero General Public License for more details. -You should have received a copy of the GNU General Public License along with MadelineProto. -If not, see <http://www.gnu.org/licenses/>. -*/ +/** + * Webhook module. + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see <http://www.gnu.org/licenses/>. + * + * @author Daniil Gentili <daniil@daniil.it> + * @copyright 2016-2018 Daniil Gentili <daniil@daniil.it> + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ namespace danog\MadelineProto\Wrappers; @@ -23,6 +29,8 @@ trait Webhook $this->pem_path = $pem_path; $this->hook_url = $hook_url; $this->settings['updates']['callback'] = [$this, 'pwr_webhook']; + $this->settings['updates']['run_callback'] = true; $this->settings['updates']['handle_updates'] = true; + $this->datacenter->sockets[$this->settings['connection_settings']['default_dc']]->updater->start(); } } diff --git a/tests/makephar.sh b/tests/makephar.sh index 4e6216cf..e81a7246 100755 --- a/tests/makephar.sh +++ b/tests/makephar.sh @@ -1,6 +1,7 @@ #!/bin/bash -e -composer global require spatie/7to5 +#composer global require spatie/7to5 dev-master#7b3e0f4254aadd81cf1a7ef2ddad68d5fcdadcc1 + [ -f $HOME/.composer/vendor/bin/php7to5 ] && php7to5=$HOME/.composer/vendor/bin/php7to5 [ -f $HOME/.config/composer/vendor/bin/php7to5 ] && php7to5=$HOME/.config/composer/vendor/bin/php7to5 @@ -13,7 +14,10 @@ echo '{ "name": "danog/madelineprototests", "minimum-stability":"dev", "require": { - "danog/madelineproto": "dev-'$TRAVIS_BRANCH'#'$TRAVIS_COMMIT'" + "danog/madelineproto": "dev-'$TRAVIS_BRANCH'#'$TRAVIS_COMMIT'", + "amphp/dns": "dev-master#861cc857b1ba6e02e8a7439c30403682785fce96 as 0.9.9", + "amphp/file": "dev-master#5a69fca406ac5fd220de0aa68c887bc8046eb93c as 0.3.3", + "amphp/uri": "dev-master#f3195b163275383909ded7770a11d8eb865cbc86 as 0.1.3" }, "repositories": [ { @@ -31,8 +35,11 @@ echo '{ composer update cd .. -$php7to5 convert --copy-all phar7 phar5 >/dev/null +cp -a phar7 phar5 +#$php7to5 convert --copy-all phar7 phar5 >/dev/null find phar5 -type f -exec sed 's/\w* \.\.\./.../' -i {} + +#sed 's/^Loop::set.*;//g' -i phar5/vendor/amphp/amp/lib/Loop.php +#echo 'Loop::set((new DriverFactory())->create());' >> phar5/vendor/amphp/amp/lib/Loop.php [ "$TRAVIS_BRANCH" != "master" ] && branch="-$TRAVIS_BRANCH" || branch="" @@ -46,9 +53,9 @@ git clone git@github.com:danog/MadelineProtoPhar cd MadelineProtoPhar cp "../madeline$branch.phar" . cp ../phar.php ../mtproxyd . -[ "$TRAVIS_BRANCH" == "master" ] && echo -n $TRAVIS_COMMIT > release +echo -n $TRAVIS_COMMIT > release$branch git add -A -git commit -am "Release $TRAVIS_BRANCH $TRAVIS_COMMIT" +git commit -am "Release $TRAVIS_BRANCH - $TRAVIS_COMMIT_MESSAGE" git push origin master cd .. echo "$TRAVIS_COMMIT_MESSAGE" | grep "Apply fixes from StyleCI" && exit diff --git a/tests/makephardebug.sh b/tests/makephardebug.sh index 6b566823..1711e738 100755 --- a/tests/makephardebug.sh +++ b/tests/makephardebug.sh @@ -1,6 +1,7 @@ #!/bin/bash -e -composer global require spatie/7to5 +#composer global require spatie/7to5 dev-master#7b3e0f4254aadd81cf1a7ef2ddad68d5fcdadcc1 + [ -f $HOME/.composer/vendor/bin/php7to5 ] && php7to5=$HOME/.composer/vendor/bin/php7to5 [ -f $HOME/.config/composer/vendor/bin/php7to5 ] && php7to5=$HOME/.config/composer/vendor/bin/php7to5 @@ -12,7 +13,10 @@ echo '{ "name": "danog/madelineprototests", "minimum-stability":"dev", "require": { - "danog/madelineproto": "dev-master" + "danog/madelineproto": "dev-alpha", + "amphp/dns": "dev-master#861cc857b1ba6e02e8a7439c30403682785fce96 as 0.9.9", + "amphp/file": "dev-master#5a69fca406ac5fd220de0aa68c887bc8046eb93c as 0.3.3", + "amphp/uri": "dev-master#f3195b163275383909ded7770a11d8eb865cbc86 as 0.1.3" }, "repositories": [ { @@ -31,8 +35,11 @@ composer update cp -a ../src vendor/danog/madelineproto cd .. -$php7to5 convert --copy-all phar7 phar5 >/dev/null +cp -a phar7 phar5 +#$php7to5 convert --copy-all phar7 phar5 >/dev/null find phar5 -type f -exec sed 's/\w* \.\.\./.../' -i {} + +#sed 's/^Loop::set.*;//g' -i phar5/vendor/amphp/amp/lib/Loop.php +#echo 'Loop::set((new DriverFactory())->create());' >> phar5/vendor/amphp/amp/lib/Loop.php php makephar.php phar5 madeline.phar $(cat .git/refs/heads/master) diff --git a/tests/testing.php b/tests/testing.php index 6fb05164..19e985aa 100755 --- a/tests/testing.php +++ b/tests/testing.php @@ -9,7 +9,7 @@ MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY See the GNU Affero General Public License for more details. You should have received a copy of the GNU General Public License along with MadelineProto. If not, see <http://www.gnu.org/licenses/>. -*/ + */ /** * Various ways to load MadelineProto. @@ -109,11 +109,11 @@ if (stripos(readline('Do you want to handle incoming calls? (y/n): '), 'y') !== $offset = $update['update_id'] + 1; // Just like in the bot API, the offset must be set to the last update_id switch ($update['update']['_']) { case 'updatePhoneCall': - if (is_object($update['update']['phone_call']) && $update['update']['phone_call']->getCallState() === \danog\MadelineProto\VoIP::CALL_STATE_INCOMING) { - $update['update']['phone_call']->accept()->play('input.raw')->then('input.raw')->playOnHold(['input.raw'])->setOutputFile('output.raw'); - $howmany--; - } - } + if (is_object($update['update']['phone_call']) && $update['update']['phone_call']->getCallState() === \danog\MadelineProto\VoIP::CALL_STATE_INCOMING) { + $update['update']['phone_call']->accept()->play('input.raw')->then('input.raw')->playOnHold(['input.raw'])->setOutputFile('output.raw'); + $howmany--; + } + } } } } @@ -252,7 +252,7 @@ $mention = $mention['user_id']; // Selects only the numeric user id $t = time(); $MadelineProto->upload('big'); var_dump(time()-$t); -*/ + */ foreach (json_decode(getenv('TEST_DESTINATION_GROUPS'), true) as $peer) { $sentMessage = $MadelineProto->messages->sendMessage(['peer' => $peer, 'message' => $message, 'entities' => [['_' => 'inputMessageEntityMentionName', 'offset' => 0, 'length' => mb_strlen($message), 'user_id' => $mention]]]); diff --git a/translator.php b/translator.php index 8c0339cf..ac8cf544 100644 --- a/translator.php +++ b/translator.php @@ -3,16 +3,21 @@ require 'vendor/autoload.php'; $template = '<?php -/* -Copyright 2016-2018 Daniil Gentili -(https://daniil.it) -This file is part of MadelineProto. -MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. -MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -See the GNU Affero General Public License for more details. -You should have received a copy of the GNU General Public License along with MadelineProto. -If not, see <http://www.gnu.org/licenses/>. -*/ +/** + * Lang module + * + * This file is part of MadelineProto. + * MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Affero General Public License for more details. + * You should have received a copy of the GNU General Public License along with MadelineProto. + * If not, see <http://www.gnu.org/licenses/>. + * + * @author Daniil Gentili <daniil@daniil.it> + * @copyright 2016-2018 Daniil Gentili <daniil@daniil.it> + * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 + * @link https://docs.madelineproto.xyz MadelineProto documentation + */ namespace danog\MadelineProto; @@ -23,6 +28,16 @@ class Lang // THIS WILL BE OVERWRITTEN BY $lang["en"] public static $current_lang = %s; }'; +function from_camel_case($input) +{ + preg_match_all('!([A-Z][A-Z0-9]*(?=$|[A-Z][a-z0-9])|[A-Za-z][a-z0-9]+)!', $input, $matches); + $ret = $matches[0]; + foreach ($ret as &$match) { + $match = $match == strtoupper($match) ? strtolower($match) : lcfirst($match); + } + + return implode(' ', $ret); +} $lang_code = readline('Enter the language you whish to localize: '); @@ -39,7 +54,11 @@ 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; } - if (\danog\MadelineProto\Lang::$lang[$lang_code][$key] === $value && ($lang_code !== 'en' || $value == '' || strpos($value, 'You cannot use this method directly') === 0)) { + if (\danog\MadelineProto\Lang::$lang[$lang_code][$key] === $value && ($lang_code !== 'en' || $value == '' || + strpos($value, 'You cannot use this method directly') === 0 || + strpos($value, 'Update ') === 0 || + ctype_lower($value[0]) + )) { $value = \danog\MadelineProto\Lang::$lang[$lang_code][$key]; if (in_array($key, ['v_error', 'v_tgerror'])) { $value = hex2bin($value); @@ -47,10 +66,11 @@ foreach (\danog\MadelineProto\Lang::$current_lang as $key => $value) { if ($value == '') { $value = $key; } - preg_match('/^method_(.*?)(?:_param_(.*)_type_(.*))?$/', $key, $matches); + preg_match('/^[^_]+_(.*?)(?:_param_(.*)_type_(.*))?$/', $key, $matches); $method_name = isset($matches[1]) ? $matches[1] : ''; - $param_name = isset($matches[1]) ? $matches[1] : ''; - $param_type = isset($matches[2]) ? $matches[2] : ''; + $param_name = isset($matches[2]) ? $matches[2] : ''; + $param_type = isset($matches[3]) ? $matches[3] : ''; + if ($param_name === 'nonce' && $param_type === 'int128') { \danog\MadelineProto\Lang::$lang[$lang_code][$key] = 'Random number for cryptographic security'; } elseif ($param_name === 'server_nonce' && $param_type === 'int128') { @@ -59,9 +79,37 @@ foreach (\danog\MadelineProto\Lang::$current_lang as $key => $value) { \danog\MadelineProto\Lang::$lang[$lang_code][$key] = 'Random number for cryptographic security'; } elseif (isset(\danog\MadelineProto\MTProto::DISALLOWED_METHODS[$method_name])) { \danog\MadelineProto\Lang::$lang[$lang_code][$key] = \danog\MadelineProto\MTProto::DISALLOWED_METHODS[$method_name]; + } elseif (strpos($value, 'Update ') === 0) { + if (!$param_name && strpos($key, 'object_') === 0) { + $value = str_replace('Update ', '', $value).' update'; + } + } elseif (ctype_lower($value[0])) { } else { \danog\MadelineProto\Lang::$lang[$lang_code][$key] = readline($value.' => '); + if (\danog\MadelineProto\Lang::$lang[$lang_code][$key] === '') { + if ($param_name) { + $l = str_replace('_', ' ', $param_name); + } else { + $l = explode('.', $method_name); + $l = from_camel_case(end($l)); + } + $l = ucfirst(strtolower($l)); + if (preg_match('/ empty$/', $l)) { + $l = 'Empty '.strtolower(preg_replace('/ empty$/', '', $l)); + } + foreach (['id', 'url', 'dc'] as $upper) { + $l = str_replace([ucfirst($upper), ' '.$upper], [strtoupper($upper), ' '.strtoupper($upper)], $l); + } + + if (in_array($param_type, ['Bool', 'true', 'false'])) { + $l .= '?'; + } + + \danog\MadelineProto\Lang::$lang[$lang_code][$key] = $l; + echo 'Using default value '.\danog\MadelineProto\Lang::$lang[$lang_code][$key].PHP_EOL; + } } + \danog\MadelineProto\Lang::$lang[$lang_code][$key] = ucfirst(\danog\MadelineProto\Lang::$lang[$lang_code][$key]); if (in_array($key, ['v_error', 'v_tgerror'])) { \danog\MadelineProto\Lang::$lang[$lang_code][$key] = bin2hex(\danog\MadelineProto\Lang::$lang[$lang_code][$key]); }