fix discord & msteams webhook url configuration (#3728)
Signed-off-by: Luca Kröger <l.kroeger01@gmail.com>
This commit is contained in:
parent
80b3cb072f
commit
efa801faf7
|
@ -516,8 +516,8 @@ func (c *Config) UnmarshalYAML(unmarshal func(interface{}) error) error {
|
||||||
if discord.HTTPConfig == nil {
|
if discord.HTTPConfig == nil {
|
||||||
discord.HTTPConfig = c.Global.HTTPConfig
|
discord.HTTPConfig = c.Global.HTTPConfig
|
||||||
}
|
}
|
||||||
if discord.WebhookURL == nil {
|
if discord.WebhookURL == nil && len(discord.WebhookURLFile) == 0 {
|
||||||
return fmt.Errorf("no discord webhook URL provided")
|
return fmt.Errorf("no discord webhook URL or URLFile provided")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for _, webex := range rcv.WebexConfigs {
|
for _, webex := range rcv.WebexConfigs {
|
||||||
|
@ -536,8 +536,8 @@ func (c *Config) UnmarshalYAML(unmarshal func(interface{}) error) error {
|
||||||
if msteams.HTTPConfig == nil {
|
if msteams.HTTPConfig == nil {
|
||||||
msteams.HTTPConfig = c.Global.HTTPConfig
|
msteams.HTTPConfig = c.Global.HTTPConfig
|
||||||
}
|
}
|
||||||
if msteams.WebhookURL == nil {
|
if msteams.WebhookURL == nil && len(msteams.WebhookURLFile) == 0 {
|
||||||
return fmt.Errorf("no msteams webhook URL provided")
|
return fmt.Errorf("no msteams webhook URL or URLFile provided")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue