fbradyirl / webex_bot

Python package for a Webex Bot based on websockets.
MIT License
68 stars 44 forks source link

Fix the bug that wrong cmd hit when the cmd text is duplicated in the… #45

Open elsid139 opened 9 months ago

elsid139 commented 9 months ago

Bug Description: I added 2 commands, command_keyword='build' and command_keyword='signature'. Both have is_card_callback_command = False. As a user typed in such command string: "build start name=release_1.2.0_qa_build_no_signature_check", within which "signature" is just dup to that "signature" command. He had meant to use "build", but "signature" rather than "build" was hit.

mochipon commented 5 months ago

I am experiencing the exact same problem.

For backward compatibility, I think it would be a good idea to allow the user to choose for each command whether the command_keyword must be at the beginning or whether it can appear anywhere in the text.

fbradyirl commented 4 months ago

For backward compatibility, I think it would be a good idea to allow the user to choose for each command whether the command_keyword must be at the beginning or whether it can appear anywhere in the text.

Agreed.