From bc573664863aa5cb6f9b8baca5deb891f77e3980 Mon Sep 17 00:00:00 2001 From: Diego Sampaio Date: Mon, 19 Feb 2018 14:02:15 -0300 Subject: [PATCH] Fix livechat start when not using registration 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 {