Apply fixes from StyleCI
This commit is contained in:
parent
a6e7c2dc6c
commit
c11c2fabf4
@ -63,6 +63,7 @@ trait AuthKeyHandler
|
||||
$this->get_updates_difference();
|
||||
|
||||
\danog\MadelineProto\Logger::log(['Secret chat '.$res['id'].' requested successfully!'], \danog\MadelineProto\Logger::NOTICE);
|
||||
|
||||
return $res['id'];
|
||||
}
|
||||
|
||||
@ -134,6 +135,7 @@ trait AuthKeyHandler
|
||||
}
|
||||
if ($my['exchange_id'] === $params['exchange_id']) {
|
||||
$this->secret_chats[$chat]['rekeying'] = [0];
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -207,6 +209,7 @@ trait AuthKeyHandler
|
||||
unset($this->temp_rekeyed_secret_chats[$params['exchange_id']]);
|
||||
$this->method_call('messages.sendEncryptedService', ['peer' => $chat, 'message' => ['_' => 'decryptedMessageService', 'action' => ['_' => 'decryptedMessageActionNoop']]], ['datacenter' => $this->datacenter->curdc]);
|
||||
\danog\MadelineProto\Logger::log(['Secret chat '.$chat.' rekeyed successfully!'], \danog\MadelineProto\Logger::VERBOSE);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -100,11 +100,9 @@ var_dump($MadelineProto->get_call($call));
|
||||
$inputEncryptedFile = $MadelineProto->upload_encrypted('tests/faust.jpg', 'fausticorn.jpg'); // This gets an inputFile object with file name magic
|
||||
$secret_media['document_photo'] = ['peer' => $secret, 'file' => $inputEncryptedFile, 'message' => ['_' => 'decryptedMessage', 'ttl' => 0, 'message' => '', 'media' => ['_' => 'decryptedMessageMediaDocument', 'thumb' => file_get_contents('tests/faust.preview.jpg'), 'thumb_w' => 90, 'thumb_h' => 90, 'mime_type' => mime_content_type('tests/faust.jpg'), 'caption' => 'This file was uploaded using MadelineProto', 'key' => $inputEncryptedFile['key'], 'iv' => $inputEncryptedFile['iv'], 'file_name' => 'faust.jpg', 'size' => filesize('tests/faust.jpg'), 'attributes' => [['_' => 'documentAttributeImageSize', 'w' => 1280, 'h' => 914]]]]];
|
||||
|
||||
|
||||
// Photo, secret chat
|
||||
$secret_media['photo'] = ['peer' => $secret, 'file' => $inputEncryptedFile, 'message' => ['_' => 'decryptedMessage', 'ttl' => 0, 'message' => '', 'media' => ['_' => 'decryptedMessageMediaPhoto', 'thumb' => file_get_contents('tests/faust.preview.jpg'), 'thumb_w' => 90, 'thumb_h' => 90, 'caption' => 'This file was uploaded using MadelineProto', 'key' => $inputEncryptedFile['key'], 'iv' => $inputEncryptedFile['iv'], 'size' => filesize('tests/faust.jpg'), 'w' => 1280, 'h' => 914]]];
|
||||
|
||||
|
||||
// GIF, secret chat
|
||||
$inputEncryptedFile = $MadelineProto->upload_encrypted('tests/pony.mp4');
|
||||
$secret_media['gif'] = ['peer' => $secret, 'file' => $inputEncryptedFile, 'message' => ['_' => 'decryptedMessage', 'ttl' => 0, 'message' => '', 'media' => ['_' => 'decryptedMessageMediaDocument', 'thumb' => file_get_contents('tests/pony.preview.jpg'), 'thumb_w' => 90, 'thumb_h' => 90, 'mime_type' => mime_content_type('tests/pony.mp4'), 'caption' => 'test', 'key' => $inputEncryptedFile['key'], 'iv' => $inputEncryptedFile['iv'], 'file_name' => 'pony.mp4', 'size' => filesize('tests/faust.jpg'), 'attributes' => [['_' => 'documentAttributeAnimated']]]]];
|
||||
|
Loading…
x
Reference in New Issue
Block a user