From 4b74d16438b62afc7dcb0af0aa91d8572f1a7273 Mon Sep 17 00:00:00 2001 From: Hasan Date: Sun, 19 May 2019 16:18:35 -0400 Subject: [PATCH] Fix file_id error checking (#1189) --- telethon/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/telethon/utils.py b/telethon/utils.py index 4afad7cf..b3075005 100644 --- a/telethon/utils.py +++ b/telethon/utils.py @@ -947,7 +947,7 @@ def resolve_bot_file_id(file_id): For thumbnails, the photo ID and hash will always be zero. """ 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 data = data[:-1]