diff --git a/deltachat-ffi/deltachat.h b/deltachat-ffi/deltachat.h index 9a84c85f7..959b44d05 100644 --- a/deltachat-ffi/deltachat.h +++ b/deltachat-ffi/deltachat.h @@ -4428,7 +4428,7 @@ void dc_event_unref(dc_event_t* event); #define DC_STR_WELCOME_MESSAGE 71 #define DC_STR_UNKNOWN_SENDER_FOR_CHAT 72 #define DC_STR_SUBJECT_FOR_NEW_CONTACT 73 -#define FAILED_SENDING_TO 74 +#define DC_STR_FAILED_SENDING_TO 74 #define DC_STR_COUNT 74 diff --git a/src/message.rs b/src/message.rs index ad6d5027b..c54c21462 100644 --- a/src/message.rs +++ b/src/message.rs @@ -769,7 +769,7 @@ impl MessageState { MessageState::OutPreparing | MessageState::OutPending | MessageState::OutDelivered - | MessageState::OutMdnRcvd => true, + | MessageState::OutMdnRcvd => true, // OutMdnRcvd can still fail because it could be a group message and only some recipients failed. _ => false, } } @@ -1328,7 +1328,10 @@ 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 msg_state != MessageState::OutMdnRcvd && msg_state != MessageState::OutFailed { + if msg_state == MessageState::OutPreparing + || msg_state == MessageState::OutPending + || msg_state == MessageState::OutDelivered + { let mdn_already_in_table = context .sql .exists( @@ -1391,6 +1394,8 @@ pub async fn mdn_from_ext( None } +/// Marks a message as failed after an ndn (non-delivery-notification) arrived. +/// Where appropriate, also adds an info message telling the user which of the recipients of a group message failed. pub(crate) async fn ndn_from_ext( context: &Context, failed: &FailedMsg, diff --git a/src/mimeparser.rs b/src/mimeparser.rs index b9fe3792d..8d864c226 100644 --- a/src/mimeparser.rs +++ b/src/mimeparser.rs @@ -933,7 +933,9 @@ impl MimeMessage { None } - /// Handle reports (only MDNs for now) + /// Handle reports + /// (MDNs = Message Disposition Notification, the message was read + /// and NDNs = Non delivery notification, the message could not be delivered) pub async fn handle_reports( &self, context: &Context, diff --git a/src/sql.rs b/src/sql.rs index 5c54e6f68..a0c26e6e9 100644 --- a/src/sql.rs +++ b/src/sql.rs @@ -1242,7 +1242,7 @@ async fn open( sql.set_raw_config_int(context, "dbversion", 63).await?; } if dbversion < 64 { - info!(context, "[migration] v63"); + info!(context, "[migration] v64"); sql.execute( "ALTER TABLE msgs ADD COLUMN error TEXT DEFAULT '';", paramsv![],