mirror of
https://github.com/chatmail/core.git
synced 2026-04-19 14:36:29 +03:00
forward html-messages properly (#2151)
* add failing tests for forwarding html-mails * let MsgId.get_html() return an option * write html-part to local database on forwarding * add html-part to forwarded non-dc messages * read HTML-parts from encrypted messages * avoid clone() * Received:-header is no longer needed since #2152 * Update src/html.rs Co-authored-by: Floris Bruynooghe <flub@devork.be> * Update src/html.rs Co-authored-by: Floris Bruynooghe <flub@devork.be> * Update src/mimeparser.rs Co-authored-by: Floris Bruynooghe <flub@devork.be> * prefer 'orig' over 'org' as abbreviation for 'original' * improve comment on tests * prefer 'try_into()' over 'as u32' to avoid panics on bad data * simplify ffi Co-authored-by: Floris Bruynooghe <flub@devork.be>
This commit is contained in:
@@ -951,7 +951,7 @@ pub async fn cmdline(context: Context, line: &str, chat_id: &mut ChatId) -> Resu
|
||||
let file = dirs::home_dir()
|
||||
.unwrap_or_default()
|
||||
.join(format!("msg-{}.html", id.to_u32()));
|
||||
let html = id.get_html(&context).await;
|
||||
let html = id.get_html(&context).await.unwrap_or_default();
|
||||
fs::write(&file, html)?;
|
||||
println!("HTML written to: {:#?}", file);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user