Let download_profile_photo work with min-User

This commit is contained in:
Lonami Exo 2022-10-03 13:06:27 +02:00
parent 04cf2953f6
commit 299b090cde

View File

@ -272,7 +272,9 @@ class DownloadMethods:
if isinstance(photo, (types.UserProfilePhoto, types.ChatPhoto)): if isinstance(photo, (types.UserProfilePhoto, types.ChatPhoto)):
dc_id = photo.dc_id dc_id = photo.dc_id
loc = types.InputPeerPhotoFileLocation( loc = types.InputPeerPhotoFileLocation(
peer=await self.get_input_entity(entity), # min users can be used to download profile photos
# self.get_input_entity would otherwise not accept those
peer=utils.get_input_peer(entity, check_hash=False),
photo_id=photo.photo_id, photo_id=photo.photo_id,
big=download_big big=download_big
) )