From 73aeee21cb2a7b35a297a86a8604f54c0fef3715 Mon Sep 17 00:00:00 2001 From: Stephen Hand Date: Fri, 26 Jul 2024 16:34:24 +0100 Subject: [PATCH] More logging --- functions/interaction/transitionAgentParticipants.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/functions/interaction/transitionAgentParticipants.ts b/functions/interaction/transitionAgentParticipants.ts index f0f9078e..0f21ad32 100644 --- a/functions/interaction/transitionAgentParticipants.ts +++ b/functions/interaction/transitionAgentParticipants.ts @@ -87,7 +87,12 @@ export const handler = TokenValidator( const results = await Promise.allSettled( interactionAgentParticipants.map((p) => { console.log(`Transitioning agent participant ${p.sid} to ${targetStatus}`); - Object.entries(p).forEach(([k, v]) => console.log(`${k}: ${typeof v === 'object' ? JSON.stringify(v) : v}`)); + Object.entries(p).forEach(([k, v]) => + console.log(`${k}: ${typeof v === 'object' ? JSON.stringify(v) : v}`), + ); + console.log('routing_properties', JSON.stringify((p as any).routing_properties)); + console.log('routingProperties', JSON.stringify((p as any).routingProperties)); + return p.update({ status: targetStatus }); }), );