mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-10 19:46:36 +03:00
Fix message.text behaviour with no parse mode
This commit is contained in:
parent
383ab9b0b2
commit
465f38c1c6
|
@ -268,9 +268,12 @@ class Message(ChatGetter, SenderGetter, TLObject, abc.ABC):
|
|||
The message text, formatted using the client's default
|
||||
parse mode. Will be ``None`` for :tl:`MessageService`.
|
||||
"""
|
||||
if self._text is None and self._client and self._client.parse_mode:
|
||||
self._text = self._client.parse_mode.unparse(
|
||||
self.message, self.entities)
|
||||
if self._text is None and self._client:
|
||||
if not self._client.parse_mode:
|
||||
self._text = self.message
|
||||
else:
|
||||
self._text = self._client.parse_mode.unparse(
|
||||
self.message, self.entities)
|
||||
|
||||
return self._text
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user