diff options
| author | Kit La Touche <kit@transneptune.net> | 2024-10-04 22:39:08 -0400 |
|---|---|---|
| committer | Kit La Touche <kit@transneptune.net> | 2024-10-04 22:39:08 -0400 |
| commit | 9926f91762154be9f26ef12518545da049ed422c (patch) | |
| tree | 3137b9c34d848900855f94351337afd22f4a69e6 /src/message/app.rs | |
| parent | 9430825290ba345201546e35578891468da87265 (diff) | |
| parent | 9bd6d9862b1c243def02200bca2cfbf578ad2a2f (diff) | |
Merge branch 'main' into feature-frontend
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> { |
