diff --git a/internal/db/bundb/timeline.go b/internal/db/bundb/timeline.go index 9448e1b74..8278de647 100644 --- a/internal/db/bundb/timeline.go +++ b/internal/db/bundb/timeline.go @@ -162,12 +162,12 @@ func (t *timelineDB) GetLocalTimeline(ctx context.Context, page *paging.Page) ([ // Public only. q = q.Where("? = ?", bun.Ident("visibility"), gtsmodel.VisibilityPublic) - // Ignore boosts. - q = q.Where("? IS NULL", bun.Ident("boost_of_id")) - // Only include statuses that aren't pending approval. q = q.Where("? = ?", bun.Ident("pending_approval"), false) + // Ignore boosts. + q = q.Where("? IS NULL", bun.Ident("boost_of_id")) + return q, nil }, ) @@ -332,6 +332,13 @@ func loadStatusTimelinePage( Table("statuses"). Column("id") + // Append caller + // query details. + q, err := query(q) + if err != nil { + return nil, err + } + if maxID != "" { // Set a maximum ID boundary if was given. q = q.Where("? < ?", bun.Ident("id"), maxID) @@ -342,13 +349,6 @@ func loadStatusTimelinePage( q = q.Where("? > ?", bun.Ident("id"), minID) } - // Append caller - // query details. - q, err := query(q) - if err != nil { - return nil, err - } - // Set query ordering. if order.Ascending() { q = q.OrderExpr("? ASC", bun.Ident("id"))