diff --git a/src/chat/chat_tests.rs b/src/chat/chat_tests.rs index 6185aabf6..ff5399add 100644 --- a/src/chat/chat_tests.rs +++ b/src/chat/chat_tests.rs @@ -2904,8 +2904,8 @@ async fn test_broadcast_joining_golden() -> Result<()> { bob.golden_test_chat(bob_chat_id, "test_broadcast_joining_golden_bob") .await; - let alice_bob_contact = alice.add_or_lookup_contact_id(bob).await; - let direct_chat = ChatIdBlocked::lookup_by_contact(alice, alice_bob_contact) + let alice_bob_contact = alice.add_or_lookup_contact_no_key(bob).await; + let direct_chat = ChatIdBlocked::lookup_by_contact(alice, alice_bob_contact.id) .await? .unwrap(); // The 1:1 chat with Bob should not be visible to the user: @@ -2914,6 +2914,25 @@ async fn test_broadcast_joining_golden() -> Result<()> { .golden_test_chat(direct_chat.id, "test_broadcast_joining_golden_alice_direct") .await; + assert_eq!( + alice_bob_contact + .get_verifier_id(alice) + .await? + .unwrap() + .unwrap(), + ContactId::SELF + ); + + let bob_alice_contact = bob.add_or_lookup_contact_no_key(alice).await; + assert_eq!( + bob_alice_contact + .get_verifier_id(bob) + .await? + .unwrap() + .unwrap(), + ContactId::SELF + ); + Ok(()) } diff --git a/src/mimefactory.rs b/src/mimefactory.rs index 42ebde0a1..e0e0cb30d 100644 --- a/src/mimefactory.rs +++ b/src/mimefactory.rs @@ -580,11 +580,13 @@ impl MimeFactory { step == "vg-request-with-auth" || step == "vc-request-with-auth" || step == "vb-request-with-auth" + // Note that for "vg-member-added" and "vb-member-added", + // get_cmd() returns `MemberAddedToGroup` rather than `SecurejoinMessage`, + // so, it wouldn't actually be necessary to have them in the list here. + // Still, they are here for completeness. || step == "vg-member-added" || step == "vb-member-added" || step == "vc-contact-confirm" - // TODO possibly add vb-member-added here - // TODO wait... for member-added messages, Param::Arg doesn't even contain the step, but the email } } @@ -1183,7 +1185,6 @@ impl MimeFactory { let shared_secret: Option = match &self.loaded { Loaded::Message { msg, .. } if should_encrypt_with_auth_token(msg) => { - // TODO rather than setting Arg2, bob.rs could set a param `Param::SharedSecretForEncryption` or similar msg.param.get(Param::Arg2).map(|s| s.to_string()) } Loaded::Message { chat, msg } diff --git a/src/param.rs b/src/param.rs index 52b234b91..dfec7e4c6 100644 --- a/src/param.rs +++ b/src/param.rs @@ -99,10 +99,10 @@ pub enum Param { /// For Messages /// - /// For "MemberRemovedFromGroup" this is the email address + /// For "MemberRemovedFromGroup", this is the email address /// removed from the group. /// - /// For "MemberAddedToGroup" this is the email address added to the group. + /// For "MemberAddedToGroup", this is the email address added to the group. /// /// For securejoin messages, this is the step, /// which is put into the `Secure-Join` header. diff --git a/src/qr.rs b/src/qr.rs index 86e9610db..766352feb 100644 --- a/src/qr.rs +++ b/src/qr.rs @@ -537,8 +537,6 @@ async fn decode_openpgp(context: &Context, qr: &str) -> Result { (&addr, broadcast_name, grpid, authcode) { // This is a broadcast channel invite link. - // TODO code duplication with the previous block - // TODO at some point, we can mark this person as verified let addr = ContactAddress::new(addr)?; let (contact_id, _) = Contact::add_or_lookup_ex( context,