mirror of https://github.com/openclaw/openclaw.git
Gateway: coerce chat deliverable route boolean
This commit is contained in:
parent
9dab154519
commit
a939a15607
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue