CommandHandler faster check#1074
CommandHandler faster check#1074tsnoam merged 5 commits intopython-telegram-bot:masterfrom wagnerluis1982:commandhandler-faster-check
Conversation
|
I forgot to say, this fixes #1073 |
erickmendonca
left a comment
There was a problem hiding this comment.
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. |
tsnoam
left a comment
There was a problem hiding this comment.
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