From e63d30c2581033a85489b10c3f5b252fdbb5049e Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 29 Nov 2026 03:21:43 +0000 Subject: state: plain writes take a view to write, Automerge's are asked for as such AppState::mutate_doc, mutate_doc_registering and mutate_doc_by hand what they are given a document::view::Write: the member registry, the users, sessions, forgetting and bootstrap write through them, and take whatever kind of document gives it. AppState::mutate_doc_for is for what asks more of an Automerge document than values at paths (the store's API, a remake's host, a store's events), and gives the heads after the write. What reads a view takes one of any size (dyn Write among them). --- src/api/peers.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/api/peers.rs') diff --git a/src/api/peers.rs b/src/api/peers.rs index fc203f5..586c32d 100644 --- a/src/api/peers.rs +++ b/src/api/peers.rs @@ -322,7 +322,7 @@ pub(crate) async fn delete_peer( // Named as who asked: rules by path judge the change by them (`access::rules`). let user = user.map(|axum::Extension(user)| user.0); state - .mutate_doc_for( + .mutate_doc_by( user, crate::document::signatures::Sign::Protocol, move |doc| { -- cgit v1.3.1