fix: use non-empty To: field for "saved messages"

This commit is contained in:
link2xt
2025-01-23 22:51:17 +00:00
committed by l
parent 8435f40dae
commit 6430977670
2 changed files with 11 additions and 1 deletions

View File

@@ -752,6 +752,16 @@ async fn test_self_talk() -> Result<()> {
assert!(msg.get_showpadlock());
let sent_msg = t.pop_sent_msg().await;
let payload = sent_msg.payload();
// Make sure the `To` field contains the address and not
// "undisclosed recipients".
// Otherwise Delta Chat core <1.153.0 assigns the message
// to the trash chat.
assert_eq!(
payload.match_indices("To: <alice@example.org>\r\n").count(),
1
);
let t2 = TestContext::new_alice().await;
t2.recv_msg(&sent_msg).await;
let chat = &t2.get_self_chat().await;