n8n-nodes-idb2b 3.2.0 → 3.2.1

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.
@@ -111,11 +111,9 @@ class IDB2B {
111
111
  if (!validation.isValid) {
112
112
  throw new Error(validation.error);
113
113
  }
114
- const contactData = Object.assign({ name }, additionalFields);
114
+ const contactData = Object.assign({ name, phone_number: phone_number || "" }, additionalFields);
115
115
  if (email)
116
116
  contactData.email = email;
117
- if (phone_number)
118
- contactData.phone_number = phone_number;
119
117
  body = (0, common_1.buildContactRequestBody)(contactData);
120
118
  initialBody = body;
121
119
  }
@@ -122,12 +122,9 @@ function buildContactRequestBody(data, includesPhone = true) {
122
122
  if (trimmedEmail !== "")
123
123
  body.email = trimmedEmail;
124
124
  }
125
- // Include phone if provided
126
- if (includesPhone &&
127
- data.phone_number !== undefined &&
128
- data.phone_number !== null &&
129
- data.phone_number !== "") {
130
- body.phone_number = data.phone_number;
125
+ // Always include phone_number as a string (API requires it)
126
+ if (includesPhone) {
127
+ body.phone_number = (data.phone_number != null && data.phone_number !== "") ? String(data.phone_number) : "";
131
128
  }
132
129
  // Handle tags specially - convert from fixedCollection format
133
130
  if (data.tags && data.tags.tag && Array.isArray(data.tags.tag)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n8n-nodes-idb2b",
3
- "version": "3.2.0",
3
+ "version": "3.2.1",
4
4
  "description": "n8n community node for IDB2B - WhatsApp AI Agents",
5
5
  "main": "index.js",
6
6
  "scripts": {