More improvements
This commit is contained in:
parent
1d16cf807b
commit
14d14fdc3c
@ -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()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user