Apply fixes from StyleCI
This commit is contained in:
parent
a8dc0027f1
commit
77923b231d
@ -81,7 +81,9 @@ while (true) {
|
|||||||
switch ($update['update']['_']) {
|
switch ($update['update']['_']) {
|
||||||
case 'updateNewEncryptedMessage':
|
case 'updateNewEncryptedMessage':
|
||||||
$i = 0;
|
$i = 0;
|
||||||
while (true) { $MadelineProto->messages->sendEncrypted(['peer' => $update['update']['message']['chat_id'], 'message' => ['_' => 'decryptedMessage', 'ttl' => 0, 'message' => $i++]]); }
|
while (true) {
|
||||||
|
$MadelineProto->messages->sendEncrypted(['peer' => $update['update']['message']['chat_id'], 'message' => ['_' => 'decryptedMessage', 'ttl' => 0, 'message' => $i++]]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
echo 'Wrote '.\danog\MadelineProto\Serialization::serialize('bot.madeline', $MadelineProto).' bytes'.PHP_EOL;
|
echo 'Wrote '.\danog\MadelineProto\Serialization::serialize('bot.madeline', $MadelineProto).' bytes'.PHP_EOL;
|
||||||
|
@ -57,7 +57,7 @@ trait MessageHandler
|
|||||||
$auth_key_id = substr($message['message']['bytes'], 0, 8);
|
$auth_key_id = substr($message['message']['bytes'], 0, 8);
|
||||||
$old = false;
|
$old = false;
|
||||||
if ($auth_key_id !== $this->secret_chats[$message['message']['chat_id']]['key']['fingerprint']) {
|
if ($auth_key_id !== $this->secret_chats[$message['message']['chat_id']]['key']['fingerprint']) {
|
||||||
//var_dump($auth_key_id, $this->secret_chats[$message['message']['chat_id']]['key']['fingerprint']);
|
//var_dump($auth_key_id, $this->secret_chats[$message['message']['chat_id']]['key']['fingerprint']);
|
||||||
if (isset($this->secret_chats[$message['message']['chat_id']]['old_key']['fingerprint'])) {
|
if (isset($this->secret_chats[$message['message']['chat_id']]['old_key']['fingerprint'])) {
|
||||||
if ($auth_key_id !== $this->secret_chats[$message['message']['chat_id']]['old_key']['fingerprint']) {
|
if ($auth_key_id !== $this->secret_chats[$message['message']['chat_id']]['old_key']['fingerprint']) {
|
||||||
throw new \danog\MadelineProto\SecurityException('Key fingerprint mismatch');
|
throw new \danog\MadelineProto\SecurityException('Key fingerprint mismatch');
|
||||||
|
Loading…
Reference in New Issue
Block a user