fix(desktop/weixin-gzh): tolerate numeric appMsgId and classify login timeout
The MP draft API sometimes returns appMsgId as a number or under the appmsgid alias; coerce both shapes before treating the response as a success. Also extend the platform auth adapter to recognize 登录超时/ 请重新登录 wording so the runtime drives the account back to re-auth. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -94,6 +94,16 @@ describe("platform auth adapters", () => {
|
||||
).toBe("challenge");
|
||||
});
|
||||
|
||||
it("classifies Weixin GZH login timeout as auth failure", () => {
|
||||
const adapter = getPlatformAdapter("weixin_gzh");
|
||||
|
||||
expect(
|
||||
adapter.classifyFailure({
|
||||
message: "登录超时,请重新登录",
|
||||
}),
|
||||
).toBe("auth_failure");
|
||||
});
|
||||
|
||||
it("classifies ZOL missing login as auth failure", () => {
|
||||
const adapter = getPlatformAdapter("zol");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user