Skip to content

Commit bdda1f2

Browse files
authored
Fix one mistake in copy_message (DD)
Regression was introduced in 14c8755
1 parent 523d8ba commit bdda1f2

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

pyrogram/types/messages_and_media/message.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4834,7 +4834,9 @@ async def copy(
48344834
send_as=send_as,
48354835
reply_markup=self.reply_markup if reply_markup is object else reply_markup
48364836
)
4837-
4837+
if caption is None:
4838+
caption = self.caption or ""
4839+
caption_entities = self.caption_entities
48384840
if self.photo:
48394841
file_id = self.photo.file_id
48404842
elif self.audio:
@@ -4979,10 +4981,6 @@ async def copy(
49794981
else:
49804982
raise ValueError("Unknown media type")
49814983

4982-
if caption is None:
4983-
caption = self.caption or ""
4984-
caption_entities = self.caption_entities
4985-
49864984
return await send_media(
49874985
file_id=file_id,
49884986
caption=caption,

0 commit comments

Comments
 (0)