summaryrefslogtreecommitdiff
path: root/internal/db
diff options
context:
space:
mode:
authorLibravatar Christoph Voigt <voigt.christoph@gmail.com>2022-12-13 12:33:49 +0100
committerLibravatar GitHub <noreply@github.com>2022-12-13 12:33:49 +0100
commit8703933df4e3c4c0c778c4953b1f013d6811aa31 (patch)
tree7afbf3c923b957ea4105f0065fbff8ba04da31e8 /internal/db
parent[feature] allow uncaching of other media types (#1234) (diff)
downloadgotosocial-8703933df4e3c4c0c778c4953b1f013d6811aa31.tar.xz
[bugfix] fix unordered favorites (#1245)
* [bugfix] fix unordered favorites * add test for favouritesget * add license to new test files
Diffstat (limited to 'internal/db')
-rw-r--r--internal/db/bundb/timeline.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/db/bundb/timeline.go b/internal/db/bundb/timeline.go
index b52b68459..5ebfd6f76 100644
--- a/internal/db/bundb/timeline.go
+++ b/internal/db/bundb/timeline.go
@@ -233,7 +233,7 @@ func (t *timelineDB) GetFavedTimeline(ctx context.Context, accountID string, max
// Sort by favourite ID rather than status ID
slices.SortFunc(faves, func(a, b *gtsmodel.StatusFave) bool {
- return b.CreatedAt.Before(a.CreatedAt)
+ return a.ID > b.ID
})
statuses := make([]*gtsmodel.Status, 0, len(faves))