Fix message.text behaviour with no parse mode

This commit is contained in:
Lonami Exo 2019-05-20 12:00:52 +02:00
parent 383ab9b0b2
commit 465f38c1c6

View File

@ -268,7 +268,10 @@ 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:
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)