feat(ffi): Warning instead of error if dc_get_msg() could not retrieve message

As trashed messages can't be loaded from the db now by `Message::load_from_db()` returning an error
for such messages, errors from `Message::load_from_db()` should be logged as warnings. If it's
really an error like a db failure, it should be logged internally.
This commit is contained in:
iequidoo
2024-04-15 05:52:53 -03:00
committed by link2xt
parent 99cd6d10da
commit 47bea5f8fb

View File

@@ -2008,7 +2008,7 @@ pub unsafe extern "C" fn dc_get_msg(context: *mut dc_context_t, msg_id: u32) ->
);
message::Message::default()
} else {
error!(ctx, "dc_get_msg could not retrieve msg_id {msg_id}: {e:#}");
warn!(ctx, "dc_get_msg could not retrieve msg_id {msg_id}: {e:#}");
return ptr::null_mut();
}
}