mirror of
https://github.com/pyrogram/pyrogram
synced 2025-08-29 13:27:47 +00:00
Set Message.text instead of Message.caption in case of web_page previews
This commit is contained in:
parent
d875298937
commit
47e5b9a7cb
@ -602,10 +602,26 @@ class Message(Object, Update):
|
||||
date=message.date,
|
||||
chat=Chat._parse(client, message, users, chats),
|
||||
from_user=User._parse(client, users.get(message.from_id, None)),
|
||||
text=Str(message.message).init(entities) or None if media is None else None,
|
||||
caption=Str(message.message).init(entities) or None if media is not None else None,
|
||||
entities=entities or None if media is None else None,
|
||||
caption_entities=entities or None if media is not None else None,
|
||||
text=(
|
||||
Str(message.message).init(entities) or None
|
||||
if media is None or web_page is not None
|
||||
else None
|
||||
),
|
||||
caption=(
|
||||
Str(message.message).init(entities) or None
|
||||
if media is not None and web_page is None
|
||||
else None
|
||||
),
|
||||
entities=(
|
||||
entities or None
|
||||
if media is None or web_page is not None
|
||||
else None
|
||||
),
|
||||
caption_entities=(
|
||||
entities or None
|
||||
if media is not None and web_page is None
|
||||
else None
|
||||
),
|
||||
author_signature=message.post_author,
|
||||
forward_from=forward_from,
|
||||
forward_sender_name=forward_sender_name,
|
||||
|
Loading…
x
Reference in New Issue
Block a user