More improvements
This commit is contained in:
parent
1d16cf807b
commit
14d14fdc3c
|
@ -117,7 +117,7 @@ trait Start
|
||||||
$this->gettingApiId = false;
|
$this->gettingApiId = false;
|
||||||
return $app;
|
return $app;
|
||||||
}
|
}
|
||||||
yield from $this->webAPIEcho(Lang::$current_lang['apiParamsError']);
|
yield $this->webAPIEcho(Lang::$current_lang['apiParamsError']);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -128,7 +128,7 @@ trait Start
|
||||||
yield from $this->myTelegramOrgWrapper->login($_POST['phone_number']);
|
yield from $this->myTelegramOrgWrapper->login($_POST['phone_number']);
|
||||||
yield $this->webAPIEcho();
|
yield $this->webAPIEcho();
|
||||||
} catch (\Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
yield from $this->webAPIEcho(\sprintf(Lang::$current_lang['apiError'], $e->getMessage()));
|
yield $this->webAPIEcho(\sprintf(Lang::$current_lang['apiError'], $e->getMessage()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private function webAPICompleteLogin(): \Generator
|
private function webAPICompleteLogin(): \Generator
|
||||||
|
@ -136,9 +136,9 @@ trait Start
|
||||||
try {
|
try {
|
||||||
yield from $this->myTelegramOrgWrapper->completeLogin($_POST['code']);
|
yield from $this->myTelegramOrgWrapper->completeLogin($_POST['code']);
|
||||||
} catch (\danog\MadelineProto\RPCErrorException $e) {
|
} catch (\danog\MadelineProto\RPCErrorException $e) {
|
||||||
yield from $this->webAPIEcho(\sprintf(Lang::$current_lang['apiError'], $e->getMessage()));
|
yield $this->webAPIEcho(\sprintf(Lang::$current_lang['apiError'], $e->getMessage()));
|
||||||
} catch (\danog\MadelineProto\Exception $e) {
|
} catch (\danog\MadelineProto\Exception $e) {
|
||||||
yield from $this->webAPIEcho(\sprintf(Lang::$current_lang['apiError'], $e->getMessage()));
|
yield $this->webAPIEcho(\sprintf(Lang::$current_lang['apiError'], $e->getMessage()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private function webAPICreateApp(): \Generator
|
private function webAPICreateApp(): \Generator
|
||||||
|
@ -149,9 +149,9 @@ trait Start
|
||||||
$app = (yield from $this->myTelegramOrgWrapper->createApp($params));
|
$app = (yield from $this->myTelegramOrgWrapper->createApp($params));
|
||||||
return $app;
|
return $app;
|
||||||
} catch (\danog\MadelineProto\RPCErrorException $e) {
|
} catch (\danog\MadelineProto\RPCErrorException $e) {
|
||||||
yield from $this->webAPIEcho(\sprintf(Lang::$current_lang['apiError'], $e->getMessage()));
|
yield $this->webAPIEcho(\sprintf(Lang::$current_lang['apiError'], $e->getMessage()));
|
||||||
} catch (\danog\MadelineProto\Exception $e) {
|
} catch (\danog\MadelineProto\Exception $e) {
|
||||||
yield from $this->webAPIEcho(\sprintf(Lang::$current_lang['apiError'], $e->getMessage()));
|
yield $this->webAPIEcho(\sprintf(Lang::$current_lang['apiError'], $e->getMessage()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user