diff options
Diffstat (limited to 'internal/processing/search/util.go')
-rw-r--r-- | internal/processing/search/util.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/internal/processing/search/util.go b/internal/processing/search/util.go index 171d0e570..c0eac0ca3 100644 --- a/internal/processing/search/util.go +++ b/internal/processing/search/util.go @@ -48,11 +48,12 @@ func (p *Processor) packageAccounts( ctx context.Context, requestingAccount *gtsmodel.Account, accounts []*gtsmodel.Account, + includeInstanceAccounts bool, ) ([]*apimodel.Account, gtserror.WithCode) { apiAccounts := make([]*apimodel.Account, 0, len(accounts)) for _, account := range accounts { - if account.IsInstance() { + if !includeInstanceAccounts && account.IsInstance() { // No need to show instance accounts. continue } @@ -169,8 +170,9 @@ func (p *Processor) packageSearchResult( statuses []*gtsmodel.Status, tags []*gtsmodel.Tag, v1 bool, + includeInstanceAccounts bool, ) (*apimodel.SearchResult, gtserror.WithCode) { - apiAccounts, errWithCode := p.packageAccounts(ctx, requestingAccount, accounts) + apiAccounts, errWithCode := p.packageAccounts(ctx, requestingAccount, accounts, includeInstanceAccounts) if errWithCode != nil { return nil, errWithCode } |