mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-01 10:49:58 +03:00
Allow providing a FileId object directly.
This commit is contained in:
parent
78a9b7f4d5
commit
f98e5cb672
|
@ -1108,7 +1108,9 @@ def resolve_bot_file_id(file_id):
|
||||||
# end if
|
# end if
|
||||||
if isinstance(file_id, str):
|
if isinstance(file_id, str):
|
||||||
file = FileId.from_file_id(file_id)
|
file = FileId.from_file_id(file_id)
|
||||||
elif not isinstance(file_id, FileId):
|
elif isinstance(file_id, FileId):
|
||||||
|
file = file_id
|
||||||
|
else:
|
||||||
return None
|
return None
|
||||||
# end if
|
# end if
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user