From a6168ce147859979f4cb0b1b14718a8586b074ac Mon Sep 17 00:00:00 2001 From: Vincent Koc Date: Fri, 6 Mar 2026 00:58:09 -0500 Subject: [PATCH] Gateway: normalize explicit deliver-route boolean --- src/gateway/server-methods/chat.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gateway/server-methods/chat.ts b/src/gateway/server-methods/chat.ts index 18c00f11118..e384006ae38 100644 --- a/src/gateway/server-methods/chat.ts +++ b/src/gateway/server-methods/chat.ts @@ -906,13 +906,14 @@ export const chatHandlers: GatewayRequestHandlers = { (isChannelScopedSession || hasLegacyChannelPeerShape)) || (isConfiguredMainSessionScope && client?.connect !== undefined && !isFromWebchatClient)), ); - const hasDeliverableRoute = + const hasDeliverableRoute = Boolean( shouldDeliverExternally && canInheritDeliverableRoute && routeChannelCandidate && routeChannelCandidate !== INTERNAL_MESSAGE_CHANNEL && typeof routeToCandidate === "string" && - routeToCandidate.trim().length > 0; + routeToCandidate.trim().length > 0, + ); const originatingChannel = hasDeliverableRoute ? routeChannelCandidate : INTERNAL_MESSAGE_CHANNEL;