1
0
mirror of https://github.com/danog/MadelineProto.git synced 2025-01-22 12:51:21 +01:00

Set API ID

This commit is contained in:
Daniil Gentili 2023-01-16 13:32:28 +01:00
parent f16a50a8f6
commit 101052d516
2 changed files with 4 additions and 6 deletions

View File

@ -80,7 +80,7 @@ echo '{
}
]
}' > composer.json
php $(which composer) update -vvv --no-cache
php $(which composer) update --no-cache
php $(which composer) dumpautoload --optimize
rm -rf vendor/danog/madelineproto/docs vendor/danog/madelineproto/vendor-bin
cd ..

View File

@ -70,11 +70,9 @@ if ($loader) {
echo 'Loading settings...'.PHP_EOL;
$settings = json_decode(getenv('MTPROTO_SETTINGS'), true) ?: [];
$settings = Settings::parseFromLegacyFull($settings);
if (getenv('API_ID')) {
$settings->getAppInfo()
->setApiId((int) getenv('API_ID'))
->setApiHash(getenv('API_HASH'));
}
$settings->getAppInfo()
->setApiId((int) getenv('API_ID'))
->setApiHash(getenv('API_HASH'));
/*
* Load MadelineProto