diff options
| author | 2021-08-26 11:28:16 +0200 | |
|---|---|---|
| committer | 2021-08-26 11:28:16 +0200 | |
| commit | ddc120d5e6e0f18f235a6b5bbe5ceec86efedc41 (patch) | |
| tree | 08869fd4514e7ba67c57e81e001df0e1c329414c /internal/db/bundb/timeline.go | |
| parent | Pg to bun (#148) (diff) | |
| download | gotosocial-ddc120d5e6e0f18f235a6b5bbe5ceec86efedc41.tar.xz | |
fix public timeline bug (#150)
Diffstat (limited to 'internal/db/bundb/timeline.go')
| -rw-r--r-- | internal/db/bundb/timeline.go | 6 |
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 != "" { |
