refactor: update_msg_state: Don't avoid downgrading OutMdnRcvd to OutDelivered

`OutMdnRcvd` is a "virtual" message state now, only old messages can have this state in the db, so
`update_msg_state()` can be simplified.
This commit is contained in:
iequidoo
2024-10-11 10:33:20 -03:00
committed by iequidoo
parent 2ea5c86a5a
commit 796b0d7752

View File

@@ -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(())