mirror of
https://github.com/chatmail/core.git
synced 2026-04-26 18:06:35 +03:00
Return true for MessageState::OutMdnRcvd.can_fail() because it could be a group message and only some recipients failed
This commit is contained in:
@@ -766,9 +766,10 @@ impl From<MessageState> for LotState {
|
||||
impl MessageState {
|
||||
pub fn can_fail(self) -> bool {
|
||||
match self {
|
||||
MessageState::OutPreparing | MessageState::OutPending | MessageState::OutDelivered => {
|
||||
true
|
||||
}
|
||||
MessageState::OutPreparing
|
||||
| MessageState::OutPending
|
||||
| MessageState::OutDelivered
|
||||
| MessageState::OutMdnRcvd => true,
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
@@ -1327,10 +1328,7 @@ pub async fn mdn_from_ext(
|
||||
if let Ok((msg_id, chat_id, chat_type, msg_state)) = res {
|
||||
let mut read_by_all = false;
|
||||
|
||||
// if already marked as MDNS_RCVD msgstate_can_fail() returns false.
|
||||
// however, it is important, that ret_msg_id is set above as this
|
||||
// will allow the caller eg. to move the message away
|
||||
if msg_state.can_fail() {
|
||||
if msg_state != MessageState::OutMdnRcvd && msg_state != MessageState::OutFailed {
|
||||
let mdn_already_in_table = context
|
||||
.sql
|
||||
.exists(
|
||||
|
||||
Reference in New Issue
Block a user