Rewrote creation of images tag

This commit is contained in:
Magnus Berglund
2019-03-20 18:59:13 +01:00
parent 0511095303
commit e6623de6b2
+4 -6
View File
@@ -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{}{