Bugfix (closes #184)

This commit is contained in:
Daniil Gentili 2017-10-06 16:06:17 +03:00
parent ea494c3639
commit 6cf583ec97
2 changed files with 6 additions and 2 deletions

View File

@ -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;

View File

@ -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) {