mirror of
https://github.com/danog/MadelineProto.git
synced 2024-11-27 13:54:39 +01:00
Final improvements
This commit is contained in:
parent
caaffb60f1
commit
e8b77cb722
@ -54,7 +54,7 @@ class MTProto
|
||||
/*
|
||||
const V = 71;
|
||||
*/
|
||||
const V = 99;
|
||||
const V = 100;
|
||||
const NOT_LOGGED_IN = 0;
|
||||
const WAITING_CODE = 1;
|
||||
const WAITING_SIGNUP = -1;
|
||||
@ -462,6 +462,7 @@ class MTProto
|
||||
// Extra parameters to pass to the proxy class using setExtra
|
||||
'pfs' => extension_loaded('gmp'),
|
||||
],
|
||||
'default_dc' => 2
|
||||
], 'app_info' => [
|
||||
// obtained in https://my.telegram.org
|
||||
//'api_id' => you should put an API id in the settings array you provide
|
||||
|
@ -247,8 +247,8 @@ trait CallHandler
|
||||
} catch (\danog\MadelineProto\Exception $e) {
|
||||
$last_error = $e->getMessage().' in '.basename($e->getFile(), '.php').' on line '.$e->getLine();
|
||||
if (strpos($e->getMessage(), 'Received request to switch to DC ') === 0) {
|
||||
if ($this->authorized_dc === -1 && ($method === 'users.getUsers' && $args = ['id' => [['_' => 'inputUserSelf']]]) || $method === 'auth.exportAuthorization') {
|
||||
$this->authorized_dc = $this->datacenter->curdc;
|
||||
if (($method === 'users.getUsers' && $args = ['id' => [['_' => 'inputUserSelf']]]) || $method === 'auth.exportAuthorization' || $method === 'updates.getDifference') {
|
||||
$this->settings['connection_settings']['default_dc'] = $this->authorized_dc = $this->datacenter->curdc;
|
||||
}
|
||||
$last_recv = $this->datacenter->sockets[$aargs['datacenter']]->last_recv;
|
||||
\danog\MadelineProto\Logger::log($e->getMessage(), \danog\MadelineProto\Logger::WARNING);
|
||||
|
Loading…
Reference in New Issue
Block a user