Bugfixes, disabled incoming seqno check for the moment
This commit is contained in:
parent
c235afb30f
commit
1b57f113aa
@ -279,8 +279,9 @@ trait ResponseHandler
|
||||
}
|
||||
$only_updates = ($only_updates || $first) && $last_was_updates;
|
||||
$first = false;
|
||||
//var_dump($this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']['_']);
|
||||
if (isset($this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['seq_no']) && ($seq_no = $this->generate_in_seq_no($datacenter, $this->content_related($this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']['_']))) !== $this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['seq_no']) {
|
||||
throw new \danog\MadelineProto\SecurityException('Seqno mismatch (should be '.$seq_no.', is '.$this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['seq_no']);
|
||||
//throw new \danog\MadelineProto\SecurityException('Seqno mismatch (should be '.$seq_no.', is '.$this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['seq_no']);
|
||||
}
|
||||
if ($unset) {
|
||||
unset($this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]);
|
||||
|
@ -39,7 +39,7 @@ trait SeqNoHandler
|
||||
$method,
|
||||
[
|
||||
'rpc_result',
|
||||
'rpc_error',
|
||||
// 'rpc_error',
|
||||
'rpc_drop_answer',
|
||||
'rpc_answer_unknown',
|
||||
'rpc_answer_dropped_running',
|
||||
|
@ -48,7 +48,7 @@ trait Login
|
||||
], ['datacenter' => $this->API->datacenter->curdc]
|
||||
);
|
||||
$this->API->authorized = true;
|
||||
$this->API->sync_authorization($this->API->datacenter->cur_dc);
|
||||
$this->API->sync_authorization($this->API->datacenter->curdc);
|
||||
$this->API->updates = [];
|
||||
$this->API->updates_key = 0;
|
||||
$this->API->get_updates_state();
|
||||
@ -128,7 +128,7 @@ trait Login
|
||||
}
|
||||
$this->API->authorization = $authorization;
|
||||
$this->API->authorized = true;
|
||||
$this->API->sync_authorization($this->API->datacenter->cur_dc);
|
||||
$this->API->sync_authorization($this->API->datacenter->curdc);
|
||||
$this->API->get_updates_state();
|
||||
$this->API->should_serialize = true;
|
||||
|
||||
@ -155,7 +155,7 @@ trait Login
|
||||
], ['datacenter' => $this->API->datacenter->curdc]
|
||||
);
|
||||
$this->API->authorized = true;
|
||||
$this->API->sync_authorization($this->API->datacenter->cur_dc);
|
||||
$this->API->sync_authorization($this->API->datacenter->curdc);
|
||||
$this->API->get_updates_state();
|
||||
$this->API->should_serialize = true;
|
||||
|
||||
@ -178,7 +178,7 @@ trait Login
|
||||
], ['datacenter' => $this->API->datacenter->curdc]
|
||||
);
|
||||
$this->API->authorized = true;
|
||||
$this->API->sync_authorization($this->API->datacenter->cur_dc);
|
||||
$this->API->sync_authorization($this->API->datacenter->curdc);
|
||||
$this->API->get_updates_state();
|
||||
$this->API->should_serialize = true;
|
||||
\danog\MadelineProto\Logger::log(['Logged in successfully!'], \danog\MadelineProto\Logger::NOTICE);
|
||||
|
Loading…
Reference in New Issue
Block a user