diff options
| author | 2021-08-26 22:06:34 +0200 | |
|---|---|---|
| committer | 2021-08-26 22:06:34 +0200 | |
| commit | 30f688dbe283106162de80ad1759322794ecbf03 (patch) | |
| tree | b84634c3e896180ebd9fda3f3425e718e024f603 /internal/db/bundb/account.go | |
| parent | fix broken db queries in auth (#160) (diff) | |
| download | gotosocial-30f688dbe283106162de80ad1759322794ecbf03.tar.xz | |
some more little fixes for all to enjoy (#161)
Diffstat (limited to 'internal/db/bundb/account.go')
| -rw-r--r-- | internal/db/bundb/account.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/internal/db/bundb/account.go b/internal/db/bundb/account.go index c96d0df9e..aef1f3281 100644 --- a/internal/db/bundb/account.go +++ b/internal/db/bundb/account.go @@ -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 } |
