diff --git a/Sources/XMTPiOS/PrivatePreferences.swift b/Sources/XMTPiOS/PrivatePreferences.swift index de6b8e43..9c6d9c03 100644 --- a/Sources/XMTPiOS/PrivatePreferences.swift +++ b/Sources/XMTPiOS/PrivatePreferences.swift @@ -83,6 +83,10 @@ public actor PrivatePreferences { ).fromFFI } + public func syncConsent() async throws { + try await ffiClient.sendSyncRequest(kind: .consent) + } + public func streamConsent() -> AsyncThrowingStream { diff --git a/Tests/XMTPTests/HistorySyncTests.swift b/Tests/XMTPTests/HistorySyncTests.swift index 6d29a2b0..5a16d483 100644 --- a/Tests/XMTPTests/HistorySyncTests.swift +++ b/Tests/XMTPTests/HistorySyncTests.swift @@ -44,6 +44,7 @@ class HistorySyncTests: XCTestCase { let state = try await alixClient2.inboxState(refreshFromNetwork: true) XCTAssertEqual(state.installations.count, 2) + try await alixClient2.preferences.syncConsent() try await alixClient.conversations.syncAllConversations() sleep(2) try await alixClient2.conversations.syncAllConversations()