fix: tipar filas de grupos y convertir id/nombre a string

Co-authored-by: aider (openrouter/openai/gpt-5) <aider@aider.chat>
main
brobert 1 month ago
parent dab7e8fa9d
commit a391ef7467

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

Loading…
Cancel
Save