diff --git a/android/src/main/java/expo/modules/xmtpreactnativesdk/XMTPModule.kt b/android/src/main/java/expo/modules/xmtpreactnativesdk/XMTPModule.kt index 1b0104bd9..e8476ed6a 100644 --- a/android/src/main/java/expo/modules/xmtpreactnativesdk/XMTPModule.kt +++ b/android/src/main/java/expo/modules/xmtpreactnativesdk/XMTPModule.kt @@ -1092,7 +1092,6 @@ class XMTPModule : Module() { withContext(Dispatchers.IO) { logV("syncAllGroups") val client = clients[inboxId] ?: throw XMTPException("No client") - client.conversations.syncAllGroups() // Expo Modules do not support UInt, so we need to convert to Int val numGroupsSyncedInt: Int = client.conversations.syncAllGroups()?.toInt() ?: throw IllegalArgumentException( diff --git a/example/src/tests/groupPerformanceTests.ts b/example/src/tests/groupPerformanceTests.ts index 144e71038..201a09bbb 100644 --- a/example/src/tests/groupPerformanceTests.ts +++ b/example/src/tests/groupPerformanceTests.ts @@ -106,6 +106,15 @@ test('testing large group listings with ordering', async () => { end = Date.now() console.log(`Bo synced ${groups.length} groups in ${end - start}ms`) + start = Date.now() + await boClient.conversations.syncAllGroups() + end = Date.now() + console.log(`Bo synced all ${groups.length} groups in ${end - start}ms`) + assert( + end - start < 30000, + 'Syncing all 1000 groups should take less than a 30 second' + ) + start = Date.now() groups = await boClient.conversations.listGroups() end = Date.now()