Skip to content
This repository has been archived by the owner on Mar 1, 2024. It is now read-only.

The router should match a command only if the verb is followed by a space or EOF #43

Closed
connorkuehl opened this issue Jul 9, 2021 · 0 comments · Fixed by #47
Closed
Labels
good first issue Good for newcomers

Comments

@connorkuehl
Copy link
Owner

Right now, the router's route method just uses strings.HasPrefix to determine if the message contains a command.

This means it's possible to concatenate a valid command with garbage:

Person) @Popple helpasdf
Popple) *sends help text*

It's not exactly a bug, since it won't technically hurt anything, but "helpasdf" is also technically not "help".

Fix this.

@connorkuehl connorkuehl added the good first issue Good for newcomers label Jul 9, 2021
@connorkuehl connorkuehl linked a pull request Jul 15, 2021 that will close this issue
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant