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