Small fix
This commit is contained in:
parent
7b2798ddd9
commit
6cc990217f
@ -169,7 +169,10 @@ $users = [];
|
|||||||
$secret_media['voice'] = ['peer' => $secret, 'file' => $inputEncryptedFileAudio, '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/mosconi.mp3'), 'caption' => 'test', 'key' => $inputEncryptedFileAudio['key'], 'iv' => $inputEncryptedFileAudio['iv'], 'file_name' => 'mosconi.mp3', 'size' => filesize('tests/mosconi.mp3'), 'attributes' => [['_' => 'documentAttributeAudio', 'voice' => true, 'duration' => 1, 'title' => 'AH NON LO SO IO', 'performer' => 'IL DIO GERMANO MOSCONI']]]]];
|
$secret_media['voice'] = ['peer' => $secret, 'file' => $inputEncryptedFileAudio, '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/mosconi.mp3'), 'caption' => 'test', 'key' => $inputEncryptedFileAudio['key'], 'iv' => $inputEncryptedFileAudio['iv'], 'file_name' => 'mosconi.mp3', 'size' => filesize('tests/mosconi.mp3'), 'attributes' => [['_' => 'documentAttributeAudio', 'voice' => true, 'duration' => 1, 'title' => 'AH NON LO SO IO', 'performer' => 'IL DIO GERMANO MOSCONI']]]]];
|
||||||
|
|
||||||
foreach ($secret_media as $type => $smessage) {
|
foreach ($secret_media as $type => $smessage) {
|
||||||
|
try {
|
||||||
$type = $MadelineProto->messages->sendEncryptedFile($smessage);
|
$type = $MadelineProto->messages->sendEncryptedFile($smessage);
|
||||||
|
} catch (\danog\MadelineProto\RPCErrorException $e) {
|
||||||
|
} catch (\danog\MadelineProto\Exception $e) {}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'updateNewMessage':
|
case 'updateNewMessage':
|
||||||
|
@ -324,6 +324,10 @@ class MTProto
|
|||||||
$this->full_chats[$id] = ['full' => $full['full'], 'last_update' => $full['last_update']];
|
$this->full_chats[$id] = ['full' => $full['full'], 'last_update' => $full['last_update']];
|
||||||
}
|
}
|
||||||
foreach ($this->secret_chats as $key => &$chat) {
|
foreach ($this->secret_chats as $key => &$chat) {
|
||||||
|
if (!is_array($chat)) {
|
||||||
|
unset($this->secret_chats[$key]);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if ($chat['layer'] >= 73) {
|
if ($chat['layer'] >= 73) {
|
||||||
$chat['mtproto'] = 2;
|
$chat['mtproto'] = 2;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user