1
0
mirror of https://github.com/danog/MadelineProto.git synced 2024-11-30 08:18:59 +01:00

Apply fixes from StyleCI

This commit is contained in:
Daniil Gentili 2018-03-01 12:22:32 +00:00 committed by StyleCI Bot
parent 6acacdaa00
commit 5741acc9a3
2 changed files with 7 additions and 3 deletions

View File

@ -96,8 +96,12 @@ trait CallHandler
if ($this->datacenter->sockets[$aargs['datacenter']]->temp_auth_key !== null) { if ($this->datacenter->sockets[$aargs['datacenter']]->temp_auth_key !== null) {
if (isset($message_id)) { if (isset($message_id)) {
\danog\MadelineProto\Logger::log(['Clearing old method call'], \danog\MadelineProto\Logger::ULTRA_VERBOSE); \danog\MadelineProto\Logger::log(['Clearing old method call'], \danog\MadelineProto\Logger::ULTRA_VERBOSE);
if (isset($this->datacenter->sockets[$aargs['datacenter']]->outgoing_messages[$message_id])) unset($this->datacenter->sockets[$aargs['datacenter']]->outgoing_messages[$message_id]); if (isset($this->datacenter->sockets[$aargs['datacenter']]->outgoing_messages[$message_id])) {
if (isset($this->datacenter->sockets[$aargs['datacenter']]->new_outgoing[$message_id])) unset($this->datacenter->sockets[$aargs['datacenter']]->new_outgoing[$message_id]); unset($this->datacenter->sockets[$aargs['datacenter']]->outgoing_messages[$message_id]);
}
if (isset($this->datacenter->sockets[$aargs['datacenter']]->new_outgoing[$message_id])) {
unset($this->datacenter->sockets[$aargs['datacenter']]->new_outgoing[$message_id]);
}
} }
$this->datacenter->sockets[$aargs['datacenter']]->object_queue[] = ['_' => $method, 'body' => $serialized, 'content_related' => $content_related, 'msg_id' => $message_id = isset($aargs['message_id']) ? $aargs['message_id'] : $this->generate_message_id($aargs['datacenter'])]; $this->datacenter->sockets[$aargs['datacenter']]->object_queue[] = ['_' => $method, 'body' => $serialized, 'content_related' => $content_related, 'msg_id' => $message_id = isset($aargs['message_id']) ? $aargs['message_id'] : $this->generate_message_id($aargs['datacenter'])];

View File

@ -32,7 +32,7 @@ trait MessageHandler
if (count($this->datacenter->sockets[$datacenter]->object_queue) > 1) { if (count($this->datacenter->sockets[$datacenter]->object_queue) > 1) {
$messages = []; $messages = [];
\danog\MadelineProto\Logger::log(["Sending msg_container as encrypted message"], \danog\MadelineProto\Logger::ULTRA_VERBOSE); \danog\MadelineProto\Logger::log(['Sending msg_container as encrypted message'], \danog\MadelineProto\Logger::ULTRA_VERBOSE);
foreach ($this->datacenter->sockets[$datacenter]->object_queue as $message) { foreach ($this->datacenter->sockets[$datacenter]->object_queue as $message) {
$message['seqno'] = $this->generate_out_seq_no($datacenter, $message['content_related']); $message['seqno'] = $this->generate_out_seq_no($datacenter, $message['content_related']);