Skip to content

Commit

Permalink
Merge pull request #324 from vchrisb/discord_properties
Browse files Browse the repository at this point in the history
discord: Remove username and channel requirements
  • Loading branch information
stefanprodan authored Feb 9, 2022
2 parents 0715fec + 67c58d6 commit bf33786
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions internal/notifier/discord.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ limitations under the License.
package notifier

import (
"errors"
"fmt"
"net/url"
"path"
Expand Down Expand Up @@ -48,14 +47,6 @@ func NewDiscord(hookURL string, proxyURL string, username string, channel string
hookURL = webhook.String()
}

if username == "" {
return nil, errors.New("empty Discord username")
}

if channel == "" {
return nil, errors.New("empty Discord channel")
}

return &Discord{
Channel: channel,
URL: hookURL,
Expand All @@ -72,7 +63,6 @@ func (s *Discord) Post(event events.Event) error {
}

payload := SlackPayload{
Channel: s.Channel,
Username: s.Username,
}
if payload.Username == "" {
Expand Down

0 comments on commit bf33786

Please sign in to comment.