Skip to content

Commit

Permalink
refactor: update_msg_state: Don't avoid downgrading OutMdnRcvd to Out…
Browse files Browse the repository at this point in the history
…Delivered

`OutMdnRcvd` is a "virtual" message state now, only old messages can have this state in the db, so
`update_msg_state()` can be simplified.
  • Loading branch information
iequidoo committed Oct 11, 2024
1 parent 19be12a commit 4fbba7f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/message.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1826,8 +1826,8 @@ pub(crate) async fn update_msg_state(
context
.sql
.execute(
&format!("UPDATE msgs SET state=?1 {error_subst} WHERE id=?2 AND (?1!=?3 OR state<?3)"),
(state, msg_id, MessageState::OutDelivered),
&format!("UPDATE msgs SET state=? {error_subst} WHERE id=?"),
(state, msg_id),
)
.await?;
Ok(())
Expand Down

0 comments on commit 4fbba7f

Please sign in to comment.