Allow providing a FileId object directly.

This commit is contained in:
luckydonald 2020-11-08 12:53:58 +01:00
parent 78a9b7f4d5
commit f98e5cb672

View File

@ -1108,7 +1108,9 @@ def resolve_bot_file_id(file_id):
# end if
if isinstance(file_id, str):
file = FileId.from_file_id(file_id)
elif not isinstance(file_id, FileId):
elif isinstance(file_id, FileId):
file = file_id
else:
return None
# end if