refactor: centralize main session key resolution

This commit is contained in:
Peter Steinberger
2026-01-09 22:13:16 +01:00
parent c37b77855b
commit 6220106ab2
6 changed files with 18 additions and 15 deletions

View File

@@ -23,7 +23,7 @@ import {
import { buildConfigSchema } from "../config/schema.js";
import {
loadSessionStore,
resolveMainSessionKey,
resolveMainSessionKeyFromConfig,
type SessionEntry,
saveSessionStore,
} from "../config/sessions.js";
@@ -472,7 +472,7 @@ export function createBridgeHandlers(ctx: BridgeHandlersContext) {
};
}
const mainKey = resolveMainSessionKey(loadConfig());
const mainKey = resolveMainSessionKeyFromConfig();
if (key === mainKey) {
return {
ok: false,