Fix my.telegram.org app creation

This commit is contained in:
Daniil Gentili 2018-03-26 13:27:31 +02:00 committed by GitHub
parent 0f061174f3
commit 87ebab50ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -50,7 +50,7 @@ trait ApiStart
$this->my_telegram_org_wrapper = new \danog\MadelineProto\MyTelegramOrgWrapper(readline('Enter a phone number that is already registered on Telegram: '));
$this->my_telegram_org_wrapper->complete_login(readline('Enter the verification code you received in telegram: '));
if (!$this->my_telegram_org_wrapper->has_app()) {
$app = $this->my_telegram_org_wrapper->create_app(['app_name' => 'MadelineProto app', 'app_shortname' => 'MadelineProtoApp', 'app_url' => 'https://madelineproto.xyz', 'app_platform' => 'web', 'app_desc' => 'MadelineProto application']);
$app = $this->my_telegram_org_wrapper->create_app(['app_title' => 'MadelineProto app', 'app_shortname' => 'MadelineProtoApp', 'app_url' => 'https://madelineproto.xyz', 'app_platform' => 'web', 'app_desc' => 'MadelineProto application']);
} else {
$app = $this->my_telegram_org_wrapper->get_app();
}
@ -102,7 +102,7 @@ trait ApiStart
try {
$this->my_telegram_org_wrapper->complete_login($_POST['code']);
if (!$this->my_telegram_org_wrapper->has_app()) {
$app = $this->my_telegram_org_wrapper->create_app(['app_name' => 'MadelineProto app', 'app_shortname' => 'MadelineProtoApp', 'app_url' => 'https://madelineproto.xyz', 'app_platform' => 'web', 'app_desc' => 'MadelineProto application']);
$app = $this->my_telegram_org_wrapper->create_app(['app_title' => 'MadelineProto app', 'app_shortname' => 'MadelineProtoApp', 'app_url' => 'https://madelineproto.xyz', 'app_platform' => 'web', 'app_desc' => 'MadelineProto application']);
} else {
$app = $this->my_telegram_org_wrapper->get_app();
}