From 22f3e8ef4a85eef5852f53d427b6dcaa64bd205a Mon Sep 17 00:00:00 2001 From: Djorkaeff Alexandre Date: Tue, 30 Jul 2019 13:15:39 -0300 Subject: [PATCH] [FIX] Media share type (#1086) --- app/views/ShareListView/index.js | 1 - app/views/ShareView/index.js | 9 ++++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/app/views/ShareListView/index.js b/app/views/ShareListView/index.js index da4fc3b4..ab01f00f 100644 --- a/app/views/ShareListView/index.js +++ b/app/views/ShareListView/index.js @@ -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 }` }; } diff --git a/app/views/ShareView/index.js b/app/views/ShareView/index.js index 28294627..4aab9c1c 100644 --- a/app/views/ShareView/index.js +++ b/app/views/ShareView/index.js @@ -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);