Skip to content
Snippets Groups Projects
Commit f7cf978f authored by Kegan Dougal's avatar Kegan Dougal
Browse files

SYWEB-136: Send m.images according to the spec.

parent 1ac1cd6c
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
......@@ -422,7 +422,8 @@ angular.module('matrixService', [])
var content = {
msgtype: "m.image",
url: image_url,
body: image_body
info: image_body,
body: "Image"
};
return this.sendMessage(room_id, msg_id, content);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment