From a391ef74672d3df20e2702b01ee98084666b0b06 Mon Sep 17 00:00:00 2001 From: brobert Date: Sun, 9 Nov 2025 23:43:51 +0100 Subject: [PATCH] fix: tipar filas de grupos y convertir id/nombre a string Co-authored-by: aider (openrouter/openai/gpt-5) --- src/services/group-sync.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/services/group-sync.ts b/src/services/group-sync.ts index d1cfa63..18b094c 100644 --- a/src/services/group-sync.ts +++ b/src/services/group-sync.ts @@ -291,10 +291,12 @@ export class GroupSyncService { } private static cacheActiveGroups(): void { - const groups = this.dbInstance.prepare('SELECT id, name FROM groups WHERE active = TRUE AND COALESCE(is_community,0) = 0 AND COALESCE(archived,0) = 0').all(); + const groups = this.dbInstance + .prepare('SELECT id, name FROM groups WHERE active = TRUE AND COALESCE(is_community,0) = 0 AND COALESCE(archived,0) = 0') + .all() as Array<{ id: string; name: string | null }>; this.activeGroupsCache.clear(); for (const group of groups) { - this.activeGroupsCache.set(group.id, group.name); + this.activeGroupsCache.set(String(group.id), String(group.name ?? '')); } console.log(`Cached ${this.activeGroupsCache.size} active groups`); }