From 2b6b9cdf832078980ca668126bce3b4fcfff02a9 Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Fri, 29 Sep 2023 15:31:10 +0200 Subject: [bugfix] Fix paging for empty items (#2236) * use minID properly for public timeline * return paged response properly even when 0 items * use gtserror * page more consistently (for now) * test * aaa --- internal/util/paging.go | 5 ----- 1 file changed, 5 deletions(-) (limited to 'internal/util/paging.go') diff --git a/internal/util/paging.go b/internal/util/paging.go index 0ab4b9567..190f40afd 100644 --- a/internal/util/paging.go +++ b/internal/util/paging.go @@ -48,11 +48,6 @@ type PageableResponseParams struct { // a bunch of pageable items (notifications, statuses, etc), as well // as a Link header to inform callers of where to find next/prev items. func PackagePageableResponse(params PageableResponseParams) (*apimodel.PageableResponse, gtserror.WithCode) { - if len(params.Items) == 0 { - // No items to page through. - return EmptyPageableResponse(), nil - } - // Set default paging values, if // they weren't set by the caller. if params.NextMaxIDKey == "" { -- cgit v1.2.3