diff options
| author | Owen Jacobson <owen@grimoire.ca> | 2024-10-04 14:10:55 -0400 |
|---|---|---|
| committer | Owen Jacobson <owen@grimoire.ca> | 2024-10-04 14:10:55 -0400 |
| commit | 9bd6d9862b1c243def02200bca2cfbf578ad2a2f (patch) | |
| tree | 44d20c937eee728e9b33ff093b3945a3ab2593dd /src/message/app.rs | |
| parent | 7f12fd41c2941a55a6437f24e4f780104a718790 (diff) | |
Clean up naming and semantics of history accessors.
Diffstat (limited to 'src/message/app.rs')
| -rw-r--r-- | src/message/app.rs | 7 |
1 files changed, 2 insertions, 5 deletions
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::<Vec<_>>()); - Ok(message.snapshot()) + Ok(message.as_sent()) } pub async fn delete(&self, message: &Id, deleted_at: &DateTime) -> Result<(), DeleteError> { |
