Skip to content

Free, Open Source, Self-Hosted WhatsApp API Gateway

docs(settings): name the real per-session reconnect cap

Yudhi Armyndharis29cb41d69386
diff --git a/openapi.json b/openapi.json
index 82b67d8c9..b54a229d6 100644
--- a/openapi.json
+++ b/openapi.json
@@ -13210,7 +13210,7 @@
},
"autoReconnect": {
"type": "boolean",
- "description": "Always true: the engine auto-reconnects on a transient disconnect and there is no global off switch — reconnection is bounded per session by RECONNECT_MAX_ATTEMPTS.",
+ "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).",
"example": true
},
"debugMode": {
diff --git a/src/modules/settings/dto/settings-response.dto.ts b/src/modules/settings/dto/settings-response.dto.ts
index 27855e71e..c69b88f70 100644
--- a/src/modules/settings/dto/settings-response.dto.ts
+++ b/src/modules/settings/dto/settings-response.dto.ts
@@ -16,7 +16,8 @@ export class SettingsGeneralDto {
@ApiProperty({
description:
'Always true: the engine auto-reconnects on a transient disconnect and there is no global off ' +
- 'switch — reconnection is bounded per session by RECONNECT_MAX_ATTEMPTS.',
+ 'switch. Attempts are unlimited by default; cap them per session with config.maxReconnectAttempts ' +
+ '(0-20, PATCH /api/sessions/{sessionId}/config).',
example: true,
})
autoReconnect!: boolean;
diff --git a/src/modules/settings/settings.controller.ts b/src/modules/settings/settings.controller.ts
index 0c69b277b..74bdf5585 100644
--- a/src/modules/settings/settings.controller.ts
+++ b/src/modules/settings/settings.controller.ts
@@ -39,7 +39,7 @@ 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; reconnection is bounded per-session by RECONNECT_MAX_ATTEMPTS). Reporting a hardcoded
+ // switch; attempts are unlimited unless a session sets config.maxReconnectAttempts). Reporting a hardcoded
// `false` for a non-existent `engine.autoReconnect` key was actively misleading.
autoReconnect: true,
debugMode: this.configService.get<boolean>('database.logging', false),