From 924bd6c8e14c97b405ccd8cdc42598c433042c22 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 da4fc3b41d..ab01f00f0f 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 2829462733..4aab9c1c9f 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);