Skip to content

Commit

Permalink
[FIX] Livechat integration with RDStation (#12257)
Browse files Browse the repository at this point in the history
  • Loading branch information
sampaiodiego authored Oct 4, 2018
1 parent 7c3a213 commit ce636d3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/rocketchat-livechat/server/hooks/RDStation.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ function sendToRDStation(room) {
return room;
}

const email = Array.isArray(livechatData.visitor.email) ? livechatData.visitor.email[0].address : livechatData.visitor.email;

const options = {
headers: {
'Content-Type': 'application/json',
Expand All @@ -17,7 +19,7 @@ function sendToRDStation(room) {
token_rdstation: RocketChat.settings.get('Livechat_RDStation_Token'),
identificador: 'rocketchat-livechat',
client_id: livechatData.visitor._id,
email: livechatData.visitor.email,
email,
},
};

Expand Down

0 comments on commit ce636d3

Please sign in to comment.