Skip to content

Commit

Permalink
Bump consent pagination (#316)
Browse files Browse the repository at this point in the history
* bump the consent page to 500

* fix up some syntax

* bump the pod

* dont need to bump this cause ethan did
  • Loading branch information
nplasterer authored Apr 17, 2024
1 parent 321c449 commit be05813
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/XMTPiOS/ApiClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ final class GRPCApiClient: ApiClient {
cursor = response.pagingInfo.cursor
hasNextPage = !response.envelopes.isEmpty && response.pagingInfo.hasCursor

if let limit = pagination?.limit, envelopes.count >= limit {
if let limit = pagination?.limit, envelopes.count >= limit, limit <= 100 {
envelopes = Array(envelopes.prefix(limit))
break
}
Expand Down
1 change: 1 addition & 0 deletions Sources/XMTPiOS/Contacts.swift
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ public class ConsentList {
let newDate = Date()

let pagination = Pagination(
limit: 500,
after: lastFetched,
direction: .ascending
)
Expand Down

0 comments on commit be05813

Please sign in to comment.