fix: route voice wake to main

This commit is contained in:
Peter Steinberger
2025-12-20 15:30:45 +01:00
parent 066a2828c4
commit cf96ad8ef9
4 changed files with 53 additions and 4 deletions

View File

@@ -1800,8 +1800,10 @@ export async function startGatewayServer(
if (text.length > 20_000) return;
const sessionKeyRaw =
typeof obj.sessionKey === "string" ? obj.sessionKey.trim() : "";
const mainKey =
(loadConfig().inbound?.session?.mainKey ?? "main").trim() || "main";
const sessionKey =
sessionKeyRaw.length > 0 ? sessionKeyRaw : `node-${nodeId}`;
sessionKeyRaw.length > 0 ? sessionKeyRaw : mainKey;
const { storePath, store, entry } = loadSessionEntry(sessionKey);
const now = Date.now();
const sessionId = entry?.sessionId ?? randomUUID();