Skip to content

Commit

Permalink
Trim whitespace from ends of webhook URL (#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
troyunverdruss authored Jul 9, 2020
1 parent e49abb3 commit a1aaf01
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ func postMessage(conf Config, msg Message) error {
}
log.Debugf("Request to Slack: %s\n", b)

url := string(conf.WebhookURL)
url := strings.TrimSpace(string(conf.WebhookURL))
if string(conf.APIToken) != "" {
url = "https://slack.com/api/chat.postMessage"
}
Expand Down

0 comments on commit a1aaf01

Please sign in to comment.