mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-07-07 13:54:15 +03:00
Fix file_id error checking (#1189)
This commit is contained in:
parent
da5c801b4d
commit
4b74d16438
|
@ -947,7 +947,7 @@ def resolve_bot_file_id(file_id):
|
||||||
For thumbnails, the photo ID and hash will always be zero.
|
For thumbnails, the photo ID and hash will always be zero.
|
||||||
"""
|
"""
|
||||||
data = _rle_decode(_decode_telegram_base64(file_id))
|
data = _rle_decode(_decode_telegram_base64(file_id))
|
||||||
if not data or data[-1] == b'\x02':
|
if not data or data[-1] != 2:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
data = data[:-1]
|
data = data[:-1]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user