Fix message.text not checking if parse_mode was set

This commit is contained in:
Lonami Exo 2019-05-20 11:56:50 +02:00
parent 7c1c040d50
commit 383ab9b0b2

View File

@ -268,7 +268,7 @@ class Message(ChatGetter, SenderGetter, TLObject, abc.ABC):
The message text, formatted using the client's default The message text, formatted using the client's default
parse mode. Will be ``None`` for :tl:`MessageService`. parse mode. Will be ``None`` for :tl:`MessageService`.
""" """
if self._text is None and self._client: if self._text is None and self._client and self._client.parse_mode:
self._text = self._client.parse_mode.unparse( self._text = self._client.parse_mode.unparse(
self.message, self.entities) self.message, self.entities)