Normalize commands.
SMS tends to capitalize the first argument.
This commit is contained in:
@@ -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{},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user