update discord properties
* username optional * channel optional and remove it from payload Signed-off-by: Christopher Banck <christopher@banck.net>
This commit is contained in:
parent
171b5eb216
commit
f365f3796e
|
@ -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 == "" {
|
||||
|
|
Loading…
Reference in New Issue