fix discord & msteams webhook url configuration (#3728)

Signed-off-by: Luca Kröger <l.kroeger01@gmail.com>
This commit is contained in:
Luca Kröger 2024-02-19 17:53:59 +01:00 committed by GitHub
parent 80b3cb072f
commit efa801faf7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 4 deletions

View File

@ -516,8 +516,8 @@ func (c *Config) UnmarshalYAML(unmarshal func(interface{}) error) error {
if discord.HTTPConfig == nil {
discord.HTTPConfig = c.Global.HTTPConfig
}
if discord.WebhookURL == nil {
return fmt.Errorf("no discord webhook URL provided")
if discord.WebhookURL == nil && len(discord.WebhookURLFile) == 0 {
return fmt.Errorf("no discord webhook URL or URLFile provided")
}
}
for _, webex := range rcv.WebexConfigs {
@ -536,8 +536,8 @@ func (c *Config) UnmarshalYAML(unmarshal func(interface{}) error) error {
if msteams.HTTPConfig == nil {
msteams.HTTPConfig = c.Global.HTTPConfig
}
if msteams.WebhookURL == nil {
return fmt.Errorf("no msteams webhook URL provided")
if msteams.WebhookURL == nil && len(msteams.WebhookURLFile) == 0 {
return fmt.Errorf("no msteams webhook URL or URLFile provided")
}
}