[bugfix] Fix tusky search issue by returning empty if offset is greater than zero (#786)

This commit is contained in:
Blackle Morisanchetto 2022-08-31 03:57:50 -04:00 committed by GitHub
parent ea902bb500
commit c5c425b4e7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -54,6 +54,13 @@ func (p *processor) SearchGet(ctx context.Context, authed *oauth.Auth, search *a
Statuses: []apimodel.Status{}, Statuses: []apimodel.Status{},
Hashtags: []apimodel.Tag{}, Hashtags: []apimodel.Tag{},
} }
// currently the search will only ever return one result,
// so return nothing if the offset is greater than 0
if search.Offset > 0 {
return searchResult, nil
}
foundAccounts := []*gtsmodel.Account{} foundAccounts := []*gtsmodel.Account{}
foundStatuses := []*gtsmodel.Status{} foundStatuses := []*gtsmodel.Status{}