summary refs log tree commit diff
path: root/webclient/components
diff options
context:
space:
mode:
authorEmmanuel ROHEE <erohee@amdocs.com>2014-08-13 11:42:28 +0200
committerEmmanuel ROHEE <erohee@amdocs.com>2014-08-13 11:42:28 +0200
commitc87e1f641858fbc2e6ed6b99ef05591a977bd4c4 (patch)
tree4c49891e7d919bf99ba603a98c2d837f3c667810 /webclient/components
parentDisplay image messages from the stream (diff)
downloadsynapse-c87e1f641858fbc2e6ed6b99ef05591a977bd4c4.tar.xz
Room: Added a text input to type an image URL in order to send an image message
Diffstat (limited to 'webclient/components')
-rw-r--r--webclient/components/matrix/matrix-service.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/webclient/components/matrix/matrix-service.js b/webclient/components/matrix/matrix-service.js
index 5f1731c1a8..f054bf301e 100644
--- a/webclient/components/matrix/matrix-service.js
+++ b/webclient/components/matrix/matrix-service.js
@@ -197,6 +197,17 @@ angular.module('matrixService', [])
             return this.sendMessage(room_id, msg_id, content);
         },
 
+        // Send an image message
+        sendImageMessage: function(room_id, image_url, image_alt, msg_id) {
+            var content = {
+                 msgtype: "m.image",
+                 url: image_url,
+                 body: image_alt
+            };
+
+            return this.sendMessage(room_id, msg_id, content);
+        },
+
         // Send an emote message
         sendEmoteMessage: function(room_id, body, msg_id) {
             var content = {