Rename photo_size to photo_type.

This commit is contained in:
luckydonald 2020-11-08 12:57:55 +01:00
parent ebf735a5aa
commit 5ae66d7d40

View File

@ -1157,13 +1157,13 @@ def resolve_bot_file_id(file_id):
# okey, so we're dealing with a photo. # okey, so we're dealing with a photo.
file: PhotoFileId file: PhotoFileId
photo_size = 's' if file.id or file.access_hash else 'x' photo_type = 's' if file.id or file.access_hash else 'x'
foto_size = file.photosize foto_size = file.photosize
if isinstance(foto_size, (PhotoFileId.PhotosizeSourceLegacy, PhotoFileId.PhotosizeSourceThumbnail, PhotoFileId.PhotosizeSourceDialogPhotoSmall, PhotoFileId.PhotosizeSourceDialogPhotoBig, PhotoFileId.PhotosizeSourceStickersetThumbnail)): if isinstance(foto_size, (PhotoFileId.PhotosizeSourceLegacy, PhotoFileId.PhotosizeSourceThumbnail, PhotoFileId.PhotosizeSourceDialogPhotoSmall, PhotoFileId.PhotosizeSourceDialogPhotoBig, PhotoFileId.PhotosizeSourceStickersetThumbnail)):
sizes = [ sizes = [
types.PhotoSize( types.PhotoSize(
type=photo_size, type=photo_type,
location=types.FileLocationToBeDeprecated( location=types.FileLocationToBeDeprecated(
volume_id=foto_size.volume_id, volume_id=foto_size.volume_id,
local_id=foto_size.location_local_id, local_id=foto_size.location_local_id,