mirror of
https://github.com/chatmail/core.git
synced 2026-05-20 07:16:31 +03:00
fix: use non-empty To: field for "saved messages"
This commit is contained in:
@@ -752,6 +752,16 @@ async fn test_self_talk() -> Result<()> {
|
|||||||
assert!(msg.get_showpadlock());
|
assert!(msg.get_showpadlock());
|
||||||
|
|
||||||
let sent_msg = t.pop_sent_msg().await;
|
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;
|
let t2 = TestContext::new_alice().await;
|
||||||
t2.recv_msg(&sent_msg).await;
|
t2.recv_msg(&sent_msg).await;
|
||||||
let chat = &t2.get_self_chat().await;
|
let chat = &t2.get_self_chat().await;
|
||||||
|
|||||||
@@ -186,8 +186,8 @@ impl MimeFactory {
|
|||||||
if chat.is_self_talk() {
|
if chat.is_self_talk() {
|
||||||
if msg.param.get_cmd() == SystemMessage::AutocryptSetupMessage {
|
if msg.param.get_cmd() == SystemMessage::AutocryptSetupMessage {
|
||||||
recipients.push(from_addr.to_string());
|
recipients.push(from_addr.to_string());
|
||||||
to.push((from_displayname.to_string(), from_addr.to_string()));
|
|
||||||
}
|
}
|
||||||
|
to.push((from_displayname.to_string(), from_addr.to_string()));
|
||||||
} else if chat.is_mailing_list() {
|
} else if chat.is_mailing_list() {
|
||||||
let list_post = chat
|
let list_post = chat
|
||||||
.param
|
.param
|
||||||
|
|||||||
Reference in New Issue
Block a user