fix(gateway): treat webchat last as whatsapp

This commit is contained in:
Peter Steinberger
2025-12-12 21:05:26 +00:00
parent e3b50b7d12
commit 211efffa10
2 changed files with 14 additions and 6 deletions

View File

@@ -1174,7 +1174,11 @@ export async function startGatewayServer(
const resolvedChannel = (() => {
if (requestedChannel === "last") {
return lastChannel ?? "whatsapp";
// WebChat is not a deliverable surface. Treat it as "unset" for routing,
// so VoiceWake and CLI callers don't get stuck with deliver=false.
return lastChannel && lastChannel !== "webchat"
? lastChannel
: "whatsapp";
}
if (
requestedChannel === "whatsapp" ||
@@ -1183,7 +1187,9 @@ export async function startGatewayServer(
) {
return requestedChannel;
}
return lastChannel ?? "whatsapp";
return lastChannel && lastChannel !== "webchat"
? lastChannel
: "whatsapp";
})();
const resolvedTo = (() => {