-
-
Notifications
You must be signed in to change notification settings - Fork 129
fix: Ignore SecureJoin messages from blocked contacts (#8295) #8326
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -272,6 +272,7 @@ impl TestContextManager { | |
|
|
||
| /// Executes SecureJoin initiated by `joiner` | ||
| /// scanning `qr` generated by one of the `inviters` devices. | ||
| /// `inviters` devices must have the same primary address. | ||
| /// All of the `inviters` devices will get the messages and send replies. | ||
| /// | ||
| /// The [`ChatId`] of the created chat is returned, for a SetupContact QR this is the 1:1 | ||
|
|
@@ -283,8 +284,10 @@ impl TestContextManager { | |
| qr: &str, | ||
| ) -> ChatId { | ||
| assert!(joiner.pop_sent_msg_opt(Duration::ZERO).await.is_none()); | ||
| let inviter_addr = inviters[0].get_primary_self_addr().await.unwrap(); | ||
| for inviter in inviters { | ||
| assert!(inviter.pop_sent_msg_opt(Duration::ZERO).await.is_none()); | ||
| assert_eq!(inviter.get_primary_self_addr().await.unwrap(), inviter_addr); | ||
| } | ||
|
|
||
| let chat_id = join_securejoin(&joiner.ctx, qr).await.unwrap(); | ||
|
|
@@ -300,6 +303,14 @@ impl TestContextManager { | |
| } | ||
| for inviter in inviters { | ||
| if let Some(sent) = inviter.pop_sent_msg_ex(rev_order, Duration::ZERO).await { | ||
| if sent.recipients.split(' ').any(|addr| addr == inviter_addr) { | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Interestingly, without this condition The self-chat with this weird message is created from a |
||
| for observer in inviters { | ||
| // `imap::prefetch_should_download()` returns false on the sender side. | ||
| if observer.get_id() != inviter.get_id() { | ||
| observer.recv_msg_opt(&sent).await; | ||
| } | ||
| } | ||
| } | ||
| joiner.recv_msg_opt(&sent).await; | ||
| something_sent = true; | ||
| } | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.