Applied fixes from StyleCI
This commit is contained in:
parent
66e73e20a2
commit
10d7b3b40b
@ -22,7 +22,7 @@ class CallHandler extends AuthKeyHandler
|
||||
$response = null;
|
||||
$count = 0;
|
||||
while ($response == null && $count++ < $this->settings['max_tries']['response']) {
|
||||
$this->log->log("Getting response....");
|
||||
$this->log->log('Getting response....');
|
||||
$deserialized = $this->recv_message();
|
||||
end($this->incoming_messages);
|
||||
$tempres = $this->handle_message($deserialized, $last_sent, key($this->incoming_messages));
|
||||
|
@ -106,6 +106,7 @@ class MessageHandler extends Crypt
|
||||
}
|
||||
$deserialized = $this->tl->deserialize(\danog\MadelineProto\Tools::fopen_and_write('php://memory', 'rw+b', $message_data));
|
||||
$this->incoming_messages[$message_id]['content'] = $deserialized;
|
||||
|
||||
return $deserialized;
|
||||
}
|
||||
}
|
||||
|
@ -84,8 +84,9 @@ class ResponseHandler extends MsgIdHandler
|
||||
return end($responses);
|
||||
break;
|
||||
default:
|
||||
$this->log->log("Received multiple responses, returning last one");
|
||||
$this->log->log('Received multiple responses, returning last one');
|
||||
$this->log->log($responses);
|
||||
|
||||
return end($responses);
|
||||
break;
|
||||
}
|
||||
@ -96,6 +97,7 @@ class ResponseHandler extends MsgIdHandler
|
||||
$this->ack_incoming_message_id($response['orig_message']['msg_id']); // Acknowledge that I received the server's response
|
||||
} else {
|
||||
$this->check_message_id($message['orig_message']['msg_id'], false);
|
||||
|
||||
return $this->handle_message($response['orig_message']);
|
||||
}
|
||||
break;
|
||||
|
@ -20,12 +20,14 @@ class SaltHandler extends ResponseHandler
|
||||
public function add_salts($salts)
|
||||
{
|
||||
foreach ($salts as $salt) {
|
||||
$this->addsalt($salt["valid_since"], $salt["valid_until"], $salt["salt"]);
|
||||
$this->addsalt($salt['valid_since'], $salt['valid_until'], $salt['salt']);
|
||||
}
|
||||
}
|
||||
public function addsalt($valid_since, $valid_until, $salt) {
|
||||
if (!isset($this->settings["authorization"]["temp_auth_key"]["salts"][$salt])) {
|
||||
$settings["authorization"]["temp_auth_key"]["salts"][$salt] = [ "valid_since" => $valid_since, "valid_until" => $valid_until ];
|
||||
|
||||
public function addsalt($valid_since, $valid_until, $salt)
|
||||
{
|
||||
if (!isset($this->settings['authorization']['temp_auth_key']['salts'][$salt])) {
|
||||
$settings['authorization']['temp_auth_key']['salts'][$salt] = ['valid_since' => $valid_since, 'valid_until' => $valid_until];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user