mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2026-09-10 02:35:57 +00:00
Fix sending albums with bot file IDs
This commit is contained in:
+5
-1
@@ -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