mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2026-01-06 03:13:15 -06:00
tests passing
This commit is contained in:
parent
465aa3da86
commit
ef7e0cfe4f
28 changed files with 168 additions and 146 deletions
|
|
@ -206,6 +206,10 @@ func (a *accountDB) GetAccountStatuses(ctx context.Context, accountID string, li
|
|||
q = q.Where("pinned = ?", true)
|
||||
}
|
||||
|
||||
if maxID != "" {
|
||||
q = q.Where("id < ?", maxID)
|
||||
}
|
||||
|
||||
if mediaOnly {
|
||||
q = q.WhereGroup(" AND ", func(q *bun.SelectQuery) *bun.SelectQuery {
|
||||
return q.
|
||||
|
|
@ -214,10 +218,6 @@ func (a *accountDB) GetAccountStatuses(ctx context.Context, accountID string, li
|
|||
})
|
||||
}
|
||||
|
||||
if maxID != "" {
|
||||
q = q.Where("id < ?", maxID)
|
||||
}
|
||||
|
||||
if err := q.Scan(ctx); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue