1
0
mirror of https://github.com/danog/MadelineProto.git synced 2025-01-23 10:31:13 +01:00

Improvements

This commit is contained in:
Daniil Gentili 2023-11-23 17:24:04 +01:00
parent 0f862db470
commit f4863991b0
2 changed files with 3 additions and 2 deletions

View File

@ -1016,7 +1016,6 @@ trait UpdateHandler
}
if ($update['_'] === 'updateLoginToken') {
try {
$datacenter = $this->datacenter->currentDatacenter;
$authorization = $this->methodCallAsyncRead(
'auth.exportLoginToken',
[
@ -1024,6 +1023,7 @@ trait UpdateHandler
'api_hash' => $this->settings->getAppInfo()->getApiHash(),
],
);
$datacenter = $this->datacenter->currentDatacenter;
if ($authorization['_'] === 'auth.loginTokenMigrateTo') {
$datacenter = $this->isTestMode() ? 10_000 + $authorization['dc_id'] : $authorization['dc_id'];
$this->authorized_dc = $datacenter;

View File

@ -91,7 +91,6 @@ trait Login
$this->qrLoginDeferred ??= new DeferredCancellation;
if (!$this->loginQrCode || $this->loginQrCode->isExpired()) {
try {
$datacenter = $this->datacenter->currentDatacenter;
$authorization = $this->methodCallAsyncRead(
'auth.exportLoginToken',
[
@ -99,6 +98,7 @@ trait Login
'api_hash' => $this->settings->getAppInfo()->getApiHash(),
],
);
$datacenter = $this->datacenter->currentDatacenter;
if ($authorization['_'] === 'auth.loginToken') {
return $this->loginQrCode = new LoginQrCode(
$this,
@ -352,6 +352,7 @@ trait Login
$this->qrLoginDeferred?->cancel();
$this->qrLoginDeferred = null;
$this->logger->logger(Lang::$current_lang['login_ok'], Logger::NOTICE);
$this->fullGetSelf();
$this->getPhoneConfig();
$this->startUpdateSystem();
return $authorization;