mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-30 08:32:26 -05:00
add (now) missing slice reverse of tag timeline statuses when paging ASC
This commit is contained in:
parent
96250a941c
commit
294e1a6bd8
1 changed files with 7 additions and 0 deletions
|
|
@ -21,6 +21,7 @@ import (
|
||||||
"context"
|
"context"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"slices"
|
||||||
|
|
||||||
apimodel "github.com/superseriousbusiness/gotosocial/internal/api/model"
|
apimodel "github.com/superseriousbusiness/gotosocial/internal/api/model"
|
||||||
"github.com/superseriousbusiness/gotosocial/internal/db"
|
"github.com/superseriousbusiness/gotosocial/internal/db"
|
||||||
|
|
@ -71,6 +72,12 @@ func (p *Processor) TagTimelineGet(
|
||||||
return nil, gtserror.NewErrorInternalError(err)
|
return nil, gtserror.NewErrorInternalError(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if page.Order().Ascending() {
|
||||||
|
// Returned statuses always
|
||||||
|
// need to be in DESC order.
|
||||||
|
slices.Reverse(statuses)
|
||||||
|
}
|
||||||
|
|
||||||
return p.packageTagResponse(
|
return p.packageTagResponse(
|
||||||
ctx,
|
ctx,
|
||||||
requestingAcct,
|
requestingAcct,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue