Display name label on matrix notification

This commit is contained in:
Timothée Floure 2020-05-04 08:58:49 +02:00
parent aa19d2a64f
commit 8631f66374

View file

@ -37,7 +37,7 @@ func getMatrixMessageFor(alert template.Alert) gomatrix.HTMLMessage {
prefix = fmt.Sprintf("<strong>%v</strong> ", alert.Status)
}
return gomatrix.GetHTMLMessage("m.text", prefix + alert.Annotations["summary"])
return gomatrix.GetHTMLMessage("m.text", prefix + alert.Labels["name"] + " >> " + alert.Annotations["summary"])
}
func getMatrixClient(homeserver string, user string, token string, targetRoomID string) *gomatrix.Client {