From 90a3cc4237a8e7ac7b817308c2966b76fb6828c7 Mon Sep 17 00:00:00 2001 From: jhou2 Date: Tue, 28 Nov 2023 11:49:52 +0800 Subject: [PATCH] Fix the bug that wrong cmd hit when the cmd text is duplicated in the parameters --- webex_bot/webex_bot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webex_bot/webex_bot.py b/webex_bot/webex_bot.py index 2fc94e6..ff5beff 100644 --- a/webex_bot/webex_bot.py +++ b/webex_bot/webex_bot.py @@ -222,7 +222,7 @@ def process_raw_command(self, raw_message, teams_message, user_email, activity, if not is_card_callback_command and c.command_keyword: log.debug(f"c.command_keyword: {c.command_keyword}") - if user_command.find(c.command_keyword) != -1: + if user_command.strip().split()[0].lower() == c.command_keyword.lower(): command = c # If a command was found, stop looking for others break