Pyrofork: Move Web Page Preview caption to Message.text

Signed-off-by: wulan17 <wulan17@nusantararom.org>
This commit is contained in:
wulan17 2023-11-10 20:46:31 +07:00
parent 542bd41608
commit 1292805045
No known key found for this signature in database
GPG key ID: 318CD6CD3A6AC0A5

View file

@ -922,22 +922,22 @@ class Message(Object, Update):
sender_chat=sender_chat,
text=(
Str(message.message).init(entities) or None
if media is None
if media is None or web_page_preview is not None
else None
),
caption=(
Str(message.message).init(entities) or None
if media is not None
if media is not None and web_page_preview is None
else None
),
entities=(
entities or None
if media is None
if media is None or web_page_preview is not None
else None
),
caption_entities=(
entities or None
if media is not None
if media is not None and web_page_preview is None
else None
),
author_signature=message.post_author,