add ffi for update_device_chats()

This commit is contained in:
B. Petersen
2019-12-02 15:28:58 +01:00
parent 18e91c480b
commit 521e44bd54
2 changed files with 33 additions and 0 deletions

View File

@@ -851,6 +851,21 @@ pub unsafe extern "C" fn dc_add_device_msg(
.unwrap_or(0)
}
#[no_mangle]
pub unsafe extern "C" fn dc_update_device_chats(context: *mut dc_context_t) {
if context.is_null() {
eprintln!("ignoring careless call to dc_update_device_chats()");
return;
}
let ffi_context = &mut *context;
ffi_context
.with_inner(|ctx| {
ctx.update_device_chats()
.unwrap_or_log_default(ctx, "Failed to add device message")
})
.unwrap_or(())
}
#[no_mangle]
pub unsafe extern "C" fn dc_was_device_msg_ever_added(
context: *mut dc_context_t,