refactor: prefer room_settings over registered_groups in runtime reads
This commit is contained in:
@@ -2770,7 +2770,12 @@ function canRunTribunalFromRegisteredAgentTypes(
|
||||
}
|
||||
|
||||
export function getEffectiveRuntimeRoomMode(chatJid: string): RoomMode {
|
||||
return getEffectiveRoomMode(chatJid) === 'tribunal' &&
|
||||
const stored = getStoredRoomSettings(chatJid);
|
||||
if (stored) {
|
||||
return stored.roomMode;
|
||||
}
|
||||
|
||||
return inferStoredRoomModeForJid(chatJid) === 'tribunal' &&
|
||||
canRunTribunalFromRegisteredAgentTypes(
|
||||
getRegisteredAgentTypesForJid(chatJid),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user