multi mode: Simplify code
Just like it's done in the single mode.
This commit is contained in:
parent
cd848543b3
commit
d7fdd85b72
1 changed files with 3 additions and 6 deletions
9
main.go
9
main.go
|
@ -183,7 +183,6 @@ func (br *bridge) multiAlertNotification(p *payload) *notification {
|
|||
}
|
||||
n.body = body
|
||||
|
||||
var priority string
|
||||
var tags []string
|
||||
if p.Status == "resolved" {
|
||||
tags = append(tags, br.cfg.resolved.Tags...)
|
||||
|
@ -201,8 +200,8 @@ func (br *bridge) multiAlertNotification(p *payload) *notification {
|
|||
continue
|
||||
}
|
||||
|
||||
if priority == "" {
|
||||
priority = labelConfig.Priority
|
||||
if n.priority == "" {
|
||||
n.priority = labelConfig.Priority
|
||||
}
|
||||
|
||||
if n.icon == "" {
|
||||
|
@ -216,9 +215,7 @@ func (br *bridge) multiAlertNotification(p *payload) *notification {
|
|||
}
|
||||
}
|
||||
|
||||
tagString := strings.Join(tags, ",")
|
||||
n.priority = priority
|
||||
n.tags = tagString
|
||||
n.tags = strings.Join(tags, ",")
|
||||
|
||||
if br.cfg.am.SilenceDuration != 0 && p.Status == "firing" {
|
||||
if br.cfg.BaseURL == "" {
|
||||
|
|
Loading…
Reference in a new issue