mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-07-30 17:59:55 +03:00
Actually set the photo_type
from the given file_id
if we have that information.
This commit is contained in:
parent
5ae66d7d40
commit
bb9d1f895f
|
@ -1158,6 +1158,9 @@ def resolve_bot_file_id(file_id):
|
|||
file: PhotoFileId
|
||||
|
||||
photo_type = 's' if file.id or file.access_hash else 'x'
|
||||
if isinstance(file.photosize, PhotoFileId.PhotosizeSourceThumbnail) and file.photosize.thumbnail_type:
|
||||
photo_type = file.photosize.thumbnail_type.encode()
|
||||
# end if
|
||||
|
||||
foto_size = file.photosize
|
||||
if isinstance(foto_size, (PhotoFileId.PhotosizeSourceLegacy, PhotoFileId.PhotosizeSourceThumbnail, PhotoFileId.PhotosizeSourceDialogPhotoSmall, PhotoFileId.PhotosizeSourceDialogPhotoBig, PhotoFileId.PhotosizeSourceStickersetThumbnail)):
|
||||
|
|
Loading…
Reference in New Issue
Block a user