ref: revert update types

This commit is contained in:
Steve Korshakov 2025-07-13 15:12:55 -07:00
parent 58e5d13fee
commit 98d14fc1d6

View File

@ -388,6 +388,12 @@ export async function startApi() {
return;
}
// Create encrypted message
const msgContent: PrismaJson.SessionMessageContent = {
t: 'encrypted',
c: message
};
// Start transaction to ensure consistency
const result = await db.$transaction(async (tx) => {
@ -421,7 +427,7 @@ export async function startApi() {
data: {
sessionId: sid,
seq: msgSeq,
content: message
content: msgContent
}
});
@ -432,7 +438,7 @@ export async function startApi() {
message: {
id: msg.id,
seq: msg.seq,
content: message,
content: msgContent,
createdAt: msg.createdAt.getTime(),
updatedAt: msg.updatedAt.getTime()
}