From 6f8d3fcd91de380beb62217e99978f8afcc4dd96 Mon Sep 17 00:00:00 2001 From: Diego Sampaio Date: Tue, 20 Feb 2018 10:08:26 -0300 Subject: [PATCH] Merge pull request #9772 from RocketChat/fix-livechat-start-conversation-without-register-form [FIX] Livechat conversation not receiving messages when start without form --- packages/rocketchat-livechat/.app/client/lib/chatMessages.js | 2 +- packages/rocketchat-livechat/.app/client/views/messages.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/rocketchat-livechat/.app/client/lib/chatMessages.js b/packages/rocketchat-livechat/.app/client/lib/chatMessages.js index 8323750505b9..d2619ac69c62 100644 --- a/packages/rocketchat-livechat/.app/client/lib/chatMessages.js +++ b/packages/rocketchat-livechat/.app/client/lib/chatMessages.js @@ -153,7 +153,7 @@ this.ChatMessages = class ChatMessages { return showError(error.reason); } - visitor.setId(result._id); + visitor.setId(result.userId); sendMessage(); }); } else { diff --git a/packages/rocketchat-livechat/.app/client/views/messages.js b/packages/rocketchat-livechat/.app/client/views/messages.js index fb457c0fd26a..9d298fa207cf 100644 --- a/packages/rocketchat-livechat/.app/client/views/messages.js +++ b/packages/rocketchat-livechat/.app/client/views/messages.js @@ -122,7 +122,7 @@ Template.messages.events({ return console.log(error.reason); } - visitor.setId(result._id); + visitor.setId(result.userId); LivechatVideoCall.request(); }); } else {