We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 523d8ba commit bdda1f2Copy full SHA for bdda1f2
pyrogram/types/messages_and_media/message.py
@@ -4834,7 +4834,9 @@ async def copy(
4834
send_as=send_as,
4835
reply_markup=self.reply_markup if reply_markup is object else reply_markup
4836
)
4837
-
+ if caption is None:
4838
+ caption = self.caption or ""
4839
+ caption_entities = self.caption_entities
4840
if self.photo:
4841
file_id = self.photo.file_id
4842
elif self.audio:
@@ -4979,10 +4981,6 @@ async def copy(
4979
4981
else:
4980
4982
raise ValueError("Unknown media type")
4983
- if caption is None:
- caption = self.caption or ""
4984
- caption_entities = self.caption_entities
4985
4986
return await send_media(
4987
file_id=file_id,
4988
caption=caption,
0 commit comments