-
Notifications
You must be signed in to change notification settings - Fork 9
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
slack-terminalize/util/_getCommand is too aggressive! #12
Comments
@alipourshahid Glad to know it's useful for you! The only way it could work with |
@ggauravr the problem is actually the fact that it works when h is used. so the command is help but when users type h in slack, help is detected. I think the issue is the RegEx is detecting any character set that the command starts with e.g. if you type h, he, hel, and help. They are all detected as help. |
…d aliases in the userCommand list. Before it would match things like 'he' for 'help', 'g' for 'gem' etc.
Hopefully my PR sorts this out OK. I had to change the code after the regexp due to the difference in match results but think it simplifies the method without losing any logic. |
@jamesallenuk you're PR works perfectly. It really needs to get merged. I ended up moving the slack-terminalize to a local folder and making the changes there. |
Sorry about that guys. Will merge by the end of the today. Thanks!
…On Sun, Aug 20, 2017, 5:52 AM Wayne Wolf ***@***.***> wrote:
@jamesallenuk <https://github.com/jamesallenuk> you're PR works
perfectly. It really needs to get merged. I ended up moving the
slack-terminalize to a local folder and making the changes there.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#12 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABMmb1kj-SaJKdhnUNT4A06Q7VqtifQYks5saCwdgaJpZM4J2O4o>
.
|
@ggauravr this is a great library. I am using it for my team. I have come across and issue though.
_getCommand also recognizes the beginning of the commands as valid commands. For instant, if the command is "help", "h" is also recognized as valid and works.
Is this currently as-designed?
It'd be nice to be able to config this to work as either exact match or contains (the current behaviour).
The text was updated successfully, but these errors were encountered: