mirror of
https://github.com/chatmail/core.git
synced 2026-05-20 15:26:30 +03:00
display failed messages
This commit is contained in:
committed by
holger krekel
parent
c5f64d2988
commit
70cef68eeb
@@ -117,11 +117,24 @@ impl<'a> MimeParser<'a> {
|
|||||||
);
|
);
|
||||||
|
|
||||||
if r == MAILIMF_NO_ERROR as libc::c_int && !self.mimeroot.is_null() {
|
if r == MAILIMF_NO_ERROR as libc::c_int && !self.mimeroot.is_null() {
|
||||||
let (encrypted, signatures, gossipped_addr) =
|
match e2ee::try_decrypt(self.context, self.mimeroot) {
|
||||||
e2ee::try_decrypt(self.context, self.mimeroot)?;
|
Ok((encrypted, signatures, gossipped_addr)) => {
|
||||||
self.encrypted = encrypted;
|
self.encrypted = encrypted;
|
||||||
self.signatures = signatures;
|
self.signatures = signatures;
|
||||||
self.gossipped_addr = gossipped_addr;
|
self.gossipped_addr = gossipped_addr;
|
||||||
|
}
|
||||||
|
Err(err) => {
|
||||||
|
// continue with the current, still encrypted, mime tree.
|
||||||
|
// unencrypted parts will be replaced by an error message
|
||||||
|
// that is added as "the message" to the chat then.
|
||||||
|
//
|
||||||
|
// if we just return here, the header is missing
|
||||||
|
// and the caller cannot display the message
|
||||||
|
// and try to assign the message to a chat
|
||||||
|
warn!(self.context, "decryption failed: {}", err);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
self.parse_mime_recursive(self.mimeroot);
|
self.parse_mime_recursive(self.mimeroot);
|
||||||
|
|
||||||
if let Some(field) = self.lookup_field("Subject") {
|
if let Some(field) = self.lookup_field("Subject") {
|
||||||
|
|||||||
@@ -65,12 +65,12 @@ pub unsafe fn dc_receive_imf(
|
|||||||
|
|
||||||
let mut mime_parser = MimeParser::new(context);
|
let mut mime_parser = MimeParser::new(context);
|
||||||
if let Err(err) = mime_parser.parse(imf_raw) {
|
if let Err(err) = mime_parser.parse(imf_raw) {
|
||||||
error!(context, "dc_receive_imf parse error: {}", err);
|
warn!(context, "dc_receive_imf parse error: {}", err);
|
||||||
};
|
};
|
||||||
|
|
||||||
if mime_parser.header.is_empty() {
|
if mime_parser.header.is_empty() {
|
||||||
// Error - even adding an empty record won't help as we do not know the message ID
|
// Error - even adding an empty record won't help as we do not know the message ID
|
||||||
info!(context, "No header.");
|
warn!(context, "No header.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user