This commit is contained in:
Daniil Gentili 2017-01-16 15:00:27 +01:00
parent 60a9d7e5f5
commit 7f7bb01e64
2 changed files with 2 additions and 1 deletions

View File

@ -195,7 +195,7 @@ trait PeerHandler
return $this->gen_all($this->chats[$id]); return $this->gen_all($this->chats[$id]);
} }
if ($id < 0 && !preg_match('/^-100/', $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])) { if (isset($this->chats[$id])) {
return $this->gen_all($this->chats[$id]); return $this->gen_all($this->chats[$id]);
} }

View File

@ -173,6 +173,7 @@ trait TL
} }
$auto = false; $auto = false;
if (!is_array($object) && in_array($type['type'], ['User', 'InputUser', 'Chat', 'InputChannel', 'Peer', 'InputPeer'])) { if (!is_array($object) && in_array($type['type'], ['User', 'InputUser', 'Chat', 'InputChannel', 'Peer', 'InputPeer'])) {
$object = $this->get_info($object)[$type['type']]; $object = $this->get_info($object)[$type['type']];
} }