fix(Chat Trigger Node): Fix auth in "Embedded Chat" mode (#10734)

This commit is contained in:
oleg
2024-09-09 17:33:52 +02:00
committed by GitHub
parent d3861b31ce
commit 96db501a61

View File

@@ -460,7 +460,6 @@ export class ChatTrigger extends Node {
const mode = ctx.getMode() === 'manual' ? 'test' : 'production'; const mode = ctx.getMode() === 'manual' ? 'test' : 'production';
const bodyData = ctx.getBodyData() ?? {}; const bodyData = ctx.getBodyData() ?? {};
if (nodeMode === 'hostedChat') {
try { try {
await validateAuth(ctx); await validateAuth(ctx);
} catch (error) { } catch (error) {
@@ -473,7 +472,7 @@ export class ChatTrigger extends Node {
} }
throw error; throw error;
} }
if (nodeMode === 'hostedChat') {
// Show the chat on GET request // Show the chat on GET request
if (webhookName === 'setup') { if (webhookName === 'setup') {
const webhookUrlRaw = ctx.getNodeWebhookUrl('default') as string; const webhookUrlRaw = ctx.getNodeWebhookUrl('default') as string;