From d20b21006b521689362fd29fd3d9be1cff211af8 Mon Sep 17 00:00:00 2001 From: Mark <10452169+donmanguno@users.noreply.github.com> Date: Fri, 9 Feb 2018 17:03:55 -0500 Subject: [PATCH] Demo Change for LE-81946 --- lib/Transformer.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/Transformer.js b/lib/Transformer.js index 87136d0..2fb3db3 100644 --- a/lib/Transformer.js +++ b/lib/Transformer.js @@ -21,6 +21,8 @@ module.exports = { conversationDetails.__myRole = role)); // getMyRole is deprecated. Please use sdk.agentId conversationDetails.getMyRole = () => conversationDetails.__myRole; + conversationDetails.__oldParticipants = []; + conversationDetails.participants.forEach(p => conversationDetails.__oldParticipants.push(p)); conversationDetails.participants = []; Object.keys(conversationDetails.participantsPId).forEach(role => conversationDetails.participantsPId[role].forEach(id => @@ -37,7 +39,7 @@ module.exports = { }, '.ams.cm.UpdateConversationField': (msg, agent) => { msg.body.conversationField.forEach(f => { - if (f.field === 'ParticipantsChange') { + if (f.field === 'ParticipantsChange' && !f.userId) { f.userId = agent.__oldAgentId; } });