diff --git a/src/chat.rs b/src/chat.rs index ba7f42816..4e7382be1 100644 --- a/src/chat.rs +++ b/src/chat.rs @@ -5182,7 +5182,7 @@ impl Context { return contact::mark_contact_id_as_verified( self, contact_id, - ContactId::SELF, + Some(ContactId::SELF), ) .await; } diff --git a/src/mimeparser.rs b/src/mimeparser.rs index 211b67e4b..7c0e5f4ee 100644 --- a/src/mimeparser.rs +++ b/src/mimeparser.rs @@ -1595,6 +1595,15 @@ impl MimeMessage { } } + pub fn replace_msg_by_error(&mut self, error_msg: &str) { + self.is_system_message = SystemMessage::Unknown; + if let Some(part) = self.parts.first_mut() { + part.typ = Viewtype::Text; + part.msg = format!("[{error_msg}]"); + self.parts.truncate(1); + } + } + pub(crate) fn get_rfc724_mid(&self) -> Option { self.get_header(HeaderDef::MessageId) .and_then(|msgid| parse_message_id(msgid).ok())