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

Fix CDN downloads

This commit is contained in:
Daniil Gentili 2023-07-23 00:21:26 +02:00
parent bd97e3075e
commit ce208f9ae1

View File

@ -1089,6 +1089,7 @@ trait Files
while ($cdn === false && $res['type']['_'] === 'storage.fileUnknown' && $res['bytes'] === '' && $this->datacenter->has(++$datacenter)) { while ($cdn === false && $res['type']['_'] === 'storage.fileUnknown' && $res['bytes'] === '' && $this->datacenter->has(++$datacenter)) {
$res = $this->methodCallAsyncRead('upload.getFile', $basic_param + $offset, ['heavy' => true, 'file' => true, 'FloodWaitLimit' => 0, 'datacenter' => $datacenter]); $res = $this->methodCallAsyncRead('upload.getFile', $basic_param + $offset, ['heavy' => true, 'file' => true, 'FloodWaitLimit' => 0, 'datacenter' => $datacenter]);
} }
$res['bytes'] = (string) $res['bytes'];
if ($res['bytes'] === '') { if ($res['bytes'] === '') {
return 0; return 0;
} }