From e6623de6b212aae7222460f8b20e03a3b49298cc Mon Sep 17 00:00:00 2001 From: Magnus Berglund Date: Wed, 20 Mar 2019 18:59:13 +0100 Subject: [PATCH] Rewrote creation of images tag --- pkg/services/alerting/notifiers/teams.go | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/pkg/services/alerting/notifiers/teams.go b/pkg/services/alerting/notifiers/teams.go index 6a60c4a619b..e19357d7b7e 100644 --- a/pkg/services/alerting/notifiers/teams.go +++ b/pkg/services/alerting/notifiers/teams.go @@ -78,13 +78,11 @@ func (this *TeamsNotifier) Notify(evalContext *alerting.EvalContext) error { message = evalContext.Rule.Message } - images := "" + images := make([]map[string]interface{}, 0) if evalContext.ImagePublicUrl != "" { - images = []map[string]interface{}{ - { - "image": evalContext.ImagePublicUrl, - }, - } + images = append(images, map[string]interface{}{ + "image": evalContext.ImagePublicUrl, + }) } body := map[string]interface{}{