1
0
mirror of https://github.com/danog/MadelineProto.git synced 2024-11-30 09:58:59 +01:00
This commit is contained in:
Daniil Gentili 2023-12-15 00:15:25 +01:00
parent b39f29ead5
commit 7194a59627
4 changed files with 11 additions and 9 deletions

View File

@ -51,7 +51,7 @@ final class API extends AbstractAPI
*
* @var string
*/
public const RELEASE = '8.0.0-beta174';
public const RELEASE = '8.0.0-beta175';
/**
* We're not logged in.
*

View File

@ -89,9 +89,9 @@ final class SeqLoop extends Loop
return self::PAUSE;
}
public function parse(SplQueue $updates): void
public function parse(SplQueue $queue): void
{
foreach ($updates as ['updates' => $updates, 'options' => $options]) {
foreach ($queue as ['updates' => $updates, 'options' => $options]) {
['seq_start' => $seq_start, 'seq_end' => $seq_end] = $options;
$result = $this->state->checkSeq($seq_start);
if ($result > 0) {
@ -99,8 +99,8 @@ final class SeqLoop extends Loop
$this->incomingUpdates = new SplQueue;
$this->incomingUpdates->setIteratorMode(SplQueue::IT_MODE_DELETE);
$this->API->updaters[UpdateLoop::GENERIC]->resumeAndWait();
foreach ($updates as $update) {
$this->incomingUpdates->enqueue($update);
foreach ($queue as $data) {
$this->incomingUpdates->enqueue($data);
}
return;
}

View File

@ -86,10 +86,6 @@ trait Reliable
foreach ($content['msg_ids'] as $key => $msg_id) {
$info = \ord($content['info'][$key]);
$status = 'Status for message id '.$msg_id.': ';
/*if ($info & 4) {
*$this->gotResponseForOutgoingMessageId($msg_id);
*}
*/
foreach (MTProto::MSGS_INFO_FLAGS as $flag => $description) {
if (($info & $flag) !== 0) {
$status .= $description;

View File

@ -158,6 +158,12 @@ trait Session
if ($count+$total) {
$this->API->logger("Garbage collected $count outgoing messages in DC {$this->datacenter}, $total left", Logger::VERBOSE);
}
$new_outgoing = [];
foreach ($this->new_outgoing as $key => $message) {
$new_outgoing[$key] = $message;
}
$this->new_outgoing = $new_outgoing;
}
/**
* Create MTProto session if needed.