-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
CommandHandler faster check #1074
CommandHandler faster check #1074
Conversation
I forgot to say, this fixes #1073 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Avoids processing filters if not needed.
Thanks a lot for your contribution @wagnerluis1982 The fix looks good, but it would be great to have a test to ensure we won't have regressions on this in the future. I see you are a first-time contributor, would you like to add your name to the |
@wagnerluis1982 A good test case would be to show that a filter on a command handler is not executed when the command in a message does not match the command defined in the handler. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Just waiting for tests to succeed (restarted the py3.5 on travis)
darn, forgot there are no unitests. yeah we need them. |
I added a unit test 👍 |
@jh0ker Sorry the delay, I was off in the weekend.
I was so eager to fix the issue that I didn't remember tests 🙄. I see you already did, so I'm too late now...
It's always good 😄. Since I actively develop one bot, I intend to contribute more to the project. |
@wagnerluis1982 thanks for your contribution |
Make the filters applied to a command to execute only if the command name matches. This solves the problem described in #1073