Skip to content

Commit

Permalink
ch: modify debud data
Browse files Browse the repository at this point in the history
  • Loading branch information
acedeywin committed Jun 17, 2024
1 parent f55e9e4 commit 8524adf
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions functions/channelCapture/chatbotCallback.protected.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,10 @@ export const handler = async (
return;
}

console.log('conversation / channel attributes:', attributesJson);

const channelAttributes = JSON.parse(attributesJson || '{}');

console.log('conversation / channel attributes:', channelAttributes);

// Send message to bot only if it's from child
const eventTypeCheck = EventType === 'onMessageSent' || EventType === 'onMessageAdded';
const userIdentityCheck =
Expand All @@ -132,9 +132,9 @@ export const handler = async (
console.log('capturedChannelAttributes is here', capturedChannelAttributes);

const lexResult = await lexClient.postText(context, {
botName: capturedChannelAttributes?.botName,
botAlias: capturedChannelAttributes?.botAlias,
userId: capturedChannelAttributes?.userId,
botName: capturedChannelAttributes.botName,
botAlias: capturedChannelAttributes.botAlias,
userId: capturedChannelAttributes.userId,
inputText: Body,
});

Expand Down

0 comments on commit 8524adf

Please sign in to comment.