1
0
mirror of https://github.com/danog/MadelineProto.git synced 2024-11-30 10:19:00 +01:00
This commit is contained in:
Daniil Gentili 2017-05-22 14:02:57 +01:00
parent 2680b68751
commit 4cc983b234
2 changed files with 5 additions and 2 deletions

View File

@ -38,7 +38,7 @@ trait UpdateHandler
}
}
if (isset($this->settings['pwr']['update_handler'])) {
$this->settings['pwr']['update_handler'] === 'get_updates_update_handler' ? $this->get_updates_update_handler($update) : $this->settings['pwr']['update_handler']($update);
in_array($this->settings['pwr']['update_handler'], [['danog\MadelineProto\API', 'get_updates_update_handler'], 'get_updates_update_handler']) ? $this->get_updates_update_handler($update) : $this->settings['pwr']['update_handler']($update);
}
}

View File

@ -14,8 +14,11 @@ namespace danog\MadelineProto\Wrappers;
trait DialogHandler
{
public function get_dialogs()
public function get_dialogs($force = false)
{
if (!isset($this->dialog_params['offset_date']) || $force) {
$this->dialog_params = ['limit' => 0, 'offset_date' => 0, 'offset_id' => 0, 'offset_peer' => ['_' => 'inputPeerEmpty']];
}
$this->getting_state = true;
$res = ['dialogs' => [0]];
$datacenter = $this->datacenter->curdc;