message deletion request API (#6576)

this PR adds an API allowing users to delete their messages on other
member's devices

this PR is build on top of
https://github.com/deltachat/deltachat-core-rust/pull/6573 which should
be merged first

a test is missing, otherwise ready for review; it is working already in
https://github.com/deltachat/deltachat-ios/pull/2611
This commit is contained in:
bjoern
2025-02-26 19:02:50 +01:00
committed by GitHub
parent a4e478a071
commit c58f6107ba
9 changed files with 167 additions and 13 deletions

View File

@@ -734,6 +734,12 @@ impl MimeFactory {
)
.into(),
));
} else if let Some(rfc724_mid_list) = msg.param.get(Param::DeleteRequestFor) {
headers.push((
"Chat-Delete",
mail_builder::headers::message_id::MessageId::new(rfc724_mid_list.to_string())
.into(),
));
}
}
@@ -861,7 +867,10 @@ impl MimeFactory {
if header_name == "message-id" {
unprotected_headers.push(header.clone());
hidden_headers.push(header.clone());
} else if header_name == "chat-user-avatar" || header_name == "chat-edit" {
} else if header_name == "chat-user-avatar"
|| header_name == "chat-delete"
|| header_name == "chat-edit"
{
hidden_headers.push(header.clone());
} else if header_name == "autocrypt"
&& !context.get_config_bool(Config::ProtectAutocrypt).await?