mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-19 12:03:01 -06:00
domain blocky block block
This commit is contained in:
parent
72a2bef878
commit
6f20eaee75
16 changed files with 193 additions and 29 deletions
|
|
@ -53,6 +53,8 @@ func (ps *postgresService) GetDomainCountForInstance(domain string) (int, error)
|
|||
}
|
||||
|
||||
func (ps *postgresService) GetAccountsForInstance(domain string, maxID string, limit int) ([]*gtsmodel.Account, error) {
|
||||
ps.log.Debug("GetAccountsForInstance")
|
||||
|
||||
accounts := []*gtsmodel.Account{}
|
||||
|
||||
q := ps.conn.Model(&accounts).Where("domain = ?", domain).Order("id DESC")
|
||||
|
|
|
|||
|
|
@ -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