[bugfix] self-referencing collection pages for status replies (#2364)

This commit is contained in:
kim 2023-11-20 12:22:28 +00:00 committed by GitHub
commit 16275853eb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 611 additions and 427 deletions

View file

@ -18,6 +18,7 @@
package bundb
import (
"slices"
"strings"
"github.com/superseriousbusiness/gotosocial/internal/cache"
@ -99,7 +100,7 @@ func loadPagedIDs(cache *cache.SliceCache[string], key string, page *paging.Page
// order. Depending on the paging requested
// this may be an unexpected order.
if page.GetOrder().Ascending() {
ids = paging.Reverse(ids)
slices.Reverse(ids)
}
// Page the resulting IDs.