mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 19:31:00 +00:00
fix(whatsapp): keep QR login state in sync
Keep WhatsApp QR login state synced across gateway, macOS, and UI wait flows. - Preserve the latest QR data URL/version while login polling rotates codes. - Keep the wait-result protocol bounded to current QR metadata. - Stabilize QR rendering and media fixture coverage after rebasing on main. Validation: - pnpm test extensions/whatsapp/src/login-qr.test.ts extensions/whatsapp/src/media.test.ts extensions/whatsapp/src/agent-tools-login.test.ts src/gateway/protocol/channels.schema.test.ts src/gateway/server-methods/web.start.test.ts ui/src/ui/controllers/channels.test.ts - pnpm test:extension whatsapp - cd apps/macos && swift test --filter ChannelsSettingsSmokeTests - GitHub PR checks: 62 success, 5 skipped
This commit is contained in:
@@ -324,6 +324,7 @@ export type ChannelLoginWithQrStartResult = {
|
||||
export type ChannelLoginWithQrWaitResult = {
|
||||
connected: boolean;
|
||||
message: string;
|
||||
qrDataUrl?: string;
|
||||
};
|
||||
|
||||
export type ChannelLogoutContext<ResolvedAccount = unknown> = {
|
||||
@@ -348,6 +349,7 @@ export type ChannelGatewayAdapter<ResolvedAccount = unknown> = {
|
||||
loginWithQrWait?: (params: {
|
||||
accountId?: string;
|
||||
timeoutMs?: number;
|
||||
currentQrDataUrl?: string;
|
||||
}) => Promise<ChannelLoginWithQrWaitResult>;
|
||||
logoutAccount?: (ctx: ChannelLogoutContext<ResolvedAccount>) => Promise<ChannelLogoutResult>;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user