Fix MessageButton.click() with weird strings

The HTML entities were getting parsed according to client parse_mode, leading to empty messages and weird entities
This commit is contained in:
penn5 2019-11-01 10:44:45 +00:00 committed by GitHub
parent a1aaa96120
commit 28f5369e7e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -78,7 +78,7 @@ class MessageButton:
""" """
if isinstance(self.button, types.KeyboardButton): if isinstance(self.button, types.KeyboardButton):
return await self._client.send_message( return await self._client.send_message(
self._chat, self.button.text, reply_to=self._msg_id) self._chat, self.button.text, reply_to=self._msg_id, parse_mode=None)
elif isinstance(self.button, types.KeyboardButtonCallback): elif isinstance(self.button, types.KeyboardButtonCallback):
req = functions.messages.GetBotCallbackAnswerRequest( req = functions.messages.GetBotCallbackAnswerRequest(
peer=self._chat, msg_id=self._msg_id, data=self.button.data peer=self._chat, msg_id=self._msg_id, data=self.button.data