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