From 2b57d91dea0ed3646be956c117715bffb72c328a Mon Sep 17 00:00:00 2001 From: Christopher Banck Date: Tue, 8 Feb 2022 10:48:52 +0100 Subject: [PATCH] update discord properties * username optional * channel optional and remove it from payload Signed-off-by: Christopher Banck --- internal/notifier/discord.go | 9 --------- 1 file changed, 9 deletions(-) diff --git a/internal/notifier/discord.go b/internal/notifier/discord.go index c0378424f..ad5db25d4 100644 --- a/internal/notifier/discord.go +++ b/internal/notifier/discord.go @@ -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, @@ -72,7 +64,6 @@ func (s *Discord) Post(event events.Event) error { } payload := SlackPayload{ - Channel: s.Channel, Username: s.Username, } if payload.Username == "" {