mirror of
https://github.com/chatmail/core.git
synced 2026-04-17 21:46:35 +03:00
lots of small fixes from the reviews
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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![],
|
||||
|
||||
Reference in New Issue
Block a user