add hop info

add hop info creation

Save it to the db

format and fix clippy

replace `and_then` with simple check

cargo fmt

chage table to get info from
This commit is contained in:
Sebastian
2021-07-08 21:24:13 +02:00
committed by Sebastian Klähn
parent 5e29cae81a
commit d185318f46
5 changed files with 68 additions and 2 deletions

View File

@@ -15,7 +15,7 @@ use crate::blob::BlobObject;
use crate::constants::{Viewtype, DC_DESIRED_TEXT_LEN, DC_ELLIPSIS};
use crate::contact::addr_normalize;
use crate::context::Context;
use crate::dc_tools::{dc_get_filemeta, dc_truncate};
use crate::dc_tools::{dc_get_filemeta, dc_truncate, parse_receive_headers};
use crate::dehtml::dehtml;
use crate::e2ee;
use crate::events::EventType;
@@ -78,6 +78,8 @@ pub struct MimeMessage {
/// This is non-empty only if the message was actually encrypted. It is used
/// for e.g. late-parsing HTML.
pub decoded_data: Vec<u8>,
pub(crate) hop_info: String,
}
#[derive(Debug, PartialEq)]
@@ -285,6 +287,8 @@ impl MimeMessage {
footer: None,
is_mime_modified: false,
decoded_data: Vec::new(),
hop_info: parse_receive_headers(&mail.get_headers()),
};
match partial {