From 87c94aa8878a290a4c75975b927299d6f1bb18c9 Mon Sep 17 00:00:00 2001 From: Hocuri Date: Thu, 7 May 2026 10:24:10 +0200 Subject: [PATCH] iequidoo's review --- deltachat-ffi/deltachat.h | 2 +- src/imex.rs | 17 ++++------------- src/receive_imf/receive_imf_tests.rs | 5 +++++ 3 files changed, 10 insertions(+), 14 deletions(-) diff --git a/deltachat-ffi/deltachat.h b/deltachat-ffi/deltachat.h index d836fd30b..fbd4990d4 100644 --- a/deltachat-ffi/deltachat.h +++ b/deltachat-ffi/deltachat.h @@ -1465,7 +1465,7 @@ dc_chatlist_t* dc_get_similar_chatlist (dc_context_t* context, uint32_t ch * @param from_server Deprecated, pass 0 here * @param seconds Count messages older than the given number of seconds. * @return Number of messages that are older than the given number of seconds. - * Messages in the "saved messages" folder are not counted as they will not be deleted automatically. + * Messages in the "Saved Messages" chat are not counted as they will not be deleted automatically. */ int dc_estimate_deletion_cnt (dc_context_t* context, int from_server, int64_t seconds); diff --git a/src/imex.rs b/src/imex.rs index e519df106..cff99a401 100644 --- a/src/imex.rs +++ b/src/imex.rs @@ -985,12 +985,9 @@ mod tests { ); context1.set_config_bool(Config::IsChatmail, true).await?; - assert_eq!(context1.get_config(Config::IsMuted).await?, None); + assert_eq!(context1.get_config_bool(Config::IsMuted).await?, false); context1.set_config_bool(Config::IsMuted, true).await?; - assert_eq!( - context1.get_config(Config::IsMuted).await?, - Some("1".to_string()) - ); + assert_eq!(context1.get_config_bool(Config::IsMuted).await?, true); imex(context1, ImexMode::ExportBackup, backup_dir.path(), None).await?; let _event = context1 @@ -1009,14 +1006,8 @@ mod tests { assert!(context2.is_chatmail().await?); for ctx in [context1, context2] { // BccSelf should be enabled automatically when exporting a backup - assert_eq!( - ctx.get_config(Config::BccSelf).await?, - Some("1".to_string()) - ); - assert_eq!( - ctx.get_config(Config::IsMuted).await?, - Some("1".to_string()) - ); + assert_eq!(ctx.get_config_bool(Config::BccSelf).await?, true); + assert_eq!(ctx.get_config_bool(Config::IsMuted).await?, true); } Ok(()) } diff --git a/src/receive_imf/receive_imf_tests.rs b/src/receive_imf/receive_imf_tests.rs index 8366ac92d..eca8d5e37 100644 --- a/src/receive_imf/receive_imf_tests.rs +++ b/src/receive_imf/receive_imf_tests.rs @@ -1977,6 +1977,11 @@ async fn test_no_smtp_job_for_self_chat() -> Result<()> { chat::send_msg(bob, chat_id, &mut msg).await?; assert!(bob.pop_sent_msg_opt(Duration::ZERO).await.is_none()); + bob.set_config_bool(Config::BccSelf, true).await?; + let mut msg = Message::new_text("Happy birthday to me".to_string()); + chat::send_msg(bob, chat_id, &mut msg).await?; + assert!(bob.pop_sent_msg_opt(Duration::ZERO).await.is_some()); + Ok(()) }