refactor: prune legacy group targets

This commit is contained in:
Peter Steinberger
2026-01-17 09:01:36 +00:00
parent ae6792522d
commit bbb71c9198
15 changed files with 65 additions and 37 deletions

View File

@@ -131,7 +131,13 @@ function normalizeSessionEntry(entry: SessionEntryLike): SessionEntry | null {
typeof entry.updatedAt === "number" && Number.isFinite(entry.updatedAt)
? entry.updatedAt
: Date.now();
return { ...(entry as unknown as SessionEntry), sessionId, updatedAt };
const normalized = { ...(entry as unknown as SessionEntry), sessionId, updatedAt };
const rec = normalized as unknown as Record<string, unknown>;
if (typeof rec.groupChannel !== "string" && typeof rec.room === "string") {
rec.groupChannel = rec.room;
}
delete rec.room;
return normalized;
}
function emptyDirOrMissing(dir: string): boolean {