fix: Make syncing of QR tokens work, make test_sync_broadcast pass

This commit is contained in:
Hocuri
2025-08-01 21:30:56 +02:00
parent b276eda1a2
commit 6bb714a6e5
3 changed files with 45 additions and 16 deletions

View File

@@ -3846,8 +3846,13 @@ async fn test_sync_broadcast() -> Result<()> {
assert_eq!(a1_broadcast_chat.get_type(), Chattype::OutBroadcast);
assert_eq!(a1_broadcast_chat.get_name(), a0_broadcast_chat.get_name());
assert!(get_chat_contacts(alice1, a1_broadcast_id).await?.is_empty());
add_contact_to_chat(alice0, a0_broadcast_id, a0b_contact_id).await?;
sync(alice0, alice1).await;
let qr = get_securejoin_qr(alice0, Some(a0_broadcast_id))
.await
.unwrap();
sync(alice0, alice1).await; // Sync QR code
tcm.exec_securejoin_qr_multi_device(bob, &[alice0, alice1], &qr)
.await;
// This also imports Bob's key from the vCard.
// Otherwise it is possible that second device