diff --git a/src/danog/MadelineProto/MTProtoTools/PeerHandler.php b/src/danog/MadelineProto/MTProtoTools/PeerHandler.php index 627d4f49..ce5bba52 100644 --- a/src/danog/MadelineProto/MTProtoTools/PeerHandler.php +++ b/src/danog/MadelineProto/MTProtoTools/PeerHandler.php @@ -316,7 +316,7 @@ trait PeerHandler $res['bot_info'] = $full['full']['bot_info']; } if (isset($full['full']['profile_photo']['sizes'])) { - $res['photo'] = $this->photosize_to_botapi(end($full['full']['profile_photo']['sizes']), $full['User']); + $res['photo'] = $this->photosize_to_botapi(end($full['full']['profile_photo']['sizes']), []); } $bio = ''; if ($full['type'] === 'user' && isset($res['username']) && !isset($res['about']) && $fullfetch) { @@ -338,7 +338,7 @@ trait PeerHandler } if (isset($full['full']['chat_photo']['sizes'])) { - $res['photo'] = $this->photosize_to_botapi(end($full['full']['chat_photo']['sizes']), $full['Chat']); + $res['photo'] = $this->photosize_to_botapi(end($full['full']['chat_photo']['sizes']), []); } if (isset($full['full']['exported_invite']['link'])) { $res['invite'] = $full['full']['exported_invite']['link']; @@ -361,7 +361,7 @@ trait PeerHandler } if (isset($full['full']['chat_photo']['sizes'])) { - $res['photo'] = $this->photosize_to_botapi(end($full['full']['chat_photo']['sizes']), $full['Chat']); + $res['photo'] = $this->photosize_to_botapi(end($full['full']['chat_photo']['sizes']), []); } if (isset($full['full']['exported_invite']['link'])) { $res['invite'] = $full['full']['exported_invite']['link']; diff --git a/src/danog/MadelineProto/TL/Files.php b/src/danog/MadelineProto/TL/Files.php index 66dd5ad4..7cddcd7d 100644 --- a/src/danog/MadelineProto/TL/Files.php +++ b/src/danog/MadelineProto/TL/Files.php @@ -105,7 +105,7 @@ trait Files public function photosize_to_botapi($photo, $message_media, $thumbnail = false) { $ext = $this->get_extension_from_location(['_' => 'inputFileLocation', 'volume_id' => $photo['location']['volume_id'], 'local_id' => $photo['location']['local_id'], 'secret' => $photo['location']['secret'], 'dc_id' => $photo['location']['dc_id']], '.jpg'); - $data = \danog\PHP\Struct::pack(' $this->base64url_encode($this->rle_encode($data)), diff --git a/src/danog/MadelineProto/TL/TL.php b/src/danog/MadelineProto/TL/TL.php index c62b6579..2437203a 100644 --- a/src/danog/MadelineProto/TL/TL.php +++ b/src/danog/MadelineProto/TL/TL.php @@ -460,7 +460,7 @@ trait TL $type_name = 'document'; $res = []; if ($data['document']['thumb']['_'] === 'photoSize') { - $res['thumb'] = $this->photosize_to_botapi($data['document']['thumb'], $data['document'], true); + $res['thumb'] = $this->photosize_to_botapi($data['document']['thumb'], [], true); } foreach ($data['document']['attributes'] as $attribute) { switch ($attribute['_']) {