diff --git a/bindings_ffi/src/mls.rs b/bindings_ffi/src/mls.rs index 63f90cf83..f8219aac0 100644 --- a/bindings_ffi/src/mls.rs +++ b/bindings_ffi/src/mls.rs @@ -822,7 +822,8 @@ impl FfiConversations { pub async fn sync(&self) -> Result<(), GenericError> { let inner = self.inner_client.as_ref(); - inner.sync_welcomes().await?; + let conn = inner.store().conn()?; + inner.sync_welcomes(&conn).await?; Ok(()) } @@ -3019,6 +3020,8 @@ mod tests { let bo = new_test_client().await; let caro = new_test_client().await; + let caro_conn = caro.inner_client.store().conn().unwrap(); + let alix_group = alix .conversations() .create_group( @@ -3047,7 +3050,7 @@ mod tests { ) .await .unwrap(); - let _ = caro.inner_client.sync_welcomes().await.unwrap(); + let _ = caro.inner_client.sync_welcomes(&caro_conn).await.unwrap(); bo_group.send("second".as_bytes().to_vec()).await.unwrap(); stream_callback.wait_for_delivery(None).await.unwrap(); @@ -3066,6 +3069,8 @@ mod tests { let amal = new_test_client().await; let bola = new_test_client().await; + let bola_conn = bola.inner_client.store().conn().unwrap(); + let amal_group: Arc = amal .conversations() .create_group( @@ -3075,7 +3080,7 @@ mod tests { .await .unwrap(); - bola.inner_client.sync_welcomes().await.unwrap(); + bola.inner_client.sync_welcomes(&bola_conn).await.unwrap(); let bola_group = bola.conversation(amal_group.id()).unwrap(); let stream_callback = RustStreamCallback::default(); diff --git a/bindings_node/src/conversations.rs b/bindings_node/src/conversations.rs index ab46a147a..3e5db4806 100644 --- a/bindings_node/src/conversations.rs +++ b/bindings_node/src/conversations.rs @@ -234,9 +234,14 @@ impl NapiConversations { #[napi] pub async fn sync(&self) -> Result<()> { + let conn = self + .inner_client + .store() + .conn() + .map_err(ErrorWrapper::from)?; self .inner_client - .sync_welcomes() + .sync_welcomes(&conn) .await .map_err(ErrorWrapper::from)?; Ok(()) diff --git a/bindings_wasm/src/conversations.rs b/bindings_wasm/src/conversations.rs index f9552fb80..55da820a0 100644 --- a/bindings_wasm/src/conversations.rs +++ b/bindings_wasm/src/conversations.rs @@ -167,9 +167,14 @@ impl WasmConversations { #[wasm_bindgen] pub async fn sync(&self) -> Result<(), JsError> { + let conn = self + .inner_client + .store() + .conn() + .map_err(|e| JsError::new(format!("{}", e).as_str()))?; self .inner_client - .sync_welcomes() + .sync_welcomes(&conn) .await .map_err(|e| JsError::new(format!("{}", e).as_str()))?; Ok(()) diff --git a/examples/cli/cli-client.rs b/examples/cli/cli-client.rs index c6ddf0fc6..385379519 100755 --- a/examples/cli/cli-client.rs +++ b/examples/cli/cli-client.rs @@ -205,9 +205,10 @@ async fn main() { let client = create_client(&cli, IdentityStrategy::CachedOnly) .await .unwrap(); + let conn = client.store().conn().unwrap(); client - .sync_welcomes() + .sync_welcomes(&conn) .await .expect("failed to sync welcomes"); @@ -351,8 +352,9 @@ async fn main() { let client = create_client(&cli, IdentityStrategy::CachedOnly) .await .unwrap(); + let conn = client.store().conn().unwrap(); let provider = client.mls_provider().unwrap(); - client.sync_welcomes().await.unwrap(); + client.sync_welcomes(&conn).await.unwrap(); client.enable_history_sync(&provider).await.unwrap(); let (group_id, _) = client.send_history_sync_request().await.unwrap(); let group_id_str = hex::encode(group_id); @@ -377,8 +379,9 @@ async fn main() { let client = create_client(&cli, IdentityStrategy::CachedOnly) .await .unwrap(); + let conn = client.store().conn().unwrap(); let provider = client.mls_provider().unwrap(); - client.sync_welcomes().await.unwrap(); + client.sync_welcomes(&conn).await.unwrap(); client.enable_history_sync(&provider).await.unwrap(); client.process_history_sync_reply(&provider).await.unwrap(); @@ -388,8 +391,9 @@ async fn main() { let client = create_client(&cli, IdentityStrategy::CachedOnly) .await .unwrap(); + let conn = client.store().conn().unwrap(); let provider = client.mls_provider().unwrap(); - client.sync_welcomes().await.unwrap(); + client.sync_welcomes(&conn).await.unwrap(); client.enable_history_sync(&provider).await.unwrap(); client.process_consent_sync_reply(&provider).await.unwrap(); @@ -399,8 +403,9 @@ async fn main() { let client = create_client(&cli, IdentityStrategy::CachedOnly) .await .unwrap(); + let conn = client.store().conn().unwrap(); let provider = client.mls_provider().unwrap(); - client.sync_welcomes().await.unwrap(); + client.sync_welcomes(&conn).await.unwrap(); client.enable_history_sync(&provider).await.unwrap(); let group = client.get_sync_group().unwrap(); let group_id_str = hex::encode(group.group_id.clone()); @@ -502,7 +507,8 @@ async fn register(cli: &Cli, maybe_seed_phrase: Option) -> Result<(), Cl } async fn get_group(client: &Client, group_id: Vec) -> Result { - client.sync_welcomes().await?; + let conn = client.store().conn().unwrap(); + client.sync_welcomes(&conn).await?; let group = client.group(group_id)?; group .sync() diff --git a/xmtp_mls/src/client.rs b/xmtp_mls/src/client.rs index c09384a90..da3bb71c0 100644 --- a/xmtp_mls/src/client.rs +++ b/xmtp_mls/src/client.rs @@ -777,8 +777,11 @@ where /// Download all unread welcome messages and converts to a group struct, ignoring malformed messages. /// Returns any new groups created in the operation - pub async fn sync_welcomes(&self) -> Result>, ClientError> { - let envelopes = self.query_welcome_messages(&self.store().conn()?).await?; + pub async fn sync_welcomes( + &self, + conn: &DbConnection, + ) -> Result>, ClientError> { + let envelopes = self.query_welcome_messages(conn).await?; let num_envelopes = envelopes.len(); let id = self.installation_public_key(); @@ -1120,14 +1123,20 @@ pub(crate) mod tests { .await .unwrap(); - let bob_received_groups = bob.sync_welcomes().await.unwrap(); + let bob_received_groups = bob + .sync_welcomes(&bob.store().conn().unwrap()) + .await + .unwrap(); assert_eq!(bob_received_groups.len(), 1); assert_eq!( bob_received_groups.first().unwrap().group_id, alice_bob_group.group_id ); - let duplicate_received_groups = bob.sync_welcomes().await.unwrap(); + let duplicate_received_groups = bob + .sync_welcomes(&bob.store().conn().unwrap()) + .await + .unwrap(); assert_eq!(duplicate_received_groups.len(), 0); } @@ -1155,7 +1164,7 @@ pub(crate) mod tests { .await .unwrap(); - let bob_received_groups = bo.sync_welcomes().await.unwrap(); + let bob_received_groups = bo.sync_welcomes(&bo.store().conn().unwrap()).await.unwrap(); assert_eq!(bob_received_groups.len(), 2); let bo_groups = bo.find_groups(FindGroupParams::default()).unwrap(); @@ -1231,7 +1240,9 @@ pub(crate) mod tests { assert_eq!(amal_group.members().await.unwrap().len(), 1); tracing::info!("Syncing bolas welcomes"); // See if Bola can see that they were added to the group - bola.sync_welcomes().await.unwrap(); + bola.sync_welcomes(&bola.store().conn().unwrap()) + .await + .unwrap(); let bola_groups = bola.find_groups(FindGroupParams::default()).unwrap(); assert_eq!(bola_groups.len(), 1); let bola_group = bola_groups.first().unwrap(); @@ -1250,7 +1261,9 @@ pub(crate) mod tests { .add_members_by_inbox_id(&[bola.inbox_id()]) .await .unwrap(); - bola.sync_welcomes().await.unwrap(); + bola.sync_welcomes(&bola.store().conn().unwrap()) + .await + .unwrap(); // Send a message from Amal, now that Bola is back in the group amal_group @@ -1340,18 +1353,20 @@ pub(crate) mod tests { .await .unwrap(); - bo.sync_welcomes().await.unwrap(); + bo.sync_welcomes(&bo.store().conn().unwrap()).await.unwrap(); let bo_new_key = get_key_package_init_key(&bo, &bo.installation_public_key()).await; // Bo's key should have changed assert_ne!(bo_original_init_key, bo_new_key); - bo.sync_welcomes().await.unwrap(); + bo.sync_welcomes(&bo.store().conn().unwrap()).await.unwrap(); let bo_new_key_2 = get_key_package_init_key(&bo, &bo.installation_public_key()).await; // Bo's key should not have changed syncing the second time. assert_eq!(bo_new_key, bo_new_key_2); - alix.sync_welcomes().await.unwrap(); + alix.sync_welcomes(&alix.store().conn().unwrap()) + .await + .unwrap(); let alix_key_2 = get_key_package_init_key(&alix, &alix.installation_public_key()).await; // Alix's key should not have changed at all assert_eq!(alix_original_init_key, alix_key_2); @@ -1363,7 +1378,7 @@ pub(crate) mod tests { ) .await .unwrap(); - bo.sync_welcomes().await.unwrap(); + bo.sync_welcomes(&bo.store().conn().unwrap()).await.unwrap(); // Bo should have two groups now let bo_groups = bo.find_groups(FindGroupParams::default()).unwrap(); diff --git a/xmtp_mls/src/groups/device_sync.rs b/xmtp_mls/src/groups/device_sync.rs index 33ad5e790..6f8e17293 100644 --- a/xmtp_mls/src/groups/device_sync.rs +++ b/xmtp_mls/src/groups/device_sync.rs @@ -291,7 +291,7 @@ where let enc_payload = download_history_payload(&reply.url).await?; insert_encrypted_syncables(conn, enc_payload, &enc_key.try_into()?)?; - self.sync_welcomes().await?; + self.sync_welcomes(provider.conn_ref()).await?; let groups = conn.find_groups(None, None, None, None, Some(ConversationType::Group))?; for crate::storage::group::StoredGroup { id, .. } in groups.into_iter() { diff --git a/xmtp_mls/src/groups/device_sync/consent_sync.rs b/xmtp_mls/src/groups/device_sync/consent_sync.rs index e761cd866..4158a92dc 100644 --- a/xmtp_mls/src/groups/device_sync/consent_sync.rs +++ b/xmtp_mls/src/groups/device_sync/consent_sync.rs @@ -118,7 +118,11 @@ pub(crate) mod tests { // Turn on history sync for the second installation. assert_ok!(amal_b.enable_history_sync(&amal_b_provider).await); // Check for new welcomes to new groups in the first installation (should be welcomed to a new sync group from amal_b). - amal_a.sync_welcomes().await.expect("sync_welcomes"); + amal_a + .sync_welcomes(amal_a_conn) + .await + .expect("sync_welcomes"); + // Have the second installation request for a consent sync. let (_group_id, _pin_code) = amal_b .send_consent_sync_request() @@ -126,7 +130,7 @@ pub(crate) mod tests { .expect("history request"); // The first installation should now be a part of the sync group created by the second installation. - let amal_a_sync_groups = amal_a.store().conn().unwrap().latest_sync_group().unwrap(); + let amal_a_sync_groups = amal_a_conn.latest_sync_group().unwrap(); assert!(amal_a_sync_groups.is_some()); // Have first installation reply. diff --git a/xmtp_mls/src/groups/device_sync/message_sync.rs b/xmtp_mls/src/groups/device_sync/message_sync.rs index 49c87a186..785434bc6 100644 --- a/xmtp_mls/src/groups/device_sync/message_sync.rs +++ b/xmtp_mls/src/groups/device_sync/message_sync.rs @@ -119,7 +119,7 @@ pub(crate) mod tests { let mut amal_a = ClientBuilder::new_test_client(&wallet).await; amal_a.history_sync_url = Some(history_sync_url.clone()); let amal_a_provider = amal_a.mls_provider().unwrap(); - let amal_a_conn = amal_a.store().conn().unwrap(); + let amal_a_conn = amal_a_provider.conn_ref(); // Create an alix client. let alix_wallet = generate_local_wallet(); @@ -149,11 +149,14 @@ pub(crate) mod tests { // Create a second installation for amal. let amal_b = ClientBuilder::new_test_client(&wallet).await; let amal_b_provider = amal_b.mls_provider().unwrap(); - let amal_b_conn = amal_b.store().conn().unwrap(); + let amal_b_conn = amal_b_provider.conn_ref(); // Turn on history sync for the second installation. assert_ok!(amal_b.enable_history_sync(&amal_b_provider).await); // Check for new welcomes to new groups in the first installation (should be welcomed to a new sync group from amal_b). - amal_a.sync_welcomes().await.expect("sync_welcomes"); + amal_a + .sync_welcomes(amal_a_conn) + .await + .expect("sync_welcomes"); // Have the second installation request for a consent sync. let (_group_id, _pin_code) = amal_b .send_history_sync_request() @@ -246,7 +249,9 @@ pub(crate) mod tests { amal.enable_history_sync(&amal.mls_provider().unwrap()) .await ); - amal.sync_welcomes().await.expect("sync welcomes"); + amal.sync_welcomes(&amal.store().conn().unwrap()) + .await + .expect("sync welcomes"); let external_wallet = generate_local_wallet(); let external_client = ClientBuilder::new_test_client(&external_wallet).await; @@ -256,7 +261,7 @@ pub(crate) mod tests { .await ); external_client - .sync_welcomes() + .sync_welcomes(&external_client.store().conn().unwrap()) .await .expect("sync welcomes"); diff --git a/xmtp_mls/src/groups/intents.rs b/xmtp_mls/src/groups/intents.rs index 0dec504a7..13767ff5c 100644 --- a/xmtp_mls/src/groups/intents.rs +++ b/xmtp_mls/src/groups/intents.rs @@ -798,7 +798,10 @@ pub(crate) mod tests { verify_num_payloads_in_group(&group_a, 2).await; // Client B sends a message to Client A - let groups_b = client_b.sync_welcomes().await.unwrap(); + let groups_b = client_b + .sync_welcomes(&client_b.store().conn().unwrap()) + .await + .unwrap(); assert_eq!(groups_b.len(), 1); let group_b = groups_b[0].clone(); group_b diff --git a/xmtp_mls/src/groups/mod.rs b/xmtp_mls/src/groups/mod.rs index 8781ea8d3..3ae14882e 100644 --- a/xmtp_mls/src/groups/mod.rs +++ b/xmtp_mls/src/groups/mod.rs @@ -1549,7 +1549,10 @@ pub(crate) mod tests { use super::{group_permissions::PolicySet, MlsGroup}; async fn receive_group_invite(client: &FullXmtpClient) -> MlsGroup { - client.sync_welcomes().await.unwrap(); + client + .sync_welcomes(&client.store().conn().unwrap()) + .await + .unwrap(); let mut groups = client.find_groups(FindGroupParams::default()).unwrap(); groups.remove(0) @@ -1694,7 +1697,10 @@ pub(crate) mod tests { .unwrap(); // Get bola's version of the same group - let bola_groups = bola.sync_welcomes().await.unwrap(); + let bola_groups = bola + .sync_welcomes(&bola.store().conn().unwrap()) + .await + .unwrap(); let bola_group = bola_groups.first().unwrap(); // Call sync for both @@ -1750,7 +1756,10 @@ pub(crate) mod tests { .unwrap(); // Get bola's version of the same group - let bola_groups = bola.sync_welcomes().await.unwrap(); + let bola_groups = bola + .sync_welcomes(&bola.store().conn().unwrap()) + .await + .unwrap(); let bola_group = bola_groups.first().unwrap(); bola_group.sync().await.unwrap(); @@ -1858,7 +1867,7 @@ pub(crate) mod tests { force_add_member(&alix, &bo, &alix_group, &mut mls_group, &provider).await; // Bo should not be able to actually read this group - bo.sync_welcomes().await.unwrap(); + bo.sync_welcomes(&bo.store().conn().unwrap()).await.unwrap(); let groups = bo.find_groups(FindGroupParams::default()).unwrap(); assert_eq!(groups.len(), 0); assert_logged!("failed to create group from welcome", 1); @@ -1985,7 +1994,10 @@ pub(crate) mod tests { group.send_message(b"hello").await.expect("send message"); - bola_client.sync_welcomes().await.unwrap(); + bola_client + .sync_welcomes(&bola_client.store().conn().unwrap()) + .await + .unwrap(); let bola_groups = bola_client.find_groups(FindGroupParams::default()).unwrap(); let bola_group = bola_groups.first().unwrap(); bola_group.sync().await.unwrap(); @@ -2340,7 +2352,9 @@ pub(crate) mod tests { .add_members_by_inbox_id(&[bola.inbox_id()]) .await .unwrap(); - bola.sync_welcomes().await.unwrap(); + bola.sync_welcomes(&bola.store().conn().unwrap()) + .await + .unwrap(); let bola_groups = bola.find_groups(FindGroupParams::default()).unwrap(); assert_eq!(bola_groups.len(), 1); let bola_group = bola_groups.first().unwrap(); @@ -2508,7 +2522,9 @@ pub(crate) mod tests { .add_members(&[bola_wallet.get_address()]) .await .unwrap(); - bola.sync_welcomes().await.unwrap(); + bola.sync_welcomes(&bola.store().conn().unwrap()) + .await + .unwrap(); let bola_groups = bola.find_groups(FindGroupParams::default()).unwrap(); assert_eq!(bola_groups.len(), 1); let bola_group = bola_groups.first().unwrap(); @@ -2588,7 +2604,9 @@ pub(crate) mod tests { .add_members(&[bola_wallet.get_address()]) .await .unwrap(); - bola.sync_welcomes().await.unwrap(); + bola.sync_welcomes(&bola.store().conn().unwrap()) + .await + .unwrap(); let bola_groups = bola.find_groups(FindGroupParams::default()).unwrap(); assert_eq!(bola_groups.len(), 1); let bola_group = bola_groups.first().unwrap(); @@ -2604,7 +2622,9 @@ pub(crate) mod tests { assert!(super_admin_list.contains(&amal.inbox_id())); // Verify that bola can not add caro because they are not an admin - bola.sync_welcomes().await.unwrap(); + bola.sync_welcomes(&bola.store().conn().unwrap()) + .await + .unwrap(); let bola_groups = bola.find_groups(FindGroupParams::default()).unwrap(); assert_eq!(bola_groups.len(), 1); let bola_group: &MlsGroup<_> = bola_groups.first().unwrap(); @@ -2668,7 +2688,9 @@ pub(crate) mod tests { .contains(&bola.inbox_id())); // Verify that bola can not add charlie because they are not an admin - bola.sync_welcomes().await.unwrap(); + bola.sync_welcomes(&bola.store().conn().unwrap()) + .await + .unwrap(); let bola_groups = bola.find_groups(FindGroupParams::default()).unwrap(); assert_eq!(bola_groups.len(), 1); let bola_group: &MlsGroup<_> = bola_groups.first().unwrap(); @@ -2697,7 +2719,9 @@ pub(crate) mod tests { .add_members_by_inbox_id(&[bola.inbox_id()]) .await .unwrap(); - bola.sync_welcomes().await.unwrap(); + bola.sync_welcomes(&bola.store().conn().unwrap()) + .await + .unwrap(); let bola_groups = bola.find_groups(FindGroupParams::default()).unwrap(); assert_eq!(bola_groups.len(), 1); let bola_group = bola_groups.first().unwrap(); @@ -2713,7 +2737,9 @@ pub(crate) mod tests { assert!(super_admin_list.contains(&amal.inbox_id())); // Verify that bola can not add caro as an admin because they are not a super admin - bola.sync_welcomes().await.unwrap(); + bola.sync_welcomes(&bola.store().conn().unwrap()) + .await + .unwrap(); let bola_groups = bola.find_groups(FindGroupParams::default()).unwrap(); assert_eq!(bola_groups.len(), 1); let bola_group: &MlsGroup<_> = bola_groups.first().unwrap(); @@ -2897,7 +2923,10 @@ pub(crate) mod tests { // Bola syncs groups - this will decrypt the Welcome, identify who added Bola // and then store that value on the group and insert into the database - let bola_groups = bola.sync_welcomes().await.unwrap(); + let bola_groups = bola + .sync_welcomes(&bola.store().conn().unwrap()) + .await + .unwrap(); // Bola gets the group id. This will be needed to fetch the group from // the database. @@ -2964,7 +2993,9 @@ pub(crate) mod tests { .unwrap(); // Step 3: Verify that Bola can update the group name, and amal sees the update - bola.sync_welcomes().await.unwrap(); + bola.sync_welcomes(&bola.store().conn().unwrap()) + .await + .unwrap(); let bola_groups = bola.find_groups(FindGroupParams::default()).unwrap(); let bola_group: &MlsGroup<_> = bola_groups.first().unwrap(); bola_group.sync().await.unwrap(); @@ -3030,7 +3061,9 @@ pub(crate) mod tests { // Step 3: Bola attemps to add Caro, but fails because group is admin only let caro = ClientBuilder::new_test_client(&generate_local_wallet()).await; - bola.sync_welcomes().await.unwrap(); + bola.sync_welcomes(&bola.store().conn().unwrap()) + .await + .unwrap(); let bola_groups = bola.find_groups(FindGroupParams::default()).unwrap(); let bola_group: &MlsGroup<_> = bola_groups.first().unwrap(); bola_group.sync().await.unwrap(); @@ -3187,7 +3220,7 @@ pub(crate) mod tests { assert_eq!(members.len(), 2); // Bola can message amal - let _ = bola.sync_welcomes().await; + let _ = bola.sync_welcomes(&bola.store().conn().unwrap()).await; let bola_groups = bola .find_groups(FindGroupParams { conversation_type: None, @@ -3537,7 +3570,9 @@ pub(crate) mod tests { .await .unwrap(); - bola.sync_welcomes().await.unwrap(); + bola.sync_welcomes(&bola.store().conn().unwrap()) + .await + .unwrap(); let bola_groups = bola.find_groups(FindGroupParams::default()).unwrap(); let bola_group = bola_groups.first().unwrap(); // group consent state should default to unknown for users who did not create the group @@ -3556,7 +3591,9 @@ pub(crate) mod tests { .await .unwrap(); - caro.sync_welcomes().await.unwrap(); + caro.sync_welcomes(&caro.store().conn().unwrap()) + .await + .unwrap(); let caro_groups = caro.find_groups(FindGroupParams::default()).unwrap(); let caro_group = caro_groups.first().unwrap(); @@ -3586,7 +3623,7 @@ pub(crate) mod tests { ) .await .unwrap(); - bo.sync_welcomes().await.unwrap(); + bo.sync_welcomes(&bo.store().conn().unwrap()).await.unwrap(); let bo_groups = bo.find_groups(FindGroupParams::default()).unwrap(); let bo_group = bo_groups.first().unwrap(); diff --git a/xmtp_mls/src/groups/subscriptions.rs b/xmtp_mls/src/groups/subscriptions.rs index e3b8b0041..51a6a3562 100644 --- a/xmtp_mls/src/groups/subscriptions.rs +++ b/xmtp_mls/src/groups/subscriptions.rs @@ -293,7 +293,10 @@ pub(crate) mod tests { .unwrap(); // Get bola's version of the same group - let bola_groups = bola.sync_welcomes().await.unwrap(); + let bola_groups = bola + .sync_welcomes(&bola.store().conn().unwrap()) + .await + .unwrap(); let bola_group = Arc::new(bola_groups.first().unwrap().clone()); let bola_group_ptr = bola_group.clone(); diff --git a/xmtp_mls/src/subscriptions.rs b/xmtp_mls/src/subscriptions.rs index 8df86df8b..281231278 100644 --- a/xmtp_mls/src/subscriptions.rs +++ b/xmtp_mls/src/subscriptions.rs @@ -267,7 +267,8 @@ where conversation_type: Option, ) -> Result> + '_, ClientError> { - self.sync_welcomes().await?; + let conn = self.store().conn()?; + self.sync_welcomes(&conn).await?; let mut group_id_to_info = self .store() @@ -452,7 +453,10 @@ pub(crate) mod tests { .add_members_by_inbox_id(&[bob.inbox_id()]) .await .unwrap(); - let bob_group = bob.sync_welcomes().await.unwrap(); + let bob_group = bob + .sync_welcomes(&bob.store().conn().unwrap()) + .await + .unwrap(); let bob_group = bob_group.first().unwrap(); let notify = Delivery::new(None); @@ -759,7 +763,9 @@ pub(crate) mod tests { } // Verify syncing welcomes while streaming causes no issues - alix.sync_welcomes().await.unwrap(); + alix.sync_welcomes(&alix.store().conn().unwrap()) + .await + .unwrap(); let find_groups_results = alix.find_groups(FindGroupParams::default()).unwrap(); {