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/message/history.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/message/history.rs') diff --git a/src/message/history.rs b/src/message/history.rs index 7585e1c..d4d4500 100644 --- a/src/message/history.rs +++ b/src/message/history.rs @@ -4,12 +4,11 @@ use super::{ Id, Message, event::{Deleted, Event, Sent}, }; -use crate::event::{Instant, Sequence}; +use crate::event::Sequence; #[derive(Clone, Debug, Eq, PartialEq)] pub struct History { pub message: Message, - pub deleted: Option, } // State interface @@ -43,7 +42,7 @@ impl History { } fn deleted(&self) -> Option { - self.deleted.map(|instant| { + self.message.deleted.map(|instant| { Deleted { instant, id: self.message.id.clone(), -- cgit v1.2.3