Trim left spaces when parsing command. Fixes #322
This commit is contained in:
@@ -213,7 +213,7 @@ class MatrixHandler:
|
|||||||
prefix = self.config["bridge.command_prefix"]
|
prefix = self.config["bridge.command_prefix"]
|
||||||
is_command = text.startswith(prefix)
|
is_command = text.startswith(prefix)
|
||||||
if is_command:
|
if is_command:
|
||||||
text = text[len(prefix) + 1:]
|
text = text[len(prefix) + 1:].lstrip()
|
||||||
return is_command, text
|
return is_command, text
|
||||||
|
|
||||||
async def handle_message(self, room: MatrixRoomID, sender_id: MatrixUserID, message: Dict,
|
async def handle_message(self, room: MatrixRoomID, sender_id: MatrixUserID, message: Dict,
|
||||||
|
|||||||
Reference in New Issue
Block a user