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

Apply fixes from StyleCI

This commit is contained in:
Daniil Gentili 2017-02-17 21:36:32 +00:00 committed by StyleCI Bot
parent 3ceb34c3b0
commit b60ca2c7ee

View File

@ -419,7 +419,9 @@ trait Extension
{
$this->switch_dc($location['dc_id']);
$res = $this->method_call('upload.getFile', ['location' => $location, 'offset' => 0, 'limit' => 1], ['heavy' => true]);
if (!isset($res['type']['_'])) return $default;
if (!isset($res['type']['_'])) {
return $default;
}
switch ($res['type']['_']) {
case 'storage.fileJpeg': return '.jpg';
case 'storage.fileGif': return '.gif';