Fix my.telegram.org app creation
This commit is contained in:
parent
0f061174f3
commit
87ebab50ce
@ -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 = 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: '));
|
$this->my_telegram_org_wrapper->complete_login(readline('Enter the verification code you received in telegram: '));
|
||||||
if (!$this->my_telegram_org_wrapper->has_app()) {
|
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 {
|
} else {
|
||||||
$app = $this->my_telegram_org_wrapper->get_app();
|
$app = $this->my_telegram_org_wrapper->get_app();
|
||||||
}
|
}
|
||||||
@ -102,7 +102,7 @@ trait ApiStart
|
|||||||
try {
|
try {
|
||||||
$this->my_telegram_org_wrapper->complete_login($_POST['code']);
|
$this->my_telegram_org_wrapper->complete_login($_POST['code']);
|
||||||
if (!$this->my_telegram_org_wrapper->has_app()) {
|
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 {
|
} else {
|
||||||
$app = $this->my_telegram_org_wrapper->get_app();
|
$app = $this->my_telegram_org_wrapper->get_app();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user