diff --git a/apps/desktop-client/src/main/account-health.ts b/apps/desktop-client/src/main/account-health.ts index 35d0151..a0fb819 100644 --- a/apps/desktop-client/src/main/account-health.ts +++ b/apps/desktop-client/src/main/account-health.ts @@ -611,7 +611,7 @@ async function runDueProbes(): Promise { const trigger = record.suspectedExpiredAt ? "confirm" : "scheduled"; void enqueueAccountProbe(account, { trigger, - allowSilentRefresh: false, + allowSilentRefresh: true, }).catch((error) => { console.warn("[desktop-account-health] scheduled probe failed", { accountId: account.id, @@ -946,7 +946,7 @@ export async function reportAccountFailure( return await performProbeLocked(account, { trigger: "confirm", - allowSilentRefresh: false, + allowSilentRefresh: true, }); }); } diff --git a/apps/desktop-client/src/main/platform-auth-adapters.test.ts b/apps/desktop-client/src/main/platform-auth-adapters.test.ts index 3fd2c32..3339f35 100644 --- a/apps/desktop-client/src/main/platform-auth-adapters.test.ts +++ b/apps/desktop-client/src/main/platform-auth-adapters.test.ts @@ -70,7 +70,7 @@ describe("platform auth adapters", () => { ).toBe("auth_failure"); }); - it("classifies Wangyihao missing token as auth failure", () => { + it("does not classify Wangyihao publish token misses as auth failure", () => { const adapter = getPlatformAdapter("wangyihao"); expect( @@ -79,7 +79,7 @@ describe("platform auth adapters", () => { code: "wangyihao_token_missing", }, }), - ).toBe("auth_failure"); + ).toBe("ok"); }); it("classifies Weixin GZH verification as challenge", () => { diff --git a/apps/desktop-client/src/main/platform-auth-adapters.ts b/apps/desktop-client/src/main/platform-auth-adapters.ts index 7a9c189..08474c4 100644 --- a/apps/desktop-client/src/main/platform-auth-adapters.ts +++ b/apps/desktop-client/src/main/platform-auth-adapters.ts @@ -167,9 +167,12 @@ function classifyJuejinFailure(input: PlatformFailureInput): PlatformFailureClas function classifyWangyihaoFailure(input: PlatformFailureInput): PlatformFailureClassification { const code = typeof input.error?.code === "string" ? input.error.code : ""; - if (code === "wangyihao_not_logged_in" || code === "wangyihao_token_missing") { + if (code === "wangyihao_not_logged_in") { return "auth_failure"; } + if (code === "wangyihao_token_missing") { + return "ok"; + } if (code === "wangyihao_challenge_required") { return "challenge"; }