dc_get_chat_id_by_contact_id() returns 0 if no chat is found.

this is no error;
in fact, the function is used to probe
if there is a chat with a given contact at several places
eg. in the android-ui.
This commit is contained in:
B. Petersen
2019-10-26 18:37:33 +02:00
parent cfa69cf35a
commit 8015ba1d64

View File

@@ -717,7 +717,7 @@ pub unsafe extern "C" fn dc_get_chat_id_by_contact_id(
ffi_context
.with_inner(|ctx| {
chat::get_by_contact_id(ctx, contact_id)
.unwrap_or_log_default(ctx, "Failed to get chat")
.unwrap_or(0)
})
.unwrap_or(0)
}