TL schema path bugfix

This commit is contained in:
Daniil Gentili 2018-07-12 21:03:30 +02:00
parent 28436dedc1
commit e6157986b8
2 changed files with 8 additions and 2 deletions

2
docs

@ -1 +1 @@
Subproject commit 3bda743116ca82782fd4f47ac4a5fd96970b231a Subproject commit 1c204d1dbdaea25559ac9a89d51c8850e005b772

View File

@ -212,6 +212,13 @@ class MTProto
} }
//$this->wrapper = $backtrace[2]['object']; //$this->wrapper = $backtrace[2]['object'];
} }
if (isset($this->settings['tl_schema']['src']['botAPI']) && $this->settings['tl_schema']['src']['botAPI'] !== __DIR__.'/TL_botAPI.tl') {
$settings = $this->settings;
unset($settings['tl_schema']);
$this->__construct($settings);
}
if (!isset($this->v) || $this->v !== self::V) { if (!isset($this->v) || $this->v !== self::V) {
$this->logger->logger(\danog\MadelineProto\Lang::$current_lang['serialization_ofd'], Logger::WARNING); $this->logger->logger(\danog\MadelineProto\Lang::$current_lang['serialization_ofd'], Logger::WARNING);
foreach ($this->datacenter->sockets as $dc_id => $socket) { foreach ($this->datacenter->sockets as $dc_id => $socket) {
@ -219,7 +226,6 @@ class MTProto
$socket->authorized = true; $socket->authorized = true;
} }
} }
//$this->authorized === self::LOGGED_IN; }
$settings = $this->settings; $settings = $this->settings;
if (isset($settings['updates']['callback'][0]) && $settings['updates']['callback'][0] === $this) { if (isset($settings['updates']['callback'][0]) && $settings['updates']['callback'][0] === $this) {
$settings['updates']['callback'] = 'get_updates_update_handler'; $settings['updates']['callback'] = 'get_updates_update_handler';