diff --git a/deltachat-ffi/deltachat.h b/deltachat-ffi/deltachat.h index e4b7df644..dee7ded8a 100644 --- a/deltachat-ffi/deltachat.h +++ b/deltachat-ffi/deltachat.h @@ -3956,28 +3956,6 @@ int dc_chat_is_protected (const dc_chat_t* chat); int dc_chat_is_encrypted (const dc_chat_t *chat); -/** - * Checks if the chat was protected, and then an incoming message broke this protection. - * - * This function is only useful if the UI enabled the `verified_one_on_one_chats` feature flag, - * otherwise it will return false for all chats. - * - * 1:1 chats are automatically set as protected when a contact is verified. - * When a message comes in that is not encrypted / signed correctly, - * the chat is automatically set as unprotected again. - * dc_chat_is_protection_broken() will return true until dc_accept_chat() is called. - * - * The UI should let the user confirm that this is OK with a message like - * `Bob sent a message from another device. Tap to learn more` and then call dc_accept_chat(). - * - * @deprecated 2025-07 chats protection cannot break any longer - * @memberof dc_chat_t - * @param chat The chat object. - * @return 1=chat protection broken, 0=otherwise. - */ -int dc_chat_is_protection_broken (const dc_chat_t* chat); - - /** * Check if locations are sent to the chat * at the time the object was created using dc_get_chat(). diff --git a/deltachat-ffi/src/lib.rs b/deltachat-ffi/src/lib.rs index ff323b63c..ddae6de52 100644 --- a/deltachat-ffi/src/lib.rs +++ b/deltachat-ffi/src/lib.rs @@ -3247,16 +3247,6 @@ pub unsafe extern "C" fn dc_chat_is_encrypted(chat: *mut dc_chat_t) -> libc::c_i .unwrap_or_log_default(&ffi_chat.context, "Failed dc_chat_is_encrypted") as libc::c_int } -#[no_mangle] -pub unsafe extern "C" fn dc_chat_is_protection_broken(chat: *mut dc_chat_t) -> libc::c_int { - if chat.is_null() { - eprintln!("ignoring careless call to dc_chat_is_protection_broken()"); - return 0; - } - let ffi_chat = &*chat; - ffi_chat.chat.is_protection_broken() as libc::c_int -} - #[no_mangle] pub unsafe extern "C" fn dc_chat_is_sending_locations(chat: *mut dc_chat_t) -> libc::c_int { if chat.is_null() { diff --git a/deltachat-jsonrpc/src/api/types/chat.rs b/deltachat-jsonrpc/src/api/types/chat.rs index 96388c27b..86f78abee 100644 --- a/deltachat-jsonrpc/src/api/types/chat.rs +++ b/deltachat-jsonrpc/src/api/types/chat.rs @@ -71,8 +71,6 @@ pub struct FullChat { fresh_message_counter: usize, // is_group - please check over chat.type in frontend instead is_contact_request: bool, - /// Deprecated 2025-07. Chats protection cannot break any longer. - is_protection_broken: bool, is_device_chat: bool, self_in_group: bool, @@ -147,7 +145,6 @@ impl FullChat { color, fresh_message_counter, is_contact_request: chat.is_contact_request(), - is_protection_broken: chat.is_protection_broken(), is_device_chat: chat.is_device_talk(), self_in_group: contact_ids.contains(&ContactId::SELF), is_muted: chat.is_muted(), @@ -218,8 +215,6 @@ pub struct BasicChat { is_self_talk: bool, color: String, is_contact_request: bool, - /// Deprecated 2025-07. Chats protection cannot break any longer. - is_protection_broken: bool, is_device_chat: bool, is_muted: bool, @@ -249,7 +244,6 @@ impl BasicChat { is_self_talk: chat.is_self_talk(), color, is_contact_request: chat.is_contact_request(), - is_protection_broken: chat.is_protection_broken(), is_device_chat: chat.is_device_talk(), is_muted: chat.is_muted(), }) diff --git a/src/chat.rs b/src/chat.rs index 3ba491ceb..f0ebdb0c6 100644 --- a/src/chat.rs +++ b/src/chat.rs @@ -1920,11 +1920,6 @@ impl Chat { Ok(is_encrypted) } - /// Deprecated 2025-07. Returns false. - pub fn is_protection_broken(&self) -> bool { - false - } - /// Returns true if location streaming is enabled in the chat. pub fn is_sending_locations(&self) -> bool { self.is_sending_locations diff --git a/src/config.rs b/src/config.rs index 7bfebd868..b16382cd7 100644 --- a/src/config.rs +++ b/src/config.rs @@ -422,7 +422,7 @@ pub enum Config { /// Regardless of this setting, `chat.is_protected()` returns true while the key is verified, /// and when the key changes, an info message is posted into the chat. /// 0=Nothing else happens when the key changes. - /// 1=After the key changed, `can_send()` returns false and `is_protection_broken()` returns true + /// 1=After the key changed, `can_send()` returns false /// until `chat_id.accept()` is called. #[strum(props(default = "0"))] VerifiedOneOnOneChats, diff --git a/src/tests/verified_chats.rs b/src/tests/verified_chats.rs index fbee49fc2..2a85dbc02 100644 --- a/src/tests/verified_chats.rs +++ b/src/tests/verified_chats.rs @@ -881,7 +881,6 @@ async fn assert_verified(this: &TestContext, other: &TestContext, protected: Pro chat.is_protected(), protected == ProtectionStatus::Protected ); - assert_eq!(chat.is_protection_broken(), false); } async fn enable_verified_oneonone_chats(test_contexts: &[&TestContext]) {