iequidoo's review

This commit is contained in:
Hocuri
2026-05-07 10:24:10 +02:00
parent 578e51829a
commit 87c94aa887
3 changed files with 10 additions and 14 deletions

View File

@@ -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);

View File

@@ -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(())
}

View File

@@ -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(())
}