fix: register direct wechat sessions after start fallback

This commit is contained in:
john
2026-07-01 18:36:46 +08:00
parent c0ed894cff
commit 164c6627a0
+3
View File
@@ -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,