From 9849c6caacdbc44c96732d90f9188406094bd2ed Mon Sep 17 00:00:00 2001 From: Stephen Okpalaononuju Date: Mon, 17 Jun 2024 15:28:32 +0100 Subject: [PATCH] ch: modify debud data 2 --- functions/channelCapture/chatbotCallback.protected.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/functions/channelCapture/chatbotCallback.protected.ts b/functions/channelCapture/chatbotCallback.protected.ts index 58fd0d19..9f7bc901 100644 --- a/functions/channelCapture/chatbotCallback.protected.ts +++ b/functions/channelCapture/chatbotCallback.protected.ts @@ -62,6 +62,9 @@ export const handler = async ( try { const { Body, From, ChannelSid, EventType, ParticipantSid, ConversationSid } = event; + + console.log('This is event', event); + if (!Body) { resolve(error400('Body')); return; @@ -114,7 +117,7 @@ export const handler = async ( const channelAttributes = JSON.parse(attributesJson || '{}'); - console.log('conversation / channel attributes:', channelAttributes); + console.log('conversation / channel attributes:', channelAttributes, client); // Send message to bot only if it's from child const eventTypeCheck = EventType === 'onMessageSent' || EventType === 'onMessageAdded';