From d2023c39aeab9e77aff5abcb7ba12ca9df868977 Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Mon, 7 Dec 2020 17:22:10 +0100 Subject: [PATCH] Fix copied messages reporting "None" in case of empty captions --- pyrogram/types/messages_and_media/message.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyrogram/types/messages_and_media/message.py b/pyrogram/types/messages_and_media/message.py index e15ef7d3..518604a2 100644 --- a/pyrogram/types/messages_and_media/message.py +++ b/pyrogram/types/messages_and_media/message.py @@ -2920,7 +2920,7 @@ class Message(Object, Update): return await send_media(file_id=file_id) else: if caption is None: - caption = self.caption + caption = self.caption or "" caption_entities = self.caption_entities return await send_media(