n8n-nodes-chatflow 1.2.3 → 1.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -57,14 +57,16 @@ class ChatflowTrigger {
|
|
|
57
57
|
timeout: 10000,
|
|
58
58
|
});
|
|
59
59
|
|
|
60
|
-
|
|
60
|
+
const returnedWebhookId = response.webhook_id || response.webhookId;
|
|
61
|
+
|
|
62
|
+
if (!response || !response.success || !returnedWebhookId) {
|
|
61
63
|
throw new Error(
|
|
62
64
|
`Failed to register webhook: ${(response && response.message) || 'Unknown error'}`
|
|
63
65
|
);
|
|
64
66
|
}
|
|
65
67
|
|
|
66
68
|
const webhookData = this.getWorkflowStaticData('node');
|
|
67
|
-
webhookData.webhookId =
|
|
69
|
+
webhookData.webhookId = returnedWebhookId;
|
|
68
70
|
|
|
69
71
|
return true;
|
|
70
72
|
},
|