add (now) missing slice reverse of tag timeline statuses when paging ASC

This commit is contained in:
kim 2025-04-02 19:50:50 +01:00
commit 294e1a6bd8

View file

@ -21,6 +21,7 @@ import (
"context"
"errors"
"fmt"
"slices"
apimodel "github.com/superseriousbusiness/gotosocial/internal/api/model"
"github.com/superseriousbusiness/gotosocial/internal/db"
@ -71,6 +72,12 @@ func (p *Processor) TagTimelineGet(
return nil, gtserror.NewErrorInternalError(err)
}
if page.Order().Ascending() {
// Returned statuses always
// need to be in DESC order.
slices.Reverse(statuses)
}
return p.packageTagResponse(
ctx,
requestingAcct,