mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 19:20:43 +00:00
fix(whatsapp): stabilize auth state and reconcile local runtime after CLI login (#67815)
* WhatsApp: harden auth persistence and backup recovery * WhatsApp: model unstable auth state across runtime and setup * WhatsApp: recover login and monitor startup from unstable auth * Channels: surface auth stabilizing in status and health * Gateway protocol: add channels.start surface * Gateway: reconcile local channel runtime after CLI login * Channels UI: reflect recovered login start state * Changelog: note WhatsApp auth stabilization * Gateway: fix lint in call test
This commit is contained in:
@@ -41,16 +41,17 @@ export async function startWhatsAppLogin(state: ChannelsState, force: boolean) {
|
||||
}
|
||||
state.whatsappBusy = true;
|
||||
try {
|
||||
const res = await state.client.request<{ message?: string; qrDataUrl?: string }>(
|
||||
"web.login.start",
|
||||
{
|
||||
force,
|
||||
timeoutMs: 30000,
|
||||
},
|
||||
);
|
||||
const res = await state.client.request<{
|
||||
message?: string;
|
||||
qrDataUrl?: string;
|
||||
connected?: boolean;
|
||||
}>("web.login.start", {
|
||||
force,
|
||||
timeoutMs: 30000,
|
||||
});
|
||||
state.whatsappLoginMessage = res.message ?? null;
|
||||
state.whatsappLoginQrDataUrl = res.qrDataUrl ?? null;
|
||||
state.whatsappLoginConnected = null;
|
||||
state.whatsappLoginConnected = typeof res.connected === "boolean" ? res.connected : null;
|
||||
} catch (err) {
|
||||
state.whatsappLoginMessage = String(err);
|
||||
state.whatsappLoginQrDataUrl = null;
|
||||
|
||||
Reference in New Issue
Block a user