feat: do not include provider hostname in Message-ID

It is leaked by anonymous mailing lists,
making it possible to tell which provider the sender is using.
Use `localhost` as the hostname instead.
This commit is contained in:
link2xt
2024-03-19 13:06:56 +00:00
parent 810be4f6c7
commit b34fe8f118
5 changed files with 11 additions and 16 deletions

View File

@@ -2016,7 +2016,7 @@ mod tests {
assert_eq!(_msg2.get_filemime(), None);
}
/// Tests that message cannot be prepared if account has no configured address.
/// Tests that message can be prepared even if account has no configured address.
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
async fn test_prepare_not_configured() {
let d = test::TestContext::new().await;
@@ -2026,7 +2026,7 @@ mod tests {
let mut msg = Message::new(Viewtype::Text);
assert!(chat::prepare_msg(ctx, chat.id, &mut msg).await.is_err());
assert!(chat::prepare_msg(ctx, chat.id, &mut msg).await.is_ok());
}
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]