From e1c6e6ecc142da31a14608c9b0381ee69b2b804e Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Sun, 28 Jul 2019 10:13:38 +0200 Subject: [PATCH] Better handling of non-string message texts Now everything will be allowed and automatically casted to string. This means that send_message(id, True) would send "True", literally. --- pyrogram/client/parser/parser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyrogram/client/parser/parser.py b/pyrogram/client/parser/parser.py index edf9553d..371c4791 100644 --- a/pyrogram/client/parser/parser.py +++ b/pyrogram/client/parser/parser.py @@ -31,7 +31,7 @@ class Parser: self.markdown = Markdown(client) def parse(self, text: str, mode: Union[str, None] = object): - text = str(text or "").strip() + text = str(text).strip() if mode == object: if self.client: