fix: turn check runs independently of evaluateDecision
Turn order should be enforced for ALL messages, not just non-human ones. Previously, human messages bypassed turn check because they go through human_list_sender path with shouldUseNoReply=false. Now turn check always runs when channel has turn state.
This commit is contained in:
@@ -607,8 +607,9 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Turn-based check: if channel has turn order, only current speaker can respond
|
// Turn-based check: ALWAYS check turn order regardless of evaluateDecision result.
|
||||||
if (!rec.decision.shouldUseNoReply && derived.channelId) {
|
// This ensures only the current speaker can respond even for human messages.
|
||||||
|
if (derived.channelId) {
|
||||||
ensureTurnOrder(api, derived.channelId);
|
ensureTurnOrder(api, derived.channelId);
|
||||||
const accountId = resolveAccountId(api, ctx.agentId || "");
|
const accountId = resolveAccountId(api, ctx.agentId || "");
|
||||||
if (accountId) {
|
if (accountId) {
|
||||||
|
|||||||
Reference in New Issue
Block a user