refactor: simplify redundant ternary in updateMessage (#13954)

This commit is contained in:
legao 2026-02-18 07:40:14 +08:00 committed by GitHub
parent a344a766fd
commit c56f4aa5d8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -579,7 +579,7 @@ export namespace Session {
})
export const updateMessage = fn(MessageV2.Info, async (msg) => {
const time_created = msg.role === "user" ? msg.time.created : msg.time.created
const time_created = msg.time.created
const { id, sessionID, ...data } = msg
Database.use((db) => {
db.insert(MessageTable)