Skip to content

Commit

Permalink
Fix map removal event hook
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenhand committed May 23, 2024
1 parent 231d1d2 commit 175b4df
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions functions/helpers/customChannels/customChannelToFlex.private.ts
Original file line number Diff line number Diff line change
Expand Up @@ -333,18 +333,16 @@ const createConversation = async (
},
});

if (onConversationUpdateWebhookUrl) {
await conversationContext.webhooks.create({
target: 'webhook',
configuration: {
method: 'POST',
url:
onConversationUpdateWebhookUrl ||
`https://${context.DOMAIN_NAME}/webhooks/FlexChannelUpdate`,
filters: ['onConversationStateUpdated'],
},
});
}
await conversationContext.webhooks.create({
target: 'webhook',
configuration: {
method: 'POST',
url:
onConversationUpdateWebhookUrl ||
`https://${context.DOMAIN_NAME}/webhooks/FlexChannelUpdate`,
filters: ['onConversationStateUpdated'],
},
});
} catch (err) {
return { conversationSid, error: err as Error };
}
Expand Down

0 comments on commit 175b4df

Please sign in to comment.