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

Update
All checks were successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/tag/build Pipeline was successful
ci/woodpecker/tag/deploy Pipeline was successful

This commit is contained in:
Daniil Gentili 2022-08-28 18:56:23 +02:00
parent 875867733c
commit 9c8a69752a
Signed by: danog
GPG Key ID: 8C1BE3B34B230CA7
2 changed files with 10 additions and 5 deletions

2
docs

@ -1 +1 @@
Subproject commit 429939d77d530ece2dda8f701da9d0cf755b8fca
Subproject commit 62f9a6059f4d6174bab4170d3f2ebf67a42c4fa7

View File

@ -6164,12 +6164,14 @@ class InternalDoc extends APIFactory
* @param array|string $messageMedia File to download
* @param ?callable $cb Status callback (can also use FileCallback)
* @param ?int $size Size of file to download, required for bot API file IDs.
* @param ?string $mime MIME type of file to download, required for bot API file IDs.
* @param ?string $name Name of file to download, required for bot API file IDs.
*
* @return \Amp\Promise
*/
public function downloadToBrowser($messageMedia, ?callable $cb = null, ?int $size = null, array $extra = [])
public function downloadToBrowser($messageMedia, ?callable $cb = null, ?int $size = null, ?string $name = null, ?string $mime = null, array $extra = [])
{
return $this->__call(__FUNCTION__, [$messageMedia, $cb, $size, $extra]);
return $this->__call(__FUNCTION__, [$messageMedia, $cb, $size, $name, $mime, $extra]);
}
/**
* Download file to callable.
@ -6231,14 +6233,17 @@ class InternalDoc extends APIFactory
* @param array|string $messageMedia File to download
* @param ServerRequest $request Request
* @param callable $cb Status callback (can also use FileCallback)
* @param ?int $size Size of file to download, required for bot API file IDs.
* @param ?string $name Name of file to download, required for bot API file IDs.
* @param ?string $mime MIME type of file to download, required for bot API file IDs.
*
* @return \Amp\Promise Returned response
*
* @psalm-return \Amp\Promise<\Amp\Http\Server\Response>
*/
public function downloadToResponse($messageMedia, \Amp\Http\Server\Request $request, ?callable $cb = null, array $extra = [])
public function downloadToResponse($messageMedia, \Amp\Http\Server\Request $request, ?callable $cb = null, ?int $size = null, ?string $mime = null, ?string $name = null, array $extra = [])
{
return $this->__call(__FUNCTION__, [$messageMedia, $request, $cb, $extra]);
return $this->__call(__FUNCTION__, [$messageMedia, $request, $cb, $size, $mime, $name, $extra]);
}
/**
* Download file to stream.