From e3adec5ea9fe554bffd2d63bd759c68a0bd19e4d Mon Sep 17 00:00:00 2001 From: Lonami Exo Date: Wed, 7 Mar 2018 09:09:05 +0100 Subject: [PATCH] Fix caption being None This would later be an empty string with some modifications that were removed upon upgrading to layer 75, which changed where the captions are used and their naming. --- telethon/telegram_client.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/telethon/telegram_client.py b/telethon/telegram_client.py index f514e7c8..dbe026c6 100644 --- a/telethon/telegram_client.py +++ b/telethon/telegram_client.py @@ -1200,7 +1200,7 @@ class TelegramClient(TelegramBareClient): # region Uploading files - def send_file(self, entity, file, caption=None, + def send_file(self, entity, file, caption='', force_document=False, progress_callback=None, reply_to=None, attributes=None, @@ -1420,7 +1420,7 @@ class TelegramClient(TelegramBareClient): kwargs['is_voice_note'] = True return self.send_file(*args, **kwargs) - def _send_album(self, entity, files, caption=None, + def _send_album(self, entity, files, caption='', progress_callback=None, reply_to=None, parse_mode='md'): """Specialized version of .send_file for albums"""