add was_seen_recently() (#3560)

* add dc_contact_was_seen_recently()

* add wasSeenRecently() to node
This commit is contained in:
bjoern
2022-08-26 19:21:44 +02:00
committed by GitHub
parent 8eb4d9bf08
commit 682ec563c8
6 changed files with 72 additions and 2 deletions

View File

@@ -3859,6 +3859,16 @@ pub unsafe extern "C" fn dc_contact_get_last_seen(contact: *mut dc_contact_t) ->
ffi_contact.contact.last_seen()
}
#[no_mangle]
pub unsafe extern "C" fn dc_contact_was_seen_recently(contact: *mut dc_contact_t) -> libc::c_int {
if contact.is_null() {
eprintln!("ignoring careless call to dc_contact_was_seen_recently()");
return 0;
}
let ffi_contact = &*contact;
ffi_contact.contact.was_seen_recently() as libc::c_int
}
#[no_mangle]
pub unsafe extern "C" fn dc_contact_is_blocked(contact: *mut dc_contact_t) -> libc::c_int {
if contact.is_null() {