From 9bd6d9862b1c243def02200bca2cfbf578ad2a2f Mon Sep 17 00:00:00 2001 From: Owen Jacobson Date: Fri, 4 Oct 2024 14:10:55 -0400 Subject: Clean up naming and semantics of history accessors. --- src/message/app.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/message/app.rs') diff --git a/src/message/app.rs b/src/message/app.rs index 33ea8ad..385c92e 100644 --- a/src/message/app.rs +++ b/src/message/app.rs @@ -35,16 +35,13 @@ impl<'a> Messages<'a> { .await .not_found(|| SendError::ChannelNotFound(channel.clone()))?; let sent = tx.sequence().next(sent_at).await?; - let message = tx - .messages() - .create(&channel.snapshot(), sender, &sent, body) - .await?; + let message = tx.messages().create(&channel, sender, &sent, body).await?; tx.commit().await?; self.events .broadcast(message.events().map(Event::from).collect::>()); - Ok(message.snapshot()) + Ok(message.as_sent()) } pub async fn delete(&self, message: &Id, deleted_at: &DateTime) -> Result<(), DeleteError> { -- cgit v1.2.3