Bugfixes
This commit is contained in:
parent
d0f459c5c4
commit
c021ae362d
@ -607,6 +607,8 @@ trait Files
|
||||
$res['InputFileLocation'] = ['_' => 'inputFileLocation', 'volume_id' => $photo['location']['volume_id'], 'local_id' => $photo['location']['local_id'], 'secret' => $photo['location']['secret'], 'dc_id' => $photo['location']['dc_id']];
|
||||
$res['ext'] = $this->get_extension_from_location($res['InputFileLocation'], '.jpg');
|
||||
$res['mime'] = 'image/jpeg';
|
||||
if (isset($photo['location']['size'])) $res['size'] = $photo['location']['size'];
|
||||
if (isset($photo['location']['bytes'])) $res['size'] = strlen($photo['location']['bytes']);
|
||||
|
||||
return $res;
|
||||
case 'photoSize':
|
||||
@ -615,6 +617,8 @@ trait Files
|
||||
$res['InputFileLocation'] = ['_' => 'inputFileLocation', 'volume_id' => $message_media['location']['volume_id'], 'local_id' => $message_media['location']['local_id'], 'secret' => $message_media['location']['secret'], 'dc_id' => $message_media['location']['dc_id']];
|
||||
$res['ext'] = $this->get_extension_from_location($res['InputFileLocation'], '.jpg');
|
||||
$res['mime'] = 'image/jpeg';
|
||||
if (isset($photo['location']['size'])) $res['size'] = $photo['location']['size'];
|
||||
if (isset($photo['location']['bytes'])) $res['size'] = strlen($photo['location']['bytes']);
|
||||
|
||||
return $res;
|
||||
case 'messageMediaDocument':
|
||||
@ -645,6 +649,8 @@ trait Files
|
||||
if (!isset($res['name'])) {
|
||||
$res['name'] = $message_media['document']['access_hash'];
|
||||
}
|
||||
|
||||
if (isset($message_media['document']['size'])) $res['size'] = $message_media['document']['size'];
|
||||
$res['name'] .= '_'.$message_media['document']['id'];
|
||||
$res['mime'] = $message_media['document']['mime_type'];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user