@peopl-health/nexus 1.7.2 → 1.7.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.
|
@@ -103,6 +103,8 @@ class TwilioProvider extends MessageProvider {
|
|
|
103
103
|
throw new Error('Message must have body, media URL, or content SID');
|
|
104
104
|
}
|
|
105
105
|
|
|
106
|
+
console.log('[TwilioProvider] Sending message', messageParams);
|
|
107
|
+
|
|
106
108
|
try {
|
|
107
109
|
const result = await this.twilioClient.messages.create(messageParams);
|
|
108
110
|
if (this.messageStorage && typeof this.messageStorage.saveMessage === 'function') {
|
|
@@ -39,7 +39,7 @@ class NexusMessaging {
|
|
|
39
39
|
// Message batching
|
|
40
40
|
this.pendingResponses = new Map();
|
|
41
41
|
this.batchingConfig = {
|
|
42
|
-
enabled: config.messageBatching?.enabled ??
|
|
42
|
+
enabled: config.messageBatching?.enabled ?? false,
|
|
43
43
|
baseWaitTime: config.messageBatching?.baseWaitTime ?? 15000,
|
|
44
44
|
randomVariation: config.messageBatching?.randomVariation ?? 5000
|
|
45
45
|
};
|
|
@@ -338,6 +338,7 @@ class NexusMessaging {
|
|
|
338
338
|
return await this.handleFlow(messageData);
|
|
339
339
|
} else {
|
|
340
340
|
// For regular messages, use batching if enabled
|
|
341
|
+
console.log('Batching config:', this.batchingConfig);
|
|
341
342
|
if (this.batchingConfig.enabled && chatId) {
|
|
342
343
|
return await this._handleWithBatching(messageData, chatId);
|
|
343
344
|
} else {
|