From 07f6fedf447bb2ed9fbc15ba17ade5483afcf7c4 Mon Sep 17 00:00:00 2001 From: Aditya Bhardwaj Date: Thu, 16 Feb 2023 21:50:56 +0530 Subject: [PATCH 1/2] Salesforce agent typing indicator fix --- app.json | 2 +- helperFunctions/SalesforceMessageHelpers.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app.json b/app.json index 0f2eaf0..6db368a 100644 --- a/app.json +++ b/app.json @@ -20,5 +20,5 @@ "IRoomUserTyping", "IUIKitLivechatInteractionHandler" ], - "commitHash": "43e6a3edc4707464b139e93e3c56405acd2bf7b5" + "commitHash": "09f3bce02b1b5f3eca618f7ea154a30c2e6d003b" } \ No newline at end of file diff --git a/helperFunctions/SalesforceMessageHelpers.ts b/helperFunctions/SalesforceMessageHelpers.ts index cd43acf..03c89fb 100644 --- a/helperFunctions/SalesforceMessageHelpers.ts +++ b/helperFunctions/SalesforceMessageHelpers.ts @@ -52,7 +52,7 @@ export async function messageFilter( case 'AgentTyping': const salesforceBotUsername: string = await getAppSettingValue(read, AppSettingId.SALESFORCE_BOT_USERNAME); - await agentTypingListener(messageRoom.id, modify.getNotifier().typing({ id: messageRoom.id, username: salesforceBotUsername })); + await agentTypingListener(messageRoom.id, modify.getNotifier().typing({ id: messageRoom.id, username: i?.message?.name || salesforceBotUsername})); break; case 'AgentDisconnect': From f9e1f7bd90f99ab6a1e59dc5affe000efb358d3e Mon Sep 17 00:00:00 2001 From: Aditya Bhardwaj Date: Thu, 16 Feb 2023 23:15:45 +0530 Subject: [PATCH 2/2] FIx lint errors --- helperFunctions/SalesforceMessageHelpers.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/helperFunctions/SalesforceMessageHelpers.ts b/helperFunctions/SalesforceMessageHelpers.ts index 03c89fb..5ddc724 100644 --- a/helperFunctions/SalesforceMessageHelpers.ts +++ b/helperFunctions/SalesforceMessageHelpers.ts @@ -52,7 +52,10 @@ export async function messageFilter( case 'AgentTyping': const salesforceBotUsername: string = await getAppSettingValue(read, AppSettingId.SALESFORCE_BOT_USERNAME); - await agentTypingListener(messageRoom.id, modify.getNotifier().typing({ id: messageRoom.id, username: i?.message?.name || salesforceBotUsername})); + await agentTypingListener( + messageRoom.id, + modify.getNotifier().typing({ id: messageRoom.id, username: i?.message?.name || salesforceBotUsername }), + ); break; case 'AgentDisconnect':