mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 01:01:23 +00:00
fix: fail-closed shared-session reply routing (#24571) (thanks @brandonwise)
This commit is contained in:
@@ -487,6 +487,16 @@ export const agentHandlers: GatewayRequestHandlers = {
|
||||
typeof request.threadId === "string" && request.threadId.trim()
|
||||
? request.threadId.trim()
|
||||
: undefined;
|
||||
const turnSourceChannel =
|
||||
typeof request.channel === "string" && request.channel.trim()
|
||||
? request.channel.trim()
|
||||
: undefined;
|
||||
const turnSourceTo =
|
||||
typeof request.to === "string" && request.to.trim() ? request.to.trim() : undefined;
|
||||
const turnSourceAccountId =
|
||||
typeof request.accountId === "string" && request.accountId.trim()
|
||||
? request.accountId.trim()
|
||||
: undefined;
|
||||
const deliveryPlan = resolveAgentDeliveryPlan({
|
||||
sessionEntry,
|
||||
requestedChannel: request.replyChannel ?? request.channel,
|
||||
@@ -494,6 +504,10 @@ export const agentHandlers: GatewayRequestHandlers = {
|
||||
explicitThreadId,
|
||||
accountId: request.replyAccountId ?? request.accountId,
|
||||
wantsDelivery,
|
||||
turnSourceChannel,
|
||||
turnSourceTo,
|
||||
turnSourceAccountId,
|
||||
turnSourceThreadId: explicitThreadId,
|
||||
});
|
||||
|
||||
let resolvedChannel = deliveryPlan.resolvedChannel;
|
||||
|
||||
Reference in New Issue
Block a user