mirror of
https://github.com/chatmail/core.git
synced 2026-04-19 14:36:29 +03:00
fix: only send Chat-Group-Member-Timestamps in groups
This commit is contained in:
@@ -2495,7 +2495,9 @@ async fn test_broadcast() -> Result<()> {
|
||||
}
|
||||
|
||||
{
|
||||
let msg = bob.recv_msg(&alice.pop_sent_msg().await).await;
|
||||
let sent_msg = alice.pop_sent_msg().await;
|
||||
assert!(!sent_msg.payload.contains("Chat-Group-Member-Timestamps:"));
|
||||
let msg = bob.recv_msg(&sent_msg).await;
|
||||
assert_eq!(msg.get_text(), "ola!");
|
||||
assert_eq!(msg.subject, "Broadcast list");
|
||||
assert!(!msg.get_showpadlock()); // avoid leaking recipients in encryption data
|
||||
@@ -3536,3 +3538,12 @@ async fn test_restore_backup_after_60_days() -> Result<()> {
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
|
||||
async fn test_one_to_one_chat_no_group_member_timestamps() {
|
||||
let t = TestContext::new_alice().await;
|
||||
let chat = t.create_chat_with_contact("bob", "bob@example.com").await;
|
||||
let sent = t.send_text(chat.id, "Hi!").await;
|
||||
let payload = sent.payload;
|
||||
assert!(!payload.contains("Chat-Group-Member-Timestamps:"));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user