mirror of
https://github.com/danog/MadelineProto.git
synced 2024-11-27 09:14:39 +01:00
Change a few function names
This commit is contained in:
parent
1b84c2e683
commit
b9b9e6635d
@ -596,7 +596,7 @@ trait AuthKeyHandler
|
||||
continue;
|
||||
}
|
||||
$dcs[$id] = function () use ($id, $socket) {
|
||||
return $this->init_authorization_socket($id, $socket);
|
||||
return $this->init_authorization_socket_async($id, $socket);
|
||||
};
|
||||
}
|
||||
if ($dcs) yield array_shift($dcs)();
|
||||
@ -606,7 +606,7 @@ trait AuthKeyHandler
|
||||
yield $dcs;
|
||||
|
||||
foreach ($postpone as $id => $socket) {
|
||||
yield $this->init_authorization_socket($id, $socket);
|
||||
yield $this->init_authorization_socket_async($id, $socket);
|
||||
}
|
||||
//foreach ($dcs as $dc) { yield $dc; }
|
||||
|
||||
@ -623,7 +623,7 @@ trait AuthKeyHandler
|
||||
}
|
||||
}
|
||||
|
||||
public function init_authorization_socket($id, $socket)
|
||||
public function init_authorization_socket_async($id, $socket)
|
||||
{
|
||||
$this->init_auth_dcs[$id] = true;
|
||||
|
||||
|
@ -26,7 +26,7 @@ use Amp\Loop;
|
||||
*/
|
||||
trait ResponseHandler
|
||||
{
|
||||
public function send_msgs_state_info($req_msg_id, $msg_ids, $datacenter)
|
||||
public function send_msgs_state_info_async($req_msg_id, $msg_ids, $datacenter)
|
||||
{
|
||||
$this->logger->logger("Sending state info for ".count($msg_ids)." message IDs");
|
||||
$info = '';
|
||||
@ -168,7 +168,7 @@ trait ResponseHandler
|
||||
$only_updates = false;
|
||||
unset($this->datacenter->sockets[$datacenter]->new_incoming[$current_msg_id]);
|
||||
|
||||
$this->call($this->send_msgs_state_info($current_msg_id, $this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']['msg_ids'], $datacenter));
|
||||
$this->call($this->send_msgs_state_info_async($current_msg_id, $this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']['msg_ids'], $datacenter));
|
||||
unset($this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']);
|
||||
break;
|
||||
case 'msgs_all_info':
|
||||
@ -230,7 +230,7 @@ trait ResponseHandler
|
||||
$this->method_recall('', ['message_id' => $msg_id, 'datacenter' => $datacenter]);
|
||||
}
|
||||
} else {
|
||||
$this->call($this->send_msgs_state_info($current_msg_id, $this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']['msg_ids'], $datacenter));
|
||||
$this->call($this->send_msgs_state_info_async($current_msg_id, $this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']['msg_ids'], $datacenter));
|
||||
}
|
||||
break;
|
||||
case 'msg_resend_ans_req':
|
||||
@ -238,7 +238,7 @@ trait ResponseHandler
|
||||
$only_updates = false;
|
||||
unset($this->datacenter->sockets[$datacenter]->new_incoming[$current_msg_id]);
|
||||
|
||||
$this->call($this->send_msgs_state_info($current_msg_id, $this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']['msg_ids'], $datacenter));
|
||||
$this->call($this->send_msgs_state_info_async($current_msg_id, $this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']['msg_ids'], $datacenter));
|
||||
foreach ($this->datacenter->sockets[$datacenter]->incoming_messages[$current_msg_id]['content']['msg_ids'] as $msg_id) {
|
||||
if (isset($this->datacenter->sockets[$datacenter]->incoming_messages[$msg_id]['response']) && isset($this->datacenter->sockets[$datacenter]->outgoing_messages[$this->datacenter->sockets[$datacenter]->incoming_messages[$msg_id]['response']])) {
|
||||
$this->call($this->object_call_async($this->datacenter->sockets[$datacenter]->outgoing_messages[$this->datacenter->sockets[$datacenter]->incoming_messages[$msg_id]['response']]['_'], $this->datacenter->sockets[$datacenter]->outgoing_messages[$this->datacenter->sockets[$datacenter]->incoming_messages[$msg_id]['response']]['body'], ['datacenter' => $datacenter]));
|
||||
|
Loading…
Reference in New Issue
Block a user