diff options
Diffstat (limited to 'internal/db/bundb/relationship.go')
-rw-r--r-- | internal/db/bundb/relationship.go | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/internal/db/bundb/relationship.go b/internal/db/bundb/relationship.go index 60dd72663..ba72a053a 100644 --- a/internal/db/bundb/relationship.go +++ b/internal/db/bundb/relationship.go @@ -292,7 +292,8 @@ func (r *relationshipDB) GetAccountFollowRequests(ctx context.Context, accountID followRequests := []*gtsmodel.FollowRequest{} q := r.newFollowQ(&followRequests). - Where("target_account_id = ?", accountID) + Where("target_account_id = ?", accountID). + Order("follow_request.updated_at DESC") if err := q.Scan(ctx); err != nil { return nil, r.conn.ProcessError(err) @@ -304,7 +305,8 @@ func (r *relationshipDB) GetAccountFollows(ctx context.Context, accountID string follows := []*gtsmodel.Follow{} q := r.newFollowQ(&follows). - Where("account_id = ?", accountID) + Where("account_id = ?", accountID). + Order("follow.updated_at DESC") if err := q.Scan(ctx); err != nil { return nil, r.conn.ProcessError(err) @@ -325,7 +327,8 @@ func (r *relationshipDB) GetAccountFollowedBy(ctx context.Context, accountID str q := r.conn. NewSelect(). - Model(&follows) + Model(&follows). + Order("follow.updated_at DESC") if localOnly { q = q.ColumnExpr("follow.*"). |