Resultify Contact::lookup_id_by_addr

Using a Contact ID as an error type is risky and a C leftover.
This commit is contained in:
Floris Bruynooghe
2021-01-24 16:57:22 +01:00
parent 6b9b39b953
commit 785cc795e3
6 changed files with 99 additions and 51 deletions

View File

@@ -1539,6 +1539,9 @@ pub unsafe extern "C" fn dc_lookup_contact_id_by_addr(
to_string_lossy(addr),
Origin::IncomingReplyTo,
))
.ok()
.flatten()
.unwrap_or_default()
}
#[no_mangle]