Merge pull request #4979 from RocketChat/livechat-fix-not-send-integration-always

Do not trigger livechat integration if room still open
pull/4985/head
Gabriel Engel 10 years ago committed by GitHub
commit 59b85f78bc
  1. 5
      packages/rocketchat-livechat/server/hooks/sendToCRM.js

@ -3,6 +3,11 @@ function sendToCRM(hook, room) {
return room;
}
// Do not send to CRM if the chat is still open
if (hook === 'saveLivechatInfo' && room.open) {
return room;
}
let postData = RocketChat.Livechat.getLivechatRoomGuestInfo(room);
if (hook === 'closeRoom') {
postData.type = 'LivechatSession';

Loading…
Cancel
Save