Skip to content

Commit

Permalink
paginate the query so all consent entries are returned (#213)
Browse files Browse the repository at this point in the history
  • Loading branch information
nplasterer authored Jan 3, 2024
1 parent 2c7ad1e commit af277a0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions Sources/XMTP/Contacts.swift
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,13 @@ public class ConsentList {
throw ContactError.invalidIdentifier
}

let envelopes = try await client.query(topic: .preferenceList(identifier), pagination: Pagination(direction: .ascending))
let envelopes = try await client.apiClient.envelopes(topic: Topic.preferenceList(identifier).description, pagination: Pagination(direction: .ascending))

let consentList = ConsentList(client: client)

var preferences: [PrivatePreferencesAction] = []

for envelope in envelopes.envelopes {

for envelope in envelopes {

let payload = try XMTPRust.user_preferences_decrypt(
RustVec(publicKey),
Expand Down
2 changes: 1 addition & 1 deletion XMTP.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Pod::Spec.new do |spec|
#

spec.name = "XMTP"
spec.version = "0.7.4-alpha0"
spec.version = "0.7.5-alpha0"
spec.summary = "XMTP SDK Cocoapod"

# This description is used to generate tags and improve search results.
Expand Down

0 comments on commit af277a0

Please sign in to comment.