mirror of
https://github.com/chatmail/core.git
synced 2026-05-22 16:26:31 +03:00
ffi: log create_contact() errors
This commit is contained in:
@@ -2003,12 +2003,10 @@ pub unsafe extern "C" fn dc_create_contact(
|
|||||||
let ctx = &*context;
|
let ctx = &*context;
|
||||||
let name = to_string_lossy(name);
|
let name = to_string_lossy(name);
|
||||||
|
|
||||||
block_on(async move {
|
block_on(Contact::create(ctx, &name, &to_string_lossy(addr)))
|
||||||
Contact::create(ctx, &name, &to_string_lossy(addr))
|
.log_err(ctx, "Cannot create contact")
|
||||||
.await
|
.map(|id| id.to_u32())
|
||||||
.map(|id| id.to_u32())
|
.unwrap_or(0)
|
||||||
.unwrap_or(0)
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
|
|||||||
Reference in New Issue
Block a user