mirror of
https://github.com/chatmail/core.git
synced 2026-05-23 00:36:32 +03:00
Log dc_get_chatlist() errors
Previously errors such as empty query ("missing query") silently
returned NULL.
This commit is contained in:
@@ -640,7 +640,10 @@ pub unsafe extern "C" fn dc_get_chatlist(
|
|||||||
let qi = if query_id == 0 { None } else { Some(query_id) };
|
let qi = if query_id == 0 { None } else { Some(query_id) };
|
||||||
|
|
||||||
block_on(async move {
|
block_on(async move {
|
||||||
match chatlist::Chatlist::try_load(ctx, flags as usize, qs.as_deref(), qi).await {
|
match chatlist::Chatlist::try_load(ctx, flags as usize, qs.as_deref(), qi)
|
||||||
|
.await
|
||||||
|
.log_err(ctx, "Failed to get chatlist")
|
||||||
|
{
|
||||||
Ok(list) => {
|
Ok(list) => {
|
||||||
let ffi_list = ChatlistWrapper { context, list };
|
let ffi_list = ChatlistWrapper { context, list };
|
||||||
Box::into_raw(Box::new(ffi_list))
|
Box::into_raw(Box::new(ffi_list))
|
||||||
|
|||||||
Reference in New Issue
Block a user