n8n-nodes-chatflow 1.2.2 → 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
|
},
|
|
@@ -192,33 +194,33 @@ ChatflowTrigger.description = {
|
|
|
192
194
|
description: 'Types of processed webhooks. All types will be processed if none is selected.',
|
|
193
195
|
options: [
|
|
194
196
|
{
|
|
195
|
-
|
|
196
|
-
|
|
197
|
+
name: 'Incoming Message',
|
|
198
|
+
value: 'incoming_message',
|
|
197
199
|
description: 'Trigger on new incoming message',
|
|
198
200
|
},
|
|
199
201
|
{
|
|
200
|
-
|
|
201
|
-
|
|
202
|
+
name: 'Delivery Status',
|
|
203
|
+
value: 'delivery_status',
|
|
202
204
|
description: 'Trigger on message delivery status updates',
|
|
203
205
|
},
|
|
204
206
|
{
|
|
205
|
-
|
|
206
|
-
|
|
207
|
+
name: 'Authorization Status',
|
|
208
|
+
value: 'authorization_status',
|
|
207
209
|
description: 'Trigger on instance authorization changes',
|
|
208
210
|
},
|
|
209
211
|
{
|
|
210
|
-
|
|
211
|
-
|
|
212
|
+
name: 'Incoming Call',
|
|
213
|
+
value: 'incoming_call',
|
|
212
214
|
description: 'Trigger on incoming voice/video calls',
|
|
213
215
|
},
|
|
214
216
|
{
|
|
215
|
-
|
|
216
|
-
|
|
217
|
+
name: 'Outgoing Message Sent From API',
|
|
218
|
+
value: 'outgoing_message_api',
|
|
217
219
|
description: 'Trigger on new outgoing message sent from API',
|
|
218
220
|
},
|
|
219
221
|
{
|
|
220
|
-
|
|
221
|
-
|
|
222
|
+
name: 'Outgoing Message Sent From Phone',
|
|
223
|
+
value: 'outgoing_message_phone',
|
|
222
224
|
description: 'Trigger on new outgoing message sent from phone',
|
|
223
225
|
},
|
|
224
226
|
],
|
|
@@ -231,18 +233,18 @@ ChatflowTrigger.description = {
|
|
|
231
233
|
description: 'Process webhooks based on messages from personal/group chats',
|
|
232
234
|
options: [
|
|
233
235
|
{
|
|
234
|
-
|
|
235
|
-
|
|
236
|
+
name: 'Receive All',
|
|
237
|
+
value: 'all',
|
|
236
238
|
description: 'Process webhooks from all chats',
|
|
237
239
|
},
|
|
238
240
|
{
|
|
239
|
-
|
|
240
|
-
|
|
241
|
+
name: 'Only From Chats',
|
|
242
|
+
value: 'chats',
|
|
241
243
|
description: 'Process webhooks only from personal chats',
|
|
242
244
|
},
|
|
243
245
|
{
|
|
244
|
-
|
|
245
|
-
|
|
246
|
+
name: 'Only From Groups',
|
|
247
|
+
value: 'groups',
|
|
246
248
|
description: 'Process webhooks only from group chats',
|
|
247
249
|
},
|
|
248
250
|
],
|