1
0
mirror of https://github.com/danog/MadelineProto.git synced 2024-11-27 03:34:42 +01:00

Add cb, offset and end parameters to getStream

This commit is contained in:
Daniil Gentili 2023-08-21 18:48:54 +02:00
parent b11e2c827c
commit c339f86100
Signed by: danog
GPG Key ID: 8C1BE3B34B230CA7
2 changed files with 4 additions and 3 deletions

@ -1 +1 @@
Subproject commit af1848cae0e3b9d0c0c9a73e0b080f9d5714b14e
Subproject commit 613d1949feefd1c8018995901fad6a9916eb8703

View File

@ -112,9 +112,10 @@ abstract class Media extends IpcCapable implements JsonSerializable
/**
* Get a readable amp stream with the file contents.
*
* @param ?(callable(float, float, float): void) $cb Progress callback
*/
public function getStream(): ReadableStream
public function getStream(?callable $cb = null, int $offset = 0, int $end = -1): ReadableStream
{
return $this->getClient()->downloadToReturnedStream($this);
return $this->getClient()->downloadToReturnedStream($this, $cb, $offset, $end);
}
}