-
-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: only send Chat-Group-Member-Timestamps in groups
- Loading branch information
Showing
2 changed files
with
29 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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", "[email protected]").await; | ||
let sent = t.send_text(chat.id, "Hi!").await; | ||
let payload = sent.payload; | ||
assert!(!payload.contains("Chat-Group-Member-Timestamps:")); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters