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']);