fix: do not fail to send the message if some keys are missing

This commit is contained in:
link2xt
2025-03-27 18:28:58 +00:00
parent 568c044a90
commit 7624a50cb1
5 changed files with 153 additions and 67 deletions

View File

@@ -1732,6 +1732,10 @@ pub async fn delete_msgs_ex(
!delete_for_all || msg.from_id == ContactId::SELF,
"Can delete only own messages for others"
);
ensure!(
!delete_for_all || msg.get_showpadlock(),
"Cannot request deletion of unencrypted message for others"
);
modified_chat_ids.insert(msg.chat_id);
deleted_rfc724_mid.push(msg.rfc724_mid.clone());