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
- if (!response || !response.success || !response.webhookId) {
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 = response.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
- displayName: 'Incoming Message',
196
- name: 'incoming_message',
197
+ name: 'Incoming Message',
198
+ value: 'incoming_message',
197
199
  description: 'Trigger on new incoming message',
198
200
  },
199
201
  {
200
- displayName: 'Delivery Status',
201
- name: 'delivery_status',
202
+ name: 'Delivery Status',
203
+ value: 'delivery_status',
202
204
  description: 'Trigger on message delivery status updates',
203
205
  },
204
206
  {
205
- displayName: 'Authorization Status',
206
- name: 'authorization_status',
207
+ name: 'Authorization Status',
208
+ value: 'authorization_status',
207
209
  description: 'Trigger on instance authorization changes',
208
210
  },
209
211
  {
210
- displayName: 'Incoming Call',
211
- name: 'incoming_call',
212
+ name: 'Incoming Call',
213
+ value: 'incoming_call',
212
214
  description: 'Trigger on incoming voice/video calls',
213
215
  },
214
216
  {
215
- displayName: 'Outgoing Message Sent From API',
216
- name: 'outgoing_message_api',
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
- displayName: 'Outgoing Message Sent From Phone',
221
- name: 'outgoing_message_phone',
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
- displayName: 'Receive All',
235
- name: 'all',
236
+ name: 'Receive All',
237
+ value: 'all',
236
238
  description: 'Process webhooks from all chats',
237
239
  },
238
240
  {
239
- displayName: 'Only From Chats',
240
- name: 'chats',
241
+ name: 'Only From Chats',
242
+ value: 'chats',
241
243
  description: 'Process webhooks only from personal chats',
242
244
  },
243
245
  {
244
- displayName: 'Only From Groups',
245
- name: 'groups',
246
+ name: 'Only From Groups',
247
+ value: 'groups',
246
248
  description: 'Process webhooks only from group chats',
247
249
  },
248
250
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n8n-nodes-chatflow",
3
- "version": "1.2.2",
3
+ "version": "1.2.4",
4
4
  "description": "n8n community nodes for Chatflow — send WhatsApp & Telegram messages and receive triggers",
5
5
  "author": "Chatflow",
6
6
  "license": "MIT",