Skip to content

Commit 90f0d5c

Browse files
committed
api: make dc_chat_is_protected always return 0
1 parent 90ec2f2 commit 90f0d5c

File tree

2 files changed

+5
-16
lines changed

2 files changed

+5
-16
lines changed

deltachat-ffi/deltachat.h

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3890,18 +3890,12 @@ int dc_chat_can_send (const dc_chat_t* chat);
38903890

38913891

38923892
/**
3893-
* Check if a chat is protected.
3894-
*
3895-
* Only verified contacts
3896-
* as determined by dc_contact_is_verified()
3897-
* can be added to protected chats.
3898-
*
3899-
* Protected chats are created using dc_create_group_chat()
3900-
* by setting the 'protect' parameter to 1.
3893+
* Deprecated, always returns 0.
39013894
*
39023895
* @memberof dc_chat_t
39033896
* @param chat The chat object.
3904-
* @return 1=chat protected, 0=chat is not protected.
3897+
* @return Always 0.
3898+
* @deprecated 2025-09-09
39053899
*/
39063900
int dc_chat_is_protected (const dc_chat_t* chat);
39073901

deltachat-ffi/src/lib.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3206,13 +3206,8 @@ pub unsafe extern "C" fn dc_chat_can_send(chat: *mut dc_chat_t) -> libc::c_int {
32063206
}
32073207

32083208
#[no_mangle]
3209-
pub unsafe extern "C" fn dc_chat_is_protected(chat: *mut dc_chat_t) -> libc::c_int {
3210-
if chat.is_null() {
3211-
eprintln!("ignoring careless call to dc_chat_is_protected()");
3212-
return 0;
3213-
}
3214-
let ffi_chat = &*chat;
3215-
ffi_chat.chat.is_protected() as libc::c_int
3209+
pub extern "C" fn dc_chat_is_protected(_chat: *mut dc_chat_t) -> libc::c_int {
3210+
0
32163211
}
32173212

32183213
#[no_mangle]

0 commit comments

Comments
 (0)