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`); }