mirror of
https://github.com/element-hq/element-web
synced 2024-11-26 03:05:51 +03:00
Don't set empty mime types on metadata.
This commit is contained in:
parent
2bce4e4d62
commit
2d3b87d56d
1 changed files with 5 additions and 1 deletions
|
@ -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…
Reference in a new issue