test: Deletion request fails in an unencrypted chat and the message remains

This commit is contained in:
iequidoo
2025-03-10 23:18:20 -03:00
committed by iequidoo
parent 3b3d5767b0
commit fa4de8f72e
3 changed files with 23 additions and 0 deletions

View File

@@ -1531,6 +1531,8 @@ async fn add_parts(
} else if let Some(rfc724_mid_list) = mime_parser.get_header(HeaderDef::ChatDelete) {
chat_id = DC_CHAT_ID_TRASH;
if let Some(part) = mime_parser.parts.first() {
// See `message::delete_msgs_ex()`, unlike edit requests, DC doesn't send unencrypted
// deletion requests, so there's no need to support them.
if part.param.get_bool(Param::GuaranteeE2ee).unwrap_or(false) {
let mut modified_chat_ids = HashSet::new();
let mut msg_ids = Vec::new();