mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-05 03:22:29 +00:00
Fix sending albums with bot file IDs
This commit is contained in:
@@ -662,7 +662,11 @@ def is_image(file):
|
||||
"""
|
||||
Returns ``True`` if the file extension looks like an image file to Telegram.
|
||||
"""
|
||||
return re.match(r'\.(png|jpe?g)', _get_extension(file), re.IGNORECASE)
|
||||
match = re.match(r'\.(png|jpe?g)', _get_extension(file), re.IGNORECASE)
|
||||
if match:
|
||||
return True
|
||||
else:
|
||||
return isinstance(resolve_bot_file_id(file), types.Photo)
|
||||
|
||||
|
||||
def is_gif(file):
|
||||
|
Reference in New Issue
Block a user