1
0
mirror of https://github.com/danog/MadelineProto.git synced 2025-01-22 15:51:15 +01:00

Support bot API file IDs in sendMultiMedia

This commit is contained in:
Daniil Gentili 2023-06-02 18:46:39 +02:00
parent 8740352963
commit d5d84dd436
Signed by: danog
GPG Key ID: 8C1BE3B34B230CA7

View File

@ -334,7 +334,8 @@ final class Connection
}
} elseif ($method === 'messages.sendMultiMedia') {
foreach ($arguments['multi_media'] as &$singleMedia) {
if ($singleMedia['media']['_'] === 'inputMediaUploadedPhoto'
if (is_string($singleMedia['media'])
|| $singleMedia['media']['_'] === 'inputMediaUploadedPhoto'
|| $singleMedia['media']['_'] === 'inputMediaUploadedDocument'
) {
$singleMedia['media'] = $this->methodCallAsyncRead('messages.uploadMedia', ['peer' => $arguments['peer'], 'media' => $singleMedia['media']]);