From 796b0d77525a18ddf34deb6f7b9cc9c975b448b2 Mon Sep 17 00:00:00 2001 From: iequidoo Date: Fri, 11 Oct 2024 10:33:20 -0300 Subject: [PATCH] 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. --- src/message.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/message.rs b/src/message.rs index a9fd70cd7..92c5b5c16 100644 --- a/src/message.rs +++ b/src/message.rs @@ -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