mirror of
https://mau.dev/maunium/synapse.git
synced 2024-12-14 09:53:47 +01:00
SYWEB-136: Send m.images according to the spec.
This commit is contained in:
parent
1ac1cd6c14
commit
f7cf978f68
2 changed files with 6 additions and 4 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue