From 8631f663746c1806bf92bbd760a4d184e7bbc7ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Floure?= Date: Mon, 4 May 2020 08:58:49 +0200 Subject: [PATCH] Display name label on matrix notification --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index 9e59c0d..7aeb618 100644 --- a/main.go +++ b/main.go @@ -37,7 +37,7 @@ func getMatrixMessageFor(alert template.Alert) gomatrix.HTMLMessage { prefix = fmt.Sprintf("%v ", 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 {