Skip to content

Commit

Permalink
Merge pull request #20 from gitizenme/fix-trim-triggerword
Browse files Browse the repository at this point in the history
Fix trim of TriggerWord
  • Loading branch information
Andrew Schwartz committed Oct 9, 2016
2 parents 5c8eef3 + 54dee5f commit 777e82a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func hookHandler(robotMap map[string][]robots.Robot) http.HandlerFunc {
w.WriteHeader(http.StatusBadRequest)
return
}
com := strings.TrimPrefix(command.Text, command.TriggerWord+" ")
com := strings.TrimPrefix(command.Text, command.TriggerWord)
c := strings.Split(com, " ")
command.Robot = c[0]
command.Text = strings.Join(c[1:], " ")
Expand Down

0 comments on commit 777e82a

Please sign in to comment.