From 6cf583ec972ee66d123269d239f1e90af4ecc092 Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Fri, 6 Oct 2017 16:06:17 +0300 Subject: [PATCH] Bugfix (closes #184) --- src/danog/MadelineProto/Wrappers/DialogHandler.php | 6 +++++- tests/testing.php | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/danog/MadelineProto/Wrappers/DialogHandler.php b/src/danog/MadelineProto/Wrappers/DialogHandler.php index 6fbd687a..6cce8fa4 100644 --- a/src/danog/MadelineProto/Wrappers/DialogHandler.php +++ b/src/danog/MadelineProto/Wrappers/DialogHandler.php @@ -16,7 +16,11 @@ trait DialogHandler { public function get_dialogs($force = true) { - if (!isset($this->dialog_params['offset_date']) || $force || is_null($this->dialog_params['offset_date'])) { + if ($force || + !isset($this->dialog_params['offset_date']) || is_null($this->dialog_params['offset_date']) || + !isset($this->dialog_params['offset_id']) || is_null($this->dialog_params['offset_id']) || + !isset($this->dialog_params['offset_peer']) || is_null($this->dialog_params['offset_peer']) + ) { $this->dialog_params = ['limit' => 0, 'offset_date' => 0, 'offset_id' => 0, 'offset_peer' => ['_' => 'inputPeerEmpty'], 'count' => 0]; } $this->updates_state['sync_loading'] = true; diff --git a/tests/testing.php b/tests/testing.php index 1cc22829..113df7fb 100755 --- a/tests/testing.php +++ b/tests/testing.php @@ -51,7 +51,7 @@ if (getenv('TEST_SECRET_CHAT') == '') { echo 'Loading settings...'.PHP_EOL; $settings = json_decode(getenv('MTPROTO_SETTINGS'), true) ?: []; //$settings['connection_settings']['all']['proxy'] = '\SocksProxy'; -//$settings['connection_settings']['all']['proxy_extra'] = ['address' => '190.83.240.10', 'port' => 20057]; +//$settings['connection_settings']['all']['proxy_extra'] = ['address' => '209.195.74.200', 'port' => 43545]; var_dump($settings); if ($MadelineProto === false) {