This commit is contained in:
Daniil Gentili 2017-01-29 13:12:29 +01:00
parent 77d735be0c
commit 372562b645
2 changed files with 2 additions and 1 deletions

View File

@ -202,7 +202,7 @@ trait PeerHandler
}
$dbres = json_decode(file_get_contents('https://id.pwrtelegram.xyz/db/getusername?id='.$id), true);
if ($dbres['ok']) {
return $this->gen_all('@'.$dbres['username']);
return $this->get_info('@'.$dbres['result']);
}
throw new \danog\MadelineProto\Exception("Couldn't find peer by provided chat id ".$id);
}

View File

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