From 53944ef14af4d37c08464cb1bb9f3a8f09277194 Mon Sep 17 00:00:00 2001 From: Owen Jacobson Date: Thu, 21 Aug 2025 23:47:15 -0400 Subject: Collapse redundant "deleted_at" timestaps and "deleted" event instants. These were separated as there wasn't an obvious way to serialize two fields with the same _type_ with different _prefixes_. Turns out this is a common problem, and someone's written a crate for it that remaps the names for you. --- src/conversation/history.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/conversation/history.rs') diff --git a/src/conversation/history.rs b/src/conversation/history.rs index 601614c..746a1b0 100644 --- a/src/conversation/history.rs +++ b/src/conversation/history.rs @@ -4,12 +4,11 @@ use super::{ Conversation, Id, event::{Created, Deleted, Event}, }; -use crate::event::{Instant, Sequence}; +use crate::event::Sequence; #[derive(Clone, Debug, Eq, PartialEq)] pub struct History { pub conversation: Conversation, - pub deleted: Option, } // State interface @@ -58,7 +57,7 @@ impl History { } fn deleted(&self) -> Option { - self.deleted.map(|instant| { + self.conversation.deleted.map(|instant| { Deleted { instant, id: self.conversation.id.clone(), -- cgit v1.2.3