summaryrefslogtreecommitdiff
path: root/internal/db/bundb/timeline.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2021-08-26 11:28:16 +0200
committerLibravatar GitHub <noreply@github.com>2021-08-26 11:28:16 +0200
commitddc120d5e6e0f18f235a6b5bbe5ceec86efedc41 (patch)
tree08869fd4514e7ba67c57e81e001df0e1c329414c /internal/db/bundb/timeline.go
parentPg to bun (#148) (diff)
downloadgotosocial-ddc120d5e6e0f18f235a6b5bbe5ceec86efedc41.tar.xz
fix public timeline bug (#150)
Diffstat (limited to 'internal/db/bundb/timeline.go')
-rw-r--r--internal/db/bundb/timeline.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/internal/db/bundb/timeline.go b/internal/db/bundb/timeline.go
index b62ad4c50..cd202f436 100644
--- a/internal/db/bundb/timeline.go
+++ b/internal/db/bundb/timeline.go
@@ -96,9 +96,9 @@ func (t *timelineDB) GetPublicTimeline(ctx context.Context, accountID string, ma
NewSelect().
Model(&statuses).
Where("visibility = ?", gtsmodel.VisibilityPublic).
- Where("? IS NULL", bun.Ident("in_reply_to_id")).
- Where("? IS NULL", bun.Ident("in_reply_to_uri")).
- Where("? IS NULL", bun.Ident("boost_of_id")).
+ WhereGroup(" AND ", whereEmptyOrNull("in_reply_to_id")).
+ WhereGroup(" AND ", whereEmptyOrNull("in_reply_to_uri")).
+ WhereGroup(" AND ", whereEmptyOrNull("boost_of_id")).
Order("status.id DESC")
if maxID != "" {