mirror of
https://github.com/chatmail/core.git
synced 2026-04-22 07:56:29 +03:00
fix: add device message instead of partial message when receive_imf fails
This commit is contained in:
@@ -240,12 +240,11 @@ const MIME_AC_SETUP_FILE: &str = "application/autocrypt-setup";
|
||||
impl MimeMessage {
|
||||
/// Parse a mime message.
|
||||
///
|
||||
/// If `partial` is set, it contains the full message size in bytes and an optional error text
|
||||
/// for the partially downloaded message, and `body` contains the HEADER only.
|
||||
/// If `partial` is set, it contains the full message size in bytes.
|
||||
pub(crate) async fn from_bytes(
|
||||
context: &Context,
|
||||
body: &[u8],
|
||||
partial: Option<(u32, Option<String>)>,
|
||||
partial: Option<u32>,
|
||||
) -> Result<Self> {
|
||||
let mail = mailparse::parse_mail(body)?;
|
||||
|
||||
@@ -619,9 +618,9 @@ impl MimeMessage {
|
||||
};
|
||||
|
||||
match partial {
|
||||
Some((org_bytes, err)) => {
|
||||
Some(org_bytes) => {
|
||||
parser
|
||||
.create_stub_from_partial_download(context, org_bytes, err)
|
||||
.create_stub_from_partial_download(context, org_bytes)
|
||||
.await?;
|
||||
}
|
||||
None => match mail {
|
||||
|
||||
Reference in New Issue
Block a user