aboutsummaryrefslogtreecommitdiffstats
path: root/src/document/replica.rs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-07 22:35:21 +0100
committertv <tv@krebsco.de>2026-11-07 22:35:21 +0100
commit1a5b5ea02909e6c176ebd85d395e47fe15fcdba0 (patch)
tree0e365788ce87a372353aae7a03403af0daf284d4 /src/document/replica.rs
parent046b738c74f62469f7a080415690e2dacd85e1e6 (diff)
remake: replays keep their writers
A remake's replay writes each value as the user who wrote it, splitting where several users wrote under a path, so replays are judged as the original writes. Auth plan M6 (remakes, 2.4).
Diffstat (limited to 'src/document/replica.rs')
-rw-r--r--src/document/replica.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/document/replica.rs b/src/document/replica.rs
index ead42f6..a409969 100644
--- a/src/document/replica.rs
+++ b/src/document/replica.rs
@@ -385,7 +385,7 @@ pub(crate) const USER_TRAILER: &str = "User";
impl Writer<'_> {
/// The change's message: its trailers (`trailers`), if it has any.
- fn message(&self) -> Option<String> {
+ pub(crate) fn message(&self) -> Option<String> {
self.user.map(|user| format!("{USER_TRAILER}: {user}"))
}
}
@@ -481,7 +481,7 @@ fn run<T, E>(
/// Makes `node` the author of `doc`'s changes from now on. Setting an author gives the
/// document a new actor; this node keeps its own (`with_actor`), which it tracks
/// (`RemakeState::own_actors`, the document file), as only it writes with it.
-fn authored(doc: &mut Document, node: &str) {
+pub(crate) fn authored(doc: &mut Document, node: &str) {
if doc
.get_author()
.is_some_and(|author| author.as_bytes() == node.as_bytes())