diff options
Diffstat (limited to 'src/api')
| -rw-r--r-- | src/api/changes.rs | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/api/changes.rs b/src/api/changes.rs index ee6a74a..419f5ed 100644 --- a/src/api/changes.rs +++ b/src/api/changes.rs @@ -1,7 +1,7 @@ //! `GET /admin/changes[/<path>]`: who wrote what, newest first, of the whole document //! or of what is at a path (as `/store/<path>` names it). Every change names the node that -//! made it (its author) and, for a write through the API, the user it was made for (its -//! message), with when (its writer's clock) and the store paths it touched +//! committed it (its author) and, for a write through the API, the user who wrote it (in +//! its message, `User:`), with when (its writer's clock) and the store paths it touched //! (`document::replica::Writer`). Every node holds every change, so any node answers //! for the whole swarm, as far as it has synced. @@ -123,7 +123,11 @@ fn changes( .author .as_ref() .and_then(|author| String::from_utf8(author.as_bytes().to_vec()).ok()), - user: meta.message.as_ref().map(|message| message.to_string()), + user: meta + .message + .as_deref() + .and_then(crate::document::replica::user_of) + .map(str::to_owned), paths: paths.iter().map(|path| path.join("/")).collect(), }); } |
