Normalize commands.
SMS tends to capitalize the first argument.
This commit is contained in:
parent
0f526912f8
commit
5cb1acb279
|
@ -2,8 +2,10 @@ package twilio
|
|||
|
||||
import (
|
||||
"kas/conn/http"
|
||||
"log"
|
||||
)
|
||||
|
||||
func Start() {
|
||||
http.AddRoute("/twilio", handler)
|
||||
log.Println("twilio webook active")
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ func Parse(ctx context.Context, line string) (*Command, error) {
|
|||
cmd := &Command{
|
||||
Context: ctx,
|
||||
Raw: line,
|
||||
Command: args[0],
|
||||
Command: strings.ToLower(args[0]),
|
||||
Args: args[1:],
|
||||
Meta: map[string]string{},
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue