This commit is contained in:
Daniil Gentili 2018-05-25 16:47:53 +02:00
parent 4462f6f0c4
commit ed31f6b093
1 changed files with 5 additions and 5 deletions

View File

@ -375,13 +375,13 @@ $sentMessage = $MadelineProto->messages->sendMedia([
]);
$output_file_name = $MadelineProto->download_to_file(
$sentMessage,
new \danog\MadelineProto\FileCallback(
$sentMessage,
'/tmp/myname.mp4'
function ($progress) use ($MadelineProto, $peer) {
$MadelineProto->messages->sendMessage(['peer' => $peer, 'message' => 'Download progress: '.$progress.'%']);
}
),
'/tmp/myname.mp4'
);
```
@ -426,9 +426,9 @@ $sentMessage = $MadelineProto->messages->sendMedia([
]);
$output_file_name = $MadelineProto->download_to_file(
new MyCallback($sentMessage, $peer, $MadelineProto),
'/tmp/myname.mp4'
$sentMessage,
new MyCallback('/tmp/myname.mp4', $peer, $MadelineProto)
);
```
<a href="https://docs.madelineproto.xyz/docs/CHAT_INFO.html">Next section</a>
<a href="https://docs.madelineproto.xyz/docs/CHAT_INFO.html">Next section</a>