some more little fixes for all to enjoy (#161)

This commit is contained in:
tobi 2021-08-26 22:06:34 +02:00 committed by GitHub
commit 30f688dbe2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 16 deletions

View file

@ -217,10 +217,6 @@ func (a *accountDB) GetAccountStatuses(ctx context.Context, accountID string, li
q = q.Limit(limit)
}
if excludeReplies {
q = q.WhereGroup(" AND ", whereEmptyOrNull("in_reply_to_id"))
}
if pinnedOnly {
q = q.Where("pinned = ?", true)
}
@ -237,6 +233,10 @@ func (a *accountDB) GetAccountStatuses(ctx context.Context, accountID string, li
})
}
if excludeReplies {
q = q.WhereGroup(" AND ", whereEmptyOrNull("in_reply_to_id"))
}
if err := q.Scan(ctx); err != nil {
return nil, err
}