mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-07-26 07:49:51 +03:00
Merge 00adbdfc65
into 01af2fcca3
This commit is contained in:
commit
aa086569a7
|
@ -437,9 +437,9 @@ def get_input_media(
|
|||
if media.SUBCLASS_OF_ID == 0xfaf846f4: # crc32(b'InputMedia')
|
||||
return media
|
||||
elif media.SUBCLASS_OF_ID == 0x846363e0: # crc32(b'InputPhoto')
|
||||
return types.InputMediaPhoto(media, ttl_seconds=ttl)
|
||||
return types.InputMediaPhoto(media, ttl_seconds=ttl, spoiler=media.spoiler)
|
||||
elif media.SUBCLASS_OF_ID == 0xf33fdb68: # crc32(b'InputDocument')
|
||||
return types.InputMediaDocument(media, ttl_seconds=ttl)
|
||||
return types.InputMediaDocument(media, ttl_seconds=ttl, spoiler=media.spoiler)
|
||||
except AttributeError:
|
||||
_raise_cast_fail(media, 'InputMedia')
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user