fix public timeline bug (#150)

This commit is contained in:
tobi 2021-08-26 11:28:16 +02:00 committed by GitHub
commit ddc120d5e6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 162 additions and 79 deletions

View file

@ -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 != "" {