From f2e13c5bca51adf312eb807ec93e1fb90a245cdb Mon Sep 17 00:00:00 2001 From: Stephen Hand Date: Tue, 5 Nov 2024 10:44:23 +0000 Subject: [PATCH] Properly extract sid from everyone queue for direct conversations transfers --- functions/transferChatStart.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/functions/transferChatStart.ts b/functions/transferChatStart.ts index 6609ab49..60060a7e 100644 --- a/functions/transferChatStart.ts +++ b/functions/transferChatStart.ts @@ -269,8 +269,8 @@ export const handler = TokenValidator( let newTaskSid; if (isConversation && transferTargetType === 'worker') { - console.info( - `Transferring conversations task ${taskSid} to worker ${targetSid} by creating interaction invite.`, + console.debug( + `Transferring conversations task ${taskSid} to worker ${targetSid} - looking up queues.`, ); // Get task queue const taskQueues = await client.taskrouter @@ -278,7 +278,7 @@ export const handler = TokenValidator( .taskQueues.list({ workerSid: targetSid }); const taskQueueSid = - taskQueues.find((tq) => tq.friendlyName === DIRECT_TRANSFER_QUEUE_FRIENDLY_NAME) || + taskQueues.find((tq) => tq.friendlyName === DIRECT_TRANSFER_QUEUE_FRIENDLY_NAME)?.sid || taskQueues[0].sid; console.info(