mirror of
https://github.com/chatmail/core.git
synced 2026-05-20 15:26:30 +03:00
@@ -212,10 +212,9 @@ SELECT ?1, rfc724_mid, pre_rfc724_mid, timestamp, ?, ? FROM msgs WHERE id=?1
|
|||||||
ret += &format!("Sent: {fts}");
|
ret += &format!("Sent: {fts}");
|
||||||
|
|
||||||
let from_contact = Contact::get_by_id(context, msg.from_id).await?;
|
let from_contact = Contact::get_by_id(context, msg.from_id).await?;
|
||||||
let name = from_contact.get_name_n_addr();
|
let name = from_contact.get_display_name();
|
||||||
if let Some(override_sender_name) = msg.get_override_sender_name() {
|
if let Some(override_sender_name) = msg.get_override_sender_name() {
|
||||||
let addr = from_contact.get_addr();
|
ret += &format!(" by ~{override_sender_name}");
|
||||||
ret += &format!(" by ~{override_sender_name} ({addr})");
|
|
||||||
} else {
|
} else {
|
||||||
ret += &format!(" by {name}");
|
ret += &format!(" by {name}");
|
||||||
}
|
}
|
||||||
@@ -263,7 +262,7 @@ SELECT ?1, rfc724_mid, pre_rfc724_mid, timestamp, ?, ? FROM msgs WHERE id=?1
|
|||||||
|
|
||||||
let name = Contact::get_by_id(context, contact_id)
|
let name = Contact::get_by_id(context, contact_id)
|
||||||
.await
|
.await
|
||||||
.map(|contact| contact.get_name_n_addr())
|
.map(|contact| contact.get_display_name().to_owned())
|
||||||
.unwrap_or_default();
|
.unwrap_or_default();
|
||||||
|
|
||||||
ret += &format!(" by {name}");
|
ret += &format!(" by {name}");
|
||||||
|
|||||||
@@ -4748,7 +4748,7 @@ async fn test_list_from() -> Result<()> {
|
|||||||
"clubinfo@donotreply.oeamtc.at"
|
"clubinfo@donotreply.oeamtc.at"
|
||||||
);
|
);
|
||||||
let info = msg.id.get_info(t).await?;
|
let info = msg.id.get_info(t).await?;
|
||||||
assert!(info.contains(" by ~ÖAMTC (clubinfo@donotreply.oeamtc.at)"));
|
assert!(info.contains(" by ~ÖAMTC"));
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user