From d5d84dd436906959b755f713552d8eb7a400d806 Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Fri, 2 Jun 2023 18:46:39 +0200 Subject: [PATCH] Support bot API file IDs in sendMultiMedia --- src/Connection.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Connection.php b/src/Connection.php index b9a5d622c..8f51bff1f 100644 --- a/src/Connection.php +++ b/src/Connection.php @@ -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']]);