From 47bea5f8fb3442de618840c24ee276c7d90e1dc5 Mon Sep 17 00:00:00 2001 From: iequidoo Date: Mon, 15 Apr 2024 05:52:53 -0300 Subject: [PATCH] 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. --- deltachat-ffi/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deltachat-ffi/src/lib.rs b/deltachat-ffi/src/lib.rs index 1bdcbdaf4..a1011908a 100644 --- a/deltachat-ffi/src/lib.rs +++ b/deltachat-ffi/src/lib.rs @@ -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(); } }