diff options
Diffstat (limited to 'src/state')
| -rw-r--r-- | src/state/host.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/state/host.rs b/src/state/host.rs index 5751998..b4a785b 100644 --- a/src/state/host.rs +++ b/src/state/host.rs @@ -374,6 +374,11 @@ impl Host for AppState { ) -> impl Future<Output = Result<(), String>> + Send { let state = self.clone(); async move { + // Downloaded: looked at before Automerge applies it (`misplaced_author`). + if let Some(misplaced) = crate::document::changes::misplaced_author(change.raw_bytes()) + { + return Err(misplaced.to_string()); + } tokio::task::spawn_blocking(move || { let result = { let mut replica = state.doc.blocking_write(); |
