message: fix: use PureReplace instead of PureInsert when id exists already
diff: @@ -335,6 +335,21 @@ export function* handleRecursiveInserts(
  } else {
  state = plugin.state.deserialize(doc.state, helpers)
  }
  + const existingDoc: SelectorReturnType<typeof getDocument> = yield select(scopeSelector(getDocument, scope), doc.id)
  + if (existingDoc) {
  + actions.push({
  + action: pureReplace({
  + id: doc.id,
  + plugin: doc.plugin,
  + state,
  + })(scope),
  + reverse: pureReplace({
  + id: doc.id,
  + plugin: existingDoc.plugin,
  + state: existingDoc.state
  + })(scope)
  + })
  + } else {
  actions.push({
  action: pureInsert({
  id: doc.id,
  @@ -344,5 +359,6 @@ export function* handleRecursiveInserts(
  reverse: pureRemove(doc.id)(scope),
  })
  }
  + }
  return [actions, result] as [ReversibleAction[], unknown]
  }
  