From 33fed81a8de5a7002eda0c8754bcd355d4e5648a Mon Sep 17 00:00:00 2001 From: kim Date: Thu, 11 Sep 2025 14:57:32 +0200 Subject: [bugfix] set link header lo,hi values directly from returned slice, don't account for filtering (#4421) this fixes an issue with list pagination in list timelines as seen here: https://codeberg.org/tusky/Tusky/issues/5235 Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4421 Co-authored-by: kim Co-committed-by: kim --- internal/processing/timeline/public_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'internal/processing') diff --git a/internal/processing/timeline/public_test.go b/internal/processing/timeline/public_test.go index cf3ade7e5..341df999e 100644 --- a/internal/processing/timeline/public_test.go +++ b/internal/processing/timeline/public_test.go @@ -91,9 +91,9 @@ func (suite *PublicTestSuite) TestPublicTimelineGetNotEmpty() { // some other statuses were filtered out. suite.NoError(errWithCode) suite.Len(resp.Items, 1) - suite.Equal(`; rel="next", ; rel="prev"`, resp.LinkHeader) - suite.Equal(`http://localhost:8080/api/v1/timelines/public?limit=1&local=false&max_id=01F8MHCP5P2NWYQ416SBA0XSEV`, resp.NextLink) - suite.Equal(`http://localhost:8080/api/v1/timelines/public?limit=1&local=false&min_id=01FF25D5Q0DH7CHD57CTRS6WK0`, resp.PrevLink) + suite.Equal("; rel=\"next\", ; rel=\"prev\"", resp.LinkHeader) + suite.Equal("http://localhost:8080/api/v1/timelines/public?limit=1&local=false&max_id=01F8MHCP5P2NWYQ416SBA0XSEV", resp.NextLink) + suite.Equal("http://localhost:8080/api/v1/timelines/public?limit=1&local=false&min_id=01F8MHCP5P2NWYQ416SBA0XSEV", resp.PrevLink) } // A timeline containing a status hidden due to filtering should return other statuses with no error. -- cgit v1.2.3