-
Notifications
You must be signed in to change notification settings - Fork 23
Expose sendSyncRequest #529
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
base: main
Are you sure you want to change the base?
Conversation
|
Claude finished @codabrink's task —— View job Review Complete ✓I've reviewed the PR to expose Tasks
Code Review Feedback✅ Positives
🔍 Observations & Suggestions
🔒 Security & Performance
📝 Suggested Improvements
/**
* Manually trigger a device sync request to sync records from another active device on this account.
*
* This method requests synchronization of data from other devices associated with this inbox.
* It's useful when you need to ensure the latest state is retrieved from other active installations.
*
* @throws XMTPException if the sync request fails or if the client is not properly initialized
* @see ClientOptions.deviceSyncEnabled to control automatic sync behavior
*/
suspend fun sendSyncRequest() =
withContext(Dispatchers.IO) {
ffiClient.sendSyncRequest()
}
@Test
fun testSendSyncRequest() = runBlocking {
val fixtures = createFixtures()
// Should not throw when called
fixtures.alixClient.sendSyncRequest()
// Verify it works with deviceSync disabled
val clientWithoutSync = createClient(
fixtures.alixAccount,
deviceSyncEnabled = false
)
// Document expected behavior here
}SummaryThis is a clean, straightforward PR that appropriately exposes existing functionality. The code quality is good and follows established patterns. The main recommendation is to add test coverage to ensure the method behaves correctly under various conditions. Recommendation: ✅ Approve with suggestion to add tests |
Expose
|
Expose sendSyncRequest on the client.