mirror of
https://github.com/chatmail/core.git
synced 2026-05-01 20:36:31 +03:00
api(CFFI): Add dc_contact_is_key_contact() (#6955)
We need this because it's not clear whether Android should switch to JsonRPC for everything, because of concerns that JsonRPC might be a lot slower than the CFFI (although we still need to measure that).
This commit is contained in:
@@ -4303,6 +4303,15 @@ pub unsafe extern "C" fn dc_contact_is_bot(contact: *mut dc_contact_t) -> libc::
|
||||
(*contact).contact.is_bot() as libc::c_int
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub unsafe extern "C" fn dc_contact_is_key_contact(contact: *mut dc_contact_t) -> libc::c_int {
|
||||
if contact.is_null() {
|
||||
eprintln!("ignoring careless call to dc_contact_is_key_contact()");
|
||||
return 0;
|
||||
}
|
||||
(*contact).contact.is_key_contact() as libc::c_int
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub unsafe extern "C" fn dc_contact_get_verifier_id(contact: *mut dc_contact_t) -> u32 {
|
||||
if contact.is_null() {
|
||||
|
||||
Reference in New Issue
Block a user