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:
2026-04-29 17:11:19 +08:00
parent 7ca79723cd
commit 8dcd60b604
3 changed files with 25 additions and 3 deletions
@@ -53,7 +53,7 @@ function classifyFailure(input: PlatformFailureInput): PlatformFailureClassifica
}
if (
/(not_logged_in|unauthorized|unauthenticated|login redirect|login required|signin|sign in|expired|401|登录态失效|请先登录|未登录)/i
/(not_logged_in|unauthorized|unauthenticated|login redirect|login required|signin|sign in|expired|401|登录态失效|登录超时|请重新登录|请先登录|未登录)/i
.test(text)
) {
return "auth_failure";