diff --git a/apps/bot/src/whatsapp/session.ts b/apps/bot/src/whatsapp/session.ts index 88181d8..6cd2572 100644 --- a/apps/bot/src/whatsapp/session.ts +++ b/apps/bot/src/whatsapp/session.ts @@ -46,11 +46,11 @@ export async function startSession(params: { auth: state, browser: Browsers.macOS("Safari"), syncFullHistory: false, - // Default: 60 s for the first QR, 20 s for subsequent ones (~5 refs ≈ - // 2.5 min total before Baileys gives up). Set both legs to 60 s so - // the operator has the full ~5 min pairing window to scan, matching - // pair-handler's PAIR_TIMEOUT_MS. - qrTimeout: 60_000, + // Use Baileys' default QR cadence (60 s for the first ref, ~20 s for + // each subsequent ref) — that's the native WhatsApp Web cadence and + // each rotation just refreshes the displayed QR. The earlier "QR + // refresh every 5 s" bug was the session-manager reconnect loop, + // not the cadence. logger: logger.child({ accountId, component: "baileys" }) as never, });