mirror of
https://github.com/vector-im/element-web.git
synced 2026-05-06 04:36:21 +02:00
Don't set empty mime types on metadata.
This commit is contained in:
parent
2bce4e4d62
commit
2d3b87d56d
@ -53,10 +53,14 @@ function sendContentToRoom(file, roomId, matrixClient) {
|
||||
body: file.name,
|
||||
info: {
|
||||
size: file.size,
|
||||
mimetype: file.type
|
||||
}
|
||||
};
|
||||
|
||||
// if we have a mime type for the file, add it to the message metadata
|
||||
if (file.type) {
|
||||
content.info.mimetype = file.type;
|
||||
}
|
||||
|
||||
var def = q.defer();
|
||||
if (file.type.indexOf('image/') == 0) {
|
||||
content.msgtype = 'm.image';
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user