mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-18 11:13:02 -06:00
domain blocky block block
This commit is contained in:
parent
72a2bef878
commit
6f20eaee75
16 changed files with 193 additions and 29 deletions
|
|
@ -512,6 +512,7 @@ func (ps *postgresService) CountStatusesByAccountID(accountID string) (int, erro
|
|||
}
|
||||
|
||||
func (ps *postgresService) GetStatusesForAccount(accountID string, limit int, excludeReplies bool, maxID string, pinnedOnly bool, mediaOnly bool) ([]*gtsmodel.Status, error) {
|
||||
ps.log.Debugf("getting statuses for account %s", accountID)
|
||||
statuses := []*gtsmodel.Status{}
|
||||
|
||||
q := ps.conn.Model(&statuses).Order("id DESC")
|
||||
|
|
@ -547,6 +548,12 @@ func (ps *postgresService) GetStatusesForAccount(accountID string, limit int, ex
|
|||
}
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if len(statuses) == 0 {
|
||||
return nil, db.ErrNoEntries{}
|
||||
}
|
||||
|
||||
ps.log.Debugf("returning statuses for account %s", accountID)
|
||||
return statuses, nil
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue