Private AI meeting notes that stay on your computer. No meeting bot. Free and open source for Mac, Windows and Linux. An alternative to Granola, Otter and Fireflies.
TypeScript ai-meeting-assistantai-notetakerelectrongranola-alternativelinuxllama-cpplocal-ailocal-firstmacosmcpmeeting-minutesmeeting-notesoffline-firstopen-sourceprivacyspeech-to-texttranscriptionwhisperwhisper-cppwindows
Store: an imported meeting keeps its id in the app it came from, so it can be found again
christianmat1ac5ef04d83e
diff --git a/app/src/main/store.ts b/app/src/main/store.tsindex 281435dd..77a08c10 100644--- a/app/src/main/store.ts+++ b/app/src/main/store.ts@@ -322,8 +322,8 @@ export class Store {const ownEmail = m.eventId ? ownAddress(m.ownEmail) : nullthis.rememberOwnEmail(ownEmail)const titleSource = m.titleSource ?? sourceOf(m.title, m.eventId)- this.db.prepare('INSERT INTO meetings (id, title, started_at, ended_at, event_id, app, attendees, state, language, title_source, duration_ms, event_started_at, event_ended_at, event_title, event_calendar_name, event_calendar_source, source, transcription_pending, own_email, keep_attendees) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)')- .run(id, m.title, m.startedAt, m.endedAt, m.eventId, m.app, JSON.stringify(m.attendees), m.state, language, titleSource, m.durationMs ?? null, m.eventStartedAt ?? null, m.eventEndedAt ?? null, m.eventTitle ?? null, m.eventCalendarName ?? null, m.eventCalendarSource ?? null, m.source ?? null, Number(!!m.transcriptionPending), ownEmail, Number(!!m.keepAttendees))+ this.db.prepare('INSERT INTO meetings (id, title, started_at, ended_at, event_id, app, attendees, state, language, title_source, duration_ms, event_started_at, event_ended_at, event_title, event_calendar_name, event_calendar_source, source, source_id, transcription_pending, own_email, keep_attendees) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)')+ .run(id, m.title, m.startedAt, m.endedAt, m.eventId, m.app, JSON.stringify(m.attendees), m.state, language, titleSource, m.durationMs ?? null, m.eventStartedAt ?? null, m.eventEndedAt ?? null, m.eventTitle ?? null, m.eventCalendarName ?? null, m.eventCalendarSource ?? null, m.source ?? null, m.sourceId ?? null, Number(!!m.transcriptionPending), ownEmail, Number(!!m.keepAttendees))rememberPeople(this.db, m.attendees)return this.meeting(id)!}@@ -391,6 +391,11 @@ export class Store {const r = this.db.prepare('SELECT * FROM meetings WHERE id = ?').get(id) as Row | undefinedreturn r ? this.readMeeting(r) : undefined}+ /** a meeting brought in from another app, by that app's own id for it (backups and imports keep it) */+ meetingFromSource(source: string, sourceId: string): Meeting | undefined {+ const r = this.db.prepare('SELECT * FROM meetings WHERE source = ? AND source_id = ? LIMIT 1').get(source, sourceId) as Row | undefined+ return r ? this.readMeeting(r) : undefined+ }/** EventKit ids include the occurrence date, so recurring meetings keep separate notes. */meetingForEvent(eventId: string): Meeting | undefined {const r = this.db.prepare('SELECT * FROM meetings WHERE event_id = ? AND trashed_at IS NULL ORDER BY started_at DESC, rowid DESC LIMIT 1').get(eventId) as Row | undefineddiff --git a/app/test/store.test.ts b/app/test/store.test.tsindex 0ede884d..c6b5dfce 100644--- a/app/test/store.test.ts+++ b/app/test/store.test.ts@@ -530,3 +530,11 @@ it('a store already marked by 0.3.31 (only stopped meetings) is marked again fors.close()rmSync(dir, { recursive: true, force: true })})++it('keeps where an imported meeting came from, and its id there, so it is brought in once', () => {+ const s = fresh()+ const m = s.createMeeting({ ...base, state: 'done', startedAt: 1000, source: 'import', sourceId: 'granola-123' })+ expect(s.meeting(m.id)).toMatchObject({ source: 'import', sourceId: 'granola-123' })+ expect(s.meetingFromSource('import', 'granola-123')?.id).toBe(m.id)+ expect(s.meetingFromSource('import', 'other')).toBeUndefined()+})