1
0
mirror of https://github.com/danog/MadelineProto.git synced 2024-11-30 10:19:00 +01:00

Merge pull request #900 from danog/photo_size_progressive

Add photoSizeProgressive support
This commit is contained in:
Alexander Pankratov 2021-02-14 03:44:00 +03:00 committed by GitHub
commit 9094c19687
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -697,6 +697,13 @@ trait Files
$res['size'] = $messageMedia['size'];
}
return $res;
case 'photoSizeProgressive':
$res = (yield from $this->getDownloadInfo($messageMedia['location']));
$res['thumb_size'] = $messageMedia['type'];
if (isset($messageMedia['sizes'])) {
$res['size'] = end($messageMedia['sizes']);
}
return $res;
case 'fileLocationUnavailable':
throw new \danog\MadelineProto\Exception('File location unavailable');
case 'fileLocation':