mirror of
https://github.com/chatmail/core.git
synced 2026-04-27 18:36:30 +03:00
feat: Resend the last 10 messages to new broadcast member (#7678)
Messages are sent and encrypted only to the new member. This way we at least postpone spreading the information that the new member joined: even if the server operator is a broadcast member, they can't know that immediately.
This commit is contained in:
@@ -275,7 +275,7 @@ async fn test_subject_mdn() {
|
||||
chat::send_msg(&t, new_msg.chat_id, &mut new_msg)
|
||||
.await
|
||||
.unwrap();
|
||||
let mf = MimeFactory::from_msg(&t, new_msg).await.unwrap();
|
||||
let mf = MimeFactory::from_msg(&t, new_msg, None).await.unwrap();
|
||||
// The subject string should not be "Re: message opened"
|
||||
assert_eq!("Re: Hello, Bob", mf.subject_str(&t).await.unwrap());
|
||||
}
|
||||
@@ -412,7 +412,7 @@ async fn first_subject_str(t: TestContext) -> String {
|
||||
new_msg.chat_id = chat_id;
|
||||
chat::send_msg(&t, chat_id, &mut new_msg).await.unwrap();
|
||||
|
||||
let mf = MimeFactory::from_msg(&t, new_msg).await.unwrap();
|
||||
let mf = MimeFactory::from_msg(&t, new_msg, None).await.unwrap();
|
||||
|
||||
mf.subject_str(&t).await.unwrap()
|
||||
}
|
||||
@@ -500,7 +500,7 @@ async fn msg_to_subject_str_inner(
|
||||
chat::send_msg(&t, new_msg.chat_id, &mut new_msg)
|
||||
.await
|
||||
.unwrap();
|
||||
let mf = MimeFactory::from_msg(&t, new_msg).await.unwrap();
|
||||
let mf = MimeFactory::from_msg(&t, new_msg, None).await.unwrap();
|
||||
mf.subject_str(&t).await.unwrap()
|
||||
}
|
||||
|
||||
@@ -545,7 +545,7 @@ async fn test_render_reply() {
|
||||
.await;
|
||||
chat::send_msg(&t, msg.chat_id, &mut msg).await.unwrap();
|
||||
|
||||
let mimefactory = MimeFactory::from_msg(&t, msg).await.unwrap();
|
||||
let mimefactory = MimeFactory::from_msg(&t, msg, None).await.unwrap();
|
||||
|
||||
let recipients = mimefactory.recipients();
|
||||
assert_eq!(recipients, vec!["charlie@example.com"]);
|
||||
|
||||
Reference in New Issue
Block a user