api!: remove save_mime_headers config option and dc_get_mime_headers()

This was only used in tests.
`msgs.mime_headers` coulmn remains
as it is used for HTML messages.
This commit is contained in:
link2xt
2025-03-05 19:07:40 +00:00
parent 476224b980
commit 0913b6707b
10 changed files with 7 additions and 139 deletions

View File

@@ -1596,14 +1596,12 @@ pub(crate) fn guess_msgtype_from_path_suffix(path: &Path) -> Option<(Viewtype, &
}
/// Get the raw mime-headers of the given message.
/// Raw headers are saved for incoming messages
/// only if `set_config(context, "save_mime_headers", "1")`
/// was called before.
/// Raw headers are saved for large messages
/// that need a "Show full message..."
/// to see HTML part.
///
/// Returns an empty vector if there are no headers saved for the given message,
/// e.g. because of save_mime_headers is not set
/// or the message is not incoming.
pub async fn get_mime_headers(context: &Context, msg_id: MsgId) -> Result<Vec<u8>> {
/// Returns an empty vector if there are no headers saved for the given message.
pub(crate) async fn get_mime_headers(context: &Context, msg_id: MsgId) -> Result<Vec<u8>> {
let (headers, compressed) = context
.sql
.query_row(