Skip to content

Commit

Permalink
Add local author to documents store
Browse files Browse the repository at this point in the history
  • Loading branch information
sandreae committed Dec 8, 2024
1 parent 9949e39 commit 53ba729
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/network.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ pub fn run() -> Result<(

let mut operations_store = MemoryStore::<LogId, AardvarkExtensions>::new();
let documents_store = TextDocumentStore::new();
documents_store
.write()
.authors
.insert(private_key.public_key(), vec![document_id.clone()]);

let sync = LogSyncProtocol::new(documents_store.clone(), operations_store.clone());
let sync_config = SyncConfiguration::<TextDocument>::new(sync);
Expand Down Expand Up @@ -161,7 +165,7 @@ pub fn run() -> Result<(
Ok(operation) => {
println!("RECEIVED {:?}", operation);
Some(operation)
},
}
Err(err) => {
println!("decode operation error: {err}");
None
Expand Down

0 comments on commit 53ba729

Please sign in to comment.