diff options
| author | Owen Jacobson <owen@grimoire.ca> | 2025-06-20 19:47:46 -0400 |
|---|---|---|
| committer | Owen Jacobson <owen@grimoire.ca> | 2025-06-20 22:42:55 -0400 |
| commit | 7778cdf0c495a04f4f5f3f85b78348c8037a5771 (patch) | |
| tree | bd0e00d36ab1863f5609a3c0ee8936782ae794ca /src/user | |
| parent | 639f4b422adb0a6fc809161dd816d8382cf88138 (diff) | |
Remove the snapshot fields from `/api/boot`.
Clients now _must_ construct their state from the event stream; it is no longer possible for them to delegate that work to the server.
Diffstat (limited to 'src/user')
| -rw-r--r-- | src/user/history.rs | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/user/history.rs b/src/user/history.rs index ae7a561..72e0aee 100644 --- a/src/user/history.rs +++ b/src/user/history.rs @@ -2,7 +2,7 @@ use super::{ Id, User, event::{Created, Event}, }; -use crate::event::{Instant, Sequence}; +use crate::event::Instant; #[derive(Clone, Debug, Eq, PartialEq)] pub struct History { @@ -24,12 +24,6 @@ impl History { self.user.clone() } - pub fn as_of(&self, resume_point: Sequence) -> Option<User> { - self.events() - .filter(Sequence::up_to(resume_point)) - .collect() - } - // Snapshot of this user, as of all events recorded in this history. pub fn as_snapshot(&self) -> Option<User> { self.events().collect() |
