fix: fix localId

This commit is contained in:
Steve Korshakov 2025-07-18 23:02:35 -07:00
parent 4e14898e97
commit c17aaf25cb

View File

@ -809,8 +809,10 @@ export async function startApi() {
const existing = await tx.sessionMessage.findFirst({ const existing = await tx.sessionMessage.findFirst({
where: { sessionId: sid, localId: useLocalId } where: { sessionId: sid, localId: useLocalId }
}); });
if (existing) {
return { msg: existing, update: null }; return { msg: existing, update: null };
} }
}
// Create message // Create message
const msg = await tx.sessionMessage.create({ const msg = await tx.sessionMessage.create({