From 72e877333890f6d0a3a9dabbd40e2b561ed4c659 Mon Sep 17 00:00:00 2001 From: Tiago Date: Thu, 19 Jan 2017 15:16:39 +0000 Subject: [PATCH] Fixed download_document() --- telethon/telegram_client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/telethon/telegram_client.py b/telethon/telegram_client.py index 101e8fa7..20a02089 100644 --- a/telethon/telegram_client.py +++ b/telethon/telegram_client.py @@ -598,7 +598,7 @@ class TelegramClient: print('Could not determine a filename for the document') if add_extension: - file_path += get_extension(document.mime_type) + file_path += get_extension(message_media_document) self.download_file_loc( InputDocumentFileLocation(