From 318cf7b97070b12c4a988e8c921b8832da8649a2 Mon Sep 17 00:00:00 2001 From: Guilherme Gazzo Date: Mon, 20 Nov 2017 22:58:15 -0200 Subject: [PATCH] attachments null --- app/lib/rocketchat.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/lib/rocketchat.js b/app/lib/rocketchat.js index af32cbbf..72a25d34 100644 --- a/app/lib/rocketchat.js +++ b/app/lib/rocketchat.js @@ -68,6 +68,7 @@ const RocketChat = { const message = ddbMessage.fields.args[0]; message.temp = false; message._server = server; + message.attachments = message.attachments || []; realm.create('messages', message, true); }); } @@ -247,6 +248,7 @@ const RocketChat = { data.messages.forEach((message) => { message.temp = false; message._server = { id: reduxStore.getState().server.server }; + message.attachments = message.attachments || []; // write('messages', message); realm.create('messages', message, true); });