79833687

Date: 2025-11-30 05:09:37
Score: 1
Natty:
Report link

The issue is not with your logic — it is because Pyrogram does not automatically preserve caption entities when you manually rebuild a media group.

When you extract messages from chat history using:

await client.get_chat_history(...)

Pyrogram gives you:

message.caption

message.caption_entities

BUT entities are NOT applied automatically when you create new InputMediaPhoto / InputMediaVideo.

InputMediaPhoto and InputMediaVideo require you to explicitly pass the entities if you want them preserved.

You are only sending:

caption=m.caption

So the entities are lost.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Mohammed Sufyan