fix: do not allow to edit html messages (#6564)

closes https://github.com/deltachat/deltachat-core-rust/issues/6561
This commit is contained in:
bjoern
2025-02-22 20:51:44 +01:00
committed by GitHub
parent f94b21d4aa
commit 3d7ac9d2a1
2 changed files with 19 additions and 0 deletions

View File

@@ -3141,6 +3141,7 @@ pub async fn send_edit_request(context: &Context, msg_id: MsgId, new_text: Strin
"Can edit only own messages"
);
ensure!(!original_msg.is_info(), "Cannot edit info messages");
ensure!(!original_msg.has_html(), "Cannot edit HTML messages");
ensure!(
original_msg.viewtype != Viewtype::VideochatInvitation,
"Cannot edit videochat invitations"