From 7f7bb01e64453c6cabe967da03d64c3ef761fe8b Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Mon, 16 Jan 2017 15:00:27 +0100 Subject: [PATCH] Bugfixes --- src/danog/MadelineProto/MTProtoTools/PeerHandler.php | 2 +- src/danog/MadelineProto/TL/TL.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/danog/MadelineProto/MTProtoTools/PeerHandler.php b/src/danog/MadelineProto/MTProtoTools/PeerHandler.php index dc6427d4..8fcda2c6 100644 --- a/src/danog/MadelineProto/MTProtoTools/PeerHandler.php +++ b/src/danog/MadelineProto/MTProtoTools/PeerHandler.php @@ -195,7 +195,7 @@ trait PeerHandler return $this->gen_all($this->chats[$id]); } if ($id < 0 && !preg_match('/^-100/', $id)) { - $this->method_call('messages.getFullChat', ['chat_id' => $id]); + $this->method_call('messages.getFullChat', ['chat_id' => -$id]); if (isset($this->chats[$id])) { return $this->gen_all($this->chats[$id]); } diff --git a/src/danog/MadelineProto/TL/TL.php b/src/danog/MadelineProto/TL/TL.php index a419249f..799d3d6d 100644 --- a/src/danog/MadelineProto/TL/TL.php +++ b/src/danog/MadelineProto/TL/TL.php @@ -173,6 +173,7 @@ trait TL } $auto = false; + if (!is_array($object) && in_array($type['type'], ['User', 'InputUser', 'Chat', 'InputChannel', 'Peer', 'InputPeer'])) { $object = $this->get_info($object)[$type['type']]; }