mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-12 07:20:45 +00:00
Gateway: coerce chat deliverable route boolean
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user