diff --git a/src/danog/MadelineProto/Session.php b/src/danog/MadelineProto/Session.php index cd930410..00784983 100644 --- a/src/danog/MadelineProto/Session.php +++ b/src/danog/MadelineProto/Session.php @@ -285,14 +285,14 @@ Slv8kg9qv1m6XHVQY3PnEw+QQtqSIXklHwIDAQAB // req_DH_params $this->log->log('Starting Diffie Hellman key exchange'); - $server_dh_params = $this->method_call('req_DH_params', + $server_dh_params = $this->method_call('req_DH_params', [ - 'nonce' => $nonce, - 'server_nonce' => $server_nonce, - 'p' => $p_bytes, - 'q' => $q_bytes, + 'nonce' => $nonce, + 'server_nonce' => $server_nonce, + 'p' => $p_bytes, + 'q' => $q_bytes, 'public_key_fingerprint' => $public_key_fingerprint, - 'encrypted_data' => $encrypted_data + 'encrypted_data' => $encrypted_data, ] ); diff --git a/src/danog/MadelineProto/TL/TL.php b/src/danog/MadelineProto/TL/TL.php index 2203c667..afc870ca 100644 --- a/src/danog/MadelineProto/TL/TL.php +++ b/src/danog/MadelineProto/TL/TL.php @@ -98,6 +98,7 @@ class TL if (!is_numeric($value)) { throw new Exception("serialize_param: given value isn't numeric"); } + return \danog\PHP\Struct::pack('