From 908fb3854f1d04da1ba14d2487ee85cbc1ec3089 Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Sat, 22 Jul 2017 00:02:27 +0100 Subject: [PATCH] CALLS ARE WORKING --- src/danog/MadelineProto/MTProto.php | 8 ++++++++ src/danog/MadelineProto/TL/TL.php | 3 +++ 2 files changed, 11 insertions(+) diff --git a/src/danog/MadelineProto/MTProto.php b/src/danog/MadelineProto/MTProto.php index d0a2a862..36245390 100644 --- a/src/danog/MadelineProto/MTProto.php +++ b/src/danog/MadelineProto/MTProto.php @@ -321,6 +321,14 @@ class MTProto extends \Volatile if (isset($settings['authorization']['rsa_key'])) { unset($settings['authorization']['rsa_key']); } + foreach ($settings['connection_settings'] as $key => &$connection) { + if (!is_array($connection)) continue; + if (!isset($connection['proxy'])) $connection['proxy'] = '\Socket'; + if (!isset($connection['proxy_extra'])) $connection['proxy_extra'] = []; + } + if (!isset($settings['authorization']['rsa_key'])) { + unset($settings['authorization']['rsa_key']); + } $this->reset_session(true, true); $this->config = ['expires' => -1]; $this->__construct($settings); diff --git a/src/danog/MadelineProto/TL/TL.php b/src/danog/MadelineProto/TL/TL.php index dd2f573c..e12ddc21 100644 --- a/src/danog/MadelineProto/TL/TL.php +++ b/src/danog/MadelineProto/TL/TL.php @@ -631,6 +631,9 @@ trait TL if ($this->in_array($arg['name'], ['key_fingerprint', 'server_salt', 'new_server_salt', 'server_public_key_fingerprints', 'ping_id', 'exchange_id'])) { $arg['strlong'] = true; } + if ($this->in_array($arg['name'], ['peer_tag'])) { + $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']);