mirror of
https://github.com/danog/MadelineProto.git
synced 2025-01-10 17:28:18 +01:00
Cleanup
This commit is contained in:
parent
cfa546d7f7
commit
d79fca4bed
@ -136,6 +136,7 @@ final class MTProtoIncomingMessage extends MTProtoMessage
|
||||
*/
|
||||
public function ack(): void
|
||||
{
|
||||
unset($this->connection->incoming_messages[$this->msgId]);
|
||||
$this->state |= self::STATE_ACKED;
|
||||
if ($this->contentRelated) {
|
||||
// I let the server know that I received its message
|
||||
|
@ -148,7 +148,7 @@ trait ResponseHandler
|
||||
$tmp->setIteratorMode(SplQueue::IT_MODE_DELETE);
|
||||
foreach ($message->read()['messages'] as $msg) {
|
||||
$this->msgIdHandler->checkIncomingMessageId($msg['msg_id'], true);
|
||||
$newMessage = new MTProtoIncomingMessage($this->connection, $msg['body'], $msg['msg_id'], $message->unencrypted, true);
|
||||
$newMessage = new MTProtoIncomingMessage($this, $msg['body'], $msg['msg_id'], $message->unencrypted, true);
|
||||
$newMessage->setSeqNo($msg['seqno']);
|
||||
$this->checkInSeqNo($newMessage);
|
||||
$newMessage->setSeqNo(null);
|
||||
@ -167,7 +167,7 @@ trait ResponseHandler
|
||||
$this->incoming_messages[$referencedMsgId]->ack();
|
||||
} else {
|
||||
$this->msgIdHandler->checkIncomingMessageId($referencedMsgId, true);
|
||||
$message = new MTProtoIncomingMessage($this->connection, $content['orig_message'], $referencedMsgId, $message->unencrypted);
|
||||
$message = new MTProtoIncomingMessage($this, $content['orig_message'], $referencedMsgId, $message->unencrypted);
|
||||
$this->incomingCtr?->inc();
|
||||
$this->incoming_messages[$referencedMsgId] = $message;
|
||||
$this->handleMessages([$message]);
|
||||
|
Loading…
Reference in New Issue
Block a user