fix: gate paired runtime on dual registrations

This commit is contained in:
Eyejoker
2026-03-31 12:14:24 +09:00
parent 89335ab005
commit 236f7c2fea
4 changed files with 19 additions and 7 deletions

View File

@@ -1978,8 +1978,15 @@ export function getEffectiveRoomMode(chatJid: string): RoomMode {
return getExplicitRoomMode(chatJid) ?? inferRoomModeForJid(chatJid);
}
export function getEffectiveRuntimeRoomMode(chatJid: string): RoomMode {
return getEffectiveRoomMode(chatJid) === 'tribunal' &&
inferRoomModeForJid(chatJid) === 'tribunal'
? 'tribunal'
: 'single';
}
export function isPairedRoomJid(jid: string): boolean {
return getEffectiveRoomMode(jid) === 'tribunal';
return getEffectiveRuntimeRoomMode(jid) === 'tribunal';
}
// --- Paired task/project/workspace state ---