Fix for PERSISTENT_TIMESTAMP_INVALID
This commit is contained in:
parent
e02847762a
commit
cc679b3a46
@ -18,6 +18,7 @@ namespace danog\MadelineProto\MTProtoTools;
|
|||||||
trait UpdateHandler
|
trait UpdateHandler
|
||||||
{
|
{
|
||||||
public $updates_state = ['pending_seq_updates' => [], 'pending_pts_updates' => [], 'sync_loading' => true, 'seq' => 0, 'pts' => 0, 'date' => 0, 'qts' => 0];
|
public $updates_state = ['pending_seq_updates' => [], 'pending_pts_updates' => [], 'sync_loading' => true, 'seq' => 0, 'pts' => 0, 'date' => 0, 'qts' => 0];
|
||||||
|
public $got_state = false;
|
||||||
public $channels_state = [];
|
public $channels_state = [];
|
||||||
public $updates = [];
|
public $updates = [];
|
||||||
public $updates_key = 0;
|
public $updates_key = 0;
|
||||||
@ -206,7 +207,10 @@ trait UpdateHandler
|
|||||||
$this->should_serialize = true;
|
$this->should_serialize = true;
|
||||||
$this->updates_state['qts'] = 0;
|
$this->updates_state['qts'] = 0;
|
||||||
}
|
}
|
||||||
|
if (!$this->got_state) {
|
||||||
|
$this->got_state = $this->should_serialize = true;
|
||||||
|
$this->get_updates_state();
|
||||||
|
}
|
||||||
return $this->updates_state;
|
return $this->updates_state;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -51,7 +51,6 @@ trait Login
|
|||||||
$this->API->sync_authorization($this->API->datacenter->curdc);
|
$this->API->sync_authorization($this->API->datacenter->curdc);
|
||||||
$this->API->updates = [];
|
$this->API->updates = [];
|
||||||
$this->API->updates_key = 0;
|
$this->API->updates_key = 0;
|
||||||
$this->API->get_updates_state();
|
|
||||||
$this->API->should_serialize = true;
|
$this->API->should_serialize = true;
|
||||||
if (!isset($this->API->settings['pwr']['pwr']) || !$this->API->settings['pwr']['pwr']) {
|
if (!isset($this->API->settings['pwr']['pwr']) || !$this->API->settings['pwr']['pwr']) {
|
||||||
try {
|
try {
|
||||||
@ -129,7 +128,6 @@ trait Login
|
|||||||
$this->API->authorization = $authorization;
|
$this->API->authorization = $authorization;
|
||||||
$this->API->authorized = true;
|
$this->API->authorized = true;
|
||||||
$this->API->sync_authorization($this->API->datacenter->curdc);
|
$this->API->sync_authorization($this->API->datacenter->curdc);
|
||||||
$this->API->get_updates_state();
|
|
||||||
$this->API->should_serialize = true;
|
$this->API->should_serialize = true;
|
||||||
|
|
||||||
\danog\MadelineProto\Logger::log(['Logged in successfully!'], \danog\MadelineProto\Logger::NOTICE);
|
\danog\MadelineProto\Logger::log(['Logged in successfully!'], \danog\MadelineProto\Logger::NOTICE);
|
||||||
@ -156,7 +154,6 @@ trait Login
|
|||||||
);
|
);
|
||||||
$this->API->authorized = true;
|
$this->API->authorized = true;
|
||||||
$this->API->sync_authorization($this->API->datacenter->curdc);
|
$this->API->sync_authorization($this->API->datacenter->curdc);
|
||||||
$this->API->get_updates_state();
|
|
||||||
$this->API->should_serialize = true;
|
$this->API->should_serialize = true;
|
||||||
|
|
||||||
\danog\MadelineProto\Logger::log(['Signed up in successfully!'], \danog\MadelineProto\Logger::NOTICE);
|
\danog\MadelineProto\Logger::log(['Signed up in successfully!'], \danog\MadelineProto\Logger::NOTICE);
|
||||||
@ -179,7 +176,6 @@ trait Login
|
|||||||
);
|
);
|
||||||
$this->API->authorized = true;
|
$this->API->authorized = true;
|
||||||
$this->API->sync_authorization($this->API->datacenter->curdc);
|
$this->API->sync_authorization($this->API->datacenter->curdc);
|
||||||
$this->API->get_updates_state();
|
|
||||||
$this->API->should_serialize = true;
|
$this->API->should_serialize = true;
|
||||||
\danog\MadelineProto\Logger::log(['Logged in successfully!'], \danog\MadelineProto\Logger::NOTICE);
|
\danog\MadelineProto\Logger::log(['Logged in successfully!'], \danog\MadelineProto\Logger::NOTICE);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user