Skip to content

Commit

Permalink
[FIX] Media share type (#1086)
Browse files Browse the repository at this point in the history
  • Loading branch information
djorkaeffalexandre authored and diegolmello committed Jul 30, 2019
1 parent 3dafd7e commit 924bd6c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
1 change: 0 additions & 1 deletion app/views/ShareListView/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ export default class ShareListView extends React.Component {
description: '',
size: data.size,
mime: mime.lookup(data.path),
store: 'Uploads',
path: isIOS ? data.path : `file://${ data.path }`
};
}
Expand Down
9 changes: 8 additions & 1 deletion app/views/ShareView/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,14 @@ export default class ShareView extends React.Component {
const { rid, fileInfo, file } = this.state;
const { baseUrl: server, user } = this.props;
const { name, description } = file;
const fileMessage = { ...fileInfo, name, description };
const fileMessage = {
name,
description,
size: fileInfo.size,
type: fileInfo.mime,
store: 'Uploads',
path: fileInfo.path
};
if (fileInfo && rid !== '') {
try {
await RocketChat.sendFileMessage(rid, fileMessage, undefined, server, user);
Expand Down

0 comments on commit 924bd6c

Please sign in to comment.