Skip to content

Commit

Permalink
update discord properties
Browse files Browse the repository at this point in the history
* username optional
* channel optional and remove it from payload

Signed-off-by: Christopher Banck <christopher@banck.net>
  • Loading branch information
vchrisb committed Feb 8, 2022
1 parent 171b5eb commit 2c251ea
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions internal/notifier/discord.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,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 +64,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 2c251ea

Please sign in to comment.