Skip to content

Commit

Permalink
don't send slack message if webhookURL is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
weekface committed May 24, 2019
1 parent 23091ef commit 5fb5003
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/slack/slack.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func (attachment *Attachment) AddField(field Field) *Attachment {

func Send(webhookURL string, proxy string, payload Payload) error {
if webhookURL == "" {
return fmt.Errorf("the webhookURL have not set")
return nil
}
body, err := json.Marshal(payload)
if err != nil {
Expand Down

0 comments on commit 5fb5003

Please sign in to comment.