Обновил лонгполл, мелкие исправления

This commit is contained in:
Paradise
2020-09-08 18:55:21 +03:00
parent 9d38d69445
commit b3571bcecf
4 changed files with 63 additions and 17 deletions

View File

@@ -34,14 +34,10 @@ class User extends RobotAbstract
*/
public function auth(string $token, float $version)
{
if ($token instanceof auth) {
if ($token instanceof auth) {
$this->auth = $token;
$this->version = $version;
$this->token = $this->auth->getAccessToken();
} else if (isset($also_version)) {
$this->auth = new Auth($token, $version);
$this->token = $this->auth->getAccessToken();
$this->version = $also_version;
} else {
$this->token = $token;
$this->version = $version;