Normalize commands.

SMS tends to capitalize the first argument.
This commit is contained in:
K. Isom 2021-04-19 13:18:59 -07:00
parent 0f526912f8
commit 5cb1acb279
2 changed files with 3 additions and 1 deletions

View File

@ -2,8 +2,10 @@ package twilio
import (
"kas/conn/http"
"log"
)
func Start() {
http.AddRoute("/twilio", handler)
log.Println("twilio webook active")
}

View File

@ -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{},
}