Audit outbound delivery and fix reviewer turn routing

This commit is contained in:
ejclaw
2026-04-10 15:22:45 +09:00
parent c67bd1c622
commit 2e62e125ae
10 changed files with 457 additions and 10 deletions

View File

@@ -26,8 +26,13 @@ export function buildRoomRoleContext(
arbiter: arbiterServiceId === normalizedServiceId,
};
const canHonorPreferredRole =
preferredRole === 'owner' ||
(preferredRole === 'reviewer' && reviewerServiceId !== null) ||
(preferredRole === 'arbiter' && arbiterServiceId !== undefined);
const role =
preferredRole && matches[preferredRole]
preferredRole && canHonorPreferredRole
? preferredRole
: matches.arbiter
? 'arbiter'