mirror of
https://github.com/danog/MadelineProto.git
synced 2024-11-26 23:14:38 +01:00
Add nghttp2 to docker image, fix issue with messages.sendMedia
This commit is contained in:
parent
ad5b968724
commit
6bf45181db
@ -51,7 +51,7 @@ final class API extends AbstractAPI
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public const RELEASE = '8.0.0-beta148';
|
||||
public const RELEASE = '8.0.0-beta149';
|
||||
/**
|
||||
* Secret chat was not found.
|
||||
*
|
||||
|
@ -290,7 +290,7 @@ trait FilesLogic
|
||||
'application/octet-stream'
|
||||
);
|
||||
}
|
||||
if ($upload) {
|
||||
if ($upload && !\is_array($media['file'])) {
|
||||
$media['file'] = $this->upload($media['file']);
|
||||
}
|
||||
}
|
||||
|
@ -15,7 +15,7 @@ RUN chmod +x /usr/local/bin/install-php-extensions && \
|
||||
install-php-extensions pcntl uv-beta ffi pq memprof intl gmp mbstring pdo_mysql xml dom iconv zip opcache igbinary && \
|
||||
rm /usr/local/bin/install-php-extensions
|
||||
|
||||
RUN apk add ffmpeg
|
||||
RUN apk add ffmpeg nghttp2
|
||||
|
||||
ADD ./tests/dockerfiles/php.ini /usr/local/etc/php/php.ini
|
||||
|
||||
|
@ -299,7 +299,7 @@ function sendMedia(API $MadelineProto, array $media, string $message, string $me
|
||||
$medias = [
|
||||
'base' => $media
|
||||
];
|
||||
/*if (isset($media['file']) && is_string($media['file'])) {
|
||||
if (isset($media['file']) && is_string($media['file'])) {
|
||||
$MadelineProto->sendDocument(
|
||||
peer: $peer,
|
||||
file: new ReadableBuffer(read($media['file'])),
|
||||
@ -323,7 +323,7 @@ function sendMedia(API $MadelineProto, array $media, string $message, string $me
|
||||
$media,
|
||||
['url' => new FileCallback($media['url'], fn ($v) => $MadelineProto->logger(...))]
|
||||
);
|
||||
}*/
|
||||
}
|
||||
foreach ($medias as $subtype => $m) {
|
||||
$MadelineProto->logger("Sending $type $subtype");
|
||||
$dl = $MadelineProto->extractMessage($MadelineProto->messages->sendMedia(['peer' => $peer, 'media' => $m, 'message' => '['.$message.'](mention:'.$mention.')', 'parse_mode' => 'markdown']));
|
||||
|
Loading…
Reference in New Issue
Block a user