Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce exact_command_keyword_match feature #59

Merged
merged 1 commit into from
Aug 21, 2024

Conversation

Sakthivel-Ramasamy
Copy link
Contributor

If the command_keyword is set to "hi", and if the user issues "delhi" to the bot, then webex_bot.py allows it as it performs a sub-string match with "if user_command.find(c.command_keyword) != -1:" in process_raw_command().

With these changes, we can set webex_bot.py to perform an exact command_keyword match with a new flag "exact_command_keyword_match" from the Command class. Also, for backward compatibility, the default behaviour of the flag is set to False if undefined. So, we can have the benefits of both the worlds at each command level.

Copy link
Owner

@fbradyirl fbradyirl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM thanks!

@fbradyirl fbradyirl merged commit 66aa0ce into fbradyirl:main Aug 21, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants