summary refs log tree commit diff
path: root/webclient/components/fileUpload/file-upload-service.js
diff options
context:
space:
mode:
authorKegan Dougal <kegan@matrix.org>2014-11-04 11:26:03 +0000
committerKegan Dougal <kegan@matrix.org>2014-11-04 11:26:03 +0000
commitf7cf978f68cddc66c2548e25ddeef468b7f25435 (patch)
tree9cb4154513d53ad6bcce0109c962fd8bf8808f9c /webclient/components/fileUpload/file-upload-service.js
parentSYWEB-133: JSON dialog now appears on dblclick to allow users to highlight text. (diff)
downloadsynapse-f7cf978f68cddc66c2548e25ddeef468b7f25435.tar.xz
SYWEB-136: Send m.images according to the spec.
Diffstat (limited to 'webclient/components/fileUpload/file-upload-service.js')
-rw-r--r--webclient/components/fileUpload/file-upload-service.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/webclient/components/fileUpload/file-upload-service.js b/webclient/components/fileUpload/file-upload-service.js
index e0f67b2c6c..b544e29509 100644
--- a/webclient/components/fileUpload/file-upload-service.js
+++ b/webclient/components/fileUpload/file-upload-service.js
@@ -64,7 +64,8 @@ angular.module('mFileUpload', ['matrixService', 'mUtilities'])
         var imageMessage = {
             msgtype: "m.image",
             url: undefined,
-            body: {
+            body: "Image",
+            info: {
                 size: undefined,
                 w: undefined,
                 h: undefined,
@@ -90,7 +91,7 @@ angular.module('mFileUpload', ['matrixService', 'mUtilities'])
                         function(url) {
                             // Update message metadata
                             imageMessage.url = url;
-                            imageMessage.body = {
+                            imageMessage.info = {
                                 size: imageFile.size,
                                 w: size.width,
                                 h: size.height,
@@ -101,7 +102,7 @@ angular.module('mFileUpload', ['matrixService', 'mUtilities'])
                             // reuse the original image info for thumbnail data
                             if (!imageMessage.thumbnail_url) {
                                 imageMessage.thumbnail_url = imageMessage.url;
-                                imageMessage.thumbnail_info = imageMessage.body;
+                                imageMessage.thumbnail_info = imageMessage.info;
                             }
 
                             // We are done