Skip to content

Commit

Permalink
Fix one mistake in copy_message (DD)
Browse files Browse the repository at this point in the history
Regression was introduced in 14c8755
  • Loading branch information
SpEcHiDe authored Feb 15, 2025
1 parent 523d8ba commit bdda1f2
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions pyrogram/types/messages_and_media/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -4834,7 +4834,9 @@ async def copy(
send_as=send_as,
reply_markup=self.reply_markup if reply_markup is object else reply_markup
)

if caption is None:
caption = self.caption or ""
caption_entities = self.caption_entities
if self.photo:
file_id = self.photo.file_id
elif self.audio:
Expand Down Expand Up @@ -4979,10 +4981,6 @@ async def copy(
else:
raise ValueError("Unknown media type")

if caption is None:
caption = self.caption or ""
caption_entities = self.caption_entities

return await send_media(
file_id=file_id,
caption=caption,
Expand Down

0 comments on commit bdda1f2

Please sign in to comment.