From 164c6627a07b4aefbbf8e4398f2e44aeffd020a8 Mon Sep 17 00:00:00 2001 From: john Date: Wed, 1 Jul 2026 18:36:46 +0800 Subject: [PATCH] fix: register direct wechat sessions after start fallback --- wechat-mp.mjs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wechat-mp.mjs b/wechat-mp.mjs index 3e35a90..16ef1e2 100644 --- a/wechat-mp.mjs +++ b/wechat-mp.mjs @@ -1701,6 +1701,9 @@ export function createWechatMpService({ // `/agent/start` already persists the owning user and goosed node via the // portal proxy. Re-registering here without the node can overwrite the // correct mapping back to node 0 in multi-goosed production. + if (!startAgentSession && typeof userAuth.registerAgentSession === 'function') { + await userAuth.registerAgentSession(userId, sessionId); + } await reconcileAgentSession( (pathname, init) => fetchForSession(sessionId, pathname, init), sessionId,