You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-07 10:46:24 +03:00
Don't set empty mime types on metadata.
This commit is contained in:
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user