Skip to content

Commit

Permalink
bring back sync consent
Browse files Browse the repository at this point in the history
  • Loading branch information
nplasterer committed Dec 20, 2024
1 parent a94aebf commit 07e21ab
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Sources/XMTPiOS/PrivatePreferences.swift
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,10 @@ public actor PrivatePreferences {
).fromFFI
}

public func syncConsent() async throws {
try await ffiClient.sendSyncRequest(kind: .consent)
}

public func streamConsent()
-> AsyncThrowingStream<ConsentRecord, Error>
{
Expand Down
1 change: 1 addition & 0 deletions Tests/XMTPTests/HistorySyncTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 07e21ab

Please sign in to comment.