From c17aaf25cb2494fb5638fa0782c54f52295fb672 Mon Sep 17 00:00:00 2001 From: Steve Korshakov Date: Fri, 18 Jul 2025 23:02:35 -0700 Subject: [PATCH] fix: fix localId --- sources/app/api.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/app/api.ts b/sources/app/api.ts index 13811bd..9f72cf7 100644 --- a/sources/app/api.ts +++ b/sources/app/api.ts @@ -809,7 +809,9 @@ export async function startApi() { const existing = await tx.sessionMessage.findFirst({ where: { sessionId: sid, localId: useLocalId } }); - return { msg: existing, update: null }; + if (existing) { + return { msg: existing, update: null }; + } } // Create message