fix: await cleanupRevert() to prevent dupe msgs after undo (#2572)

This commit is contained in:
Stephen Murray
2025-09-12 19:42:39 -04:00
committed by GitHub
parent c8f4d54f7f
commit c02f58c2af

View File

@@ -463,7 +463,7 @@ export namespace Session {
// Process revert cleanup first, before creating new messages
const session = await get(input.sessionID)
if (session.revert) {
cleanupRevert(session)
await cleanupRevert(session)
}
const userMsg: MessageV2.Info = {
id: input.messageID ?? Identifier.ascending("message"),
@@ -1131,7 +1131,7 @@ export namespace Session {
using abort = lock(input.sessionID)
const session = await get(input.sessionID)
if (session.revert) {
cleanupRevert(session)
await cleanupRevert(session)
}
const userMsg: MessageV2.User = {
id: Identifier.ascending("message"),