From 5f0a8994ba3e2c2316ed9263f69f76c67abb5b25 Mon Sep 17 00:00:00 2001
From: jurgenhaas <juergen@paragon-es.de>
Date: Fri, 2 Dec 2016 17:43:21 +0100
Subject: [PATCH] #7 Try html markup for images in Mattermost notifications

---
 plugins/mattermost/index.js | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/plugins/mattermost/index.js b/plugins/mattermost/index.js
index 66e0343..131c122 100644
--- a/plugins/mattermost/index.js
+++ b/plugins/mattermost/index.js
@@ -60,12 +60,15 @@ exports.initWebApp = function(options) {
   var image = function(alt, url, width, height) {
     var size = '';
     if (width != undefined) {
-      size = ' =' + width + 'x';
-      if (height != undefined) {
-        size += height;
-      }
+      size += ' width="' + width + 'px"';
+    }
+    if (height != undefined) {
+      size += ' height="' + height + 'px"';
+    }
+    else {
+      size += ' height="32px"';
     }
-    return '![' + alt + '](' + url + size + ')';
+    return '<img' + size + ' src="' + url + '" />';
   };
 
   var getHook = function(check) {
-- 
GitLab