Free, Open Source, Self-Hosted WhatsApp API Gateway
TypeScript apibotgatewayself-hostedwhatsappwhatsapp-apiwhatsapp-automationwhatsapp-botwhatsapp-gatewaywhatsapp-gateway-apiwhatsapp-webwhatsapp-web-api
docs(settings): qualify the reconnect cap on Baileys
Yudhi Armyndharisab6ebdd07874
diff --git a/src/modules/settings/dto/settings-response.dto.ts b/src/modules/settings/dto/settings-response.dto.tsindex c69b88f70..cdb72d1af 100644--- a/src/modules/settings/dto/settings-response.dto.ts+++ b/src/modules/settings/dto/settings-response.dto.ts@@ -17,7 +17,9 @@ export class SettingsGeneralDto {description:'Always true: the engine auto-reconnects on a transient disconnect and there is no global off ' +'switch. Attempts are unlimited by default; cap them per session with config.maxReconnectAttempts ' +- '(0-20, PATCH /api/sessions/{sessionId}/config).',+ '(0-20, PATCH /api/sessions/{sessionId}/config). The cap bounds every reconnect on whatsapp-web.js; ' ++ 'on Baileys it bounds only the reconnect after a logged-out close, and the engine retries a transient ' ++ 'drop itself with no cap.',example: true,})autoReconnect!: boolean;diff --git a/src/modules/settings/settings.controller.ts b/src/modules/settings/settings.controller.tsindex 74bdf5585..375a8b1dc 100644--- a/src/modules/settings/settings.controller.ts+++ b/src/modules/settings/settings.controller.ts@@ -39,7 +39,8 @@ export class SettingsController {// use), not a hardcoded localhost guess that ignores the operator's configured host.apiBaseUrl: process.env.BASE_URL || `http://localhost:${port}`,// The engine auto-reconnects on a transient disconnect by default (there is no global off- // switch; attempts are unlimited unless a session sets config.maxReconnectAttempts). Reporting a hardcoded+ // switch; attempts are unlimited unless a session sets config.maxReconnectAttempts, which on+ // Baileys bounds only the reconnect after a logged-out close, not a transient drop). Reporting a hardcoded// `false` for a non-existent `engine.autoReconnect` key was actively misleading.autoReconnect: true,debugMode: this.configService.get<boolean>('database.logging', false),