From 14d14fdc3c45fa7cf67714c2735118f206610db5 Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Tue, 6 Oct 2020 18:03:36 +0200 Subject: [PATCH] More improvements --- src/danog/MadelineProto/ApiWrappers/Start.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/danog/MadelineProto/ApiWrappers/Start.php b/src/danog/MadelineProto/ApiWrappers/Start.php index 9b4209a1..0cecec04 100644 --- a/src/danog/MadelineProto/ApiWrappers/Start.php +++ b/src/danog/MadelineProto/ApiWrappers/Start.php @@ -117,7 +117,7 @@ trait Start $this->gettingApiId = false; return $app; } - yield from $this->webAPIEcho(Lang::$current_lang['apiParamsError']); + yield $this->webAPIEcho(Lang::$current_lang['apiParamsError']); } return null; } @@ -128,7 +128,7 @@ trait Start yield from $this->myTelegramOrgWrapper->login($_POST['phone_number']); yield $this->webAPIEcho(); } 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 @@ -136,9 +136,9 @@ trait Start try { yield from $this->myTelegramOrgWrapper->completeLogin($_POST['code']); } 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) { - 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 @@ -149,9 +149,9 @@ trait Start $app = (yield from $this->myTelegramOrgWrapper->createApp($params)); return $app; } 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) { - yield from $this->webAPIEcho(\sprintf(Lang::$current_lang['apiError'], $e->getMessage())); + yield $this->webAPIEcho(\sprintf(Lang::$current_lang['apiError'], $e->getMessage())); } } }