From af277a00fb254a1916da8db12caf480655d4894d Mon Sep 17 00:00:00 2001 From: Naomi Plasterer Date: Wed, 3 Jan 2024 13:49:40 -0800 Subject: [PATCH] paginate the query so all consent entries are returned (#213) --- Sources/XMTP/Contacts.swift | 5 ++--- XMTP.podspec | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Sources/XMTP/Contacts.swift b/Sources/XMTP/Contacts.swift index b12f5385..9c1889e4 100644 --- a/Sources/XMTP/Contacts.swift +++ b/Sources/XMTP/Contacts.swift @@ -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), diff --git a/XMTP.podspec b/XMTP.podspec index 350e48f6..8b4ec473 100644 --- a/XMTP.podspec +++ b/XMTP.podspec @@ -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.