From f05874be3095d3fb3cefd1a92b3c35fe3ae3bf28 Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Tue, 2 Apr 2024 11:42:24 +0200 Subject: [feature] Option to hide followers/following (#2788) --- internal/ap/collections.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'internal/ap/collections.go') diff --git a/internal/ap/collections.go b/internal/ap/collections.go index da789e179..c55bbe70b 100644 --- a/internal/ap/collections.go +++ b/internal/ap/collections.go @@ -281,7 +281,7 @@ type CollectionParams struct { ID *url.URL // First page details. - First paging.Page + First *paging.Page Query url.Values // Total no. items. @@ -377,6 +377,11 @@ func buildCollection[C CollectionBuilder](collection C, params CollectionParams) totalItems.Set(params.Total) collection.SetActivityStreamsTotalItems(totalItems) + // No First page means we're done. + if params.First == nil { + return + } + // Append paging query params // to those already in ID prop. pageQueryParams := appendQuery( -- cgit v1.2.3