diff options
author | Kegan Dougal <kegan@matrix.org> | 2014-11-04 11:26:03 +0000 |
---|---|---|
committer | Kegan Dougal <kegan@matrix.org> | 2014-11-04 11:26:03 +0000 |
commit | f7cf978f68cddc66c2548e25ddeef468b7f25435 (patch) | |
tree | 9cb4154513d53ad6bcce0109c962fd8bf8808f9c /webclient/components/fileUpload/file-upload-service.js | |
parent | SYWEB-133: JSON dialog now appears on dblclick to allow users to highlight text. (diff) | |
download | synapse-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.js | 7 |
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 |