tests passing

This commit is contained in:
tsmethurst 2021-08-24 23:07:14 +02:00
commit ef7e0cfe4f
28 changed files with 168 additions and 146 deletions

View file

@ -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
}