From ab1d65e6f0124c0308303bd3a1334a2ad3ebbea8 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Wed, 15 May 2019 20:45:16 +0300 Subject: [PATCH] Trim left spaces when parsing command. Fixes #322 --- mautrix_telegram/matrix.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mautrix_telegram/matrix.py b/mautrix_telegram/matrix.py index a57cd946..57b2a7ee 100644 --- a/mautrix_telegram/matrix.py +++ b/mautrix_telegram/matrix.py @@ -213,7 +213,7 @@ class MatrixHandler: prefix = self.config["bridge.command_prefix"] is_command = text.startswith(prefix) if is_command: - text = text[len(prefix) + 1:] + text = text[len(prefix) + 1:].lstrip() return is_command, text async def handle_message(self, room: MatrixRoomID, sender_id: MatrixUserID, message: Dict,