Remove extra spaces in commands
This commit is contained in:
@@ -78,6 +78,7 @@ func webHandlerTelegramBot(w http.ResponseWriter, r *http.Request) {
|
||||
target := ""
|
||||
if strings.Contains(request.Message.Text, " ") {
|
||||
target = strings.Join(strings.Split(request.Message.Text, " ")[1:], " ")
|
||||
target = strings.TrimSpace(target)
|
||||
}
|
||||
|
||||
// Execute command
|
||||
|
||||
@@ -43,6 +43,7 @@ func webBackendCommunicator(endpoint string, command string) func(w http.Respons
|
||||
} else {
|
||||
backendCommand = backendCommandPrimitive
|
||||
}
|
||||
backendCommand = strings.TrimSpace(backendCommand)
|
||||
|
||||
templateHeader(w, r, "Bird-lg Go - "+html.EscapeString(endpoint+" "+backendCommand))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user