Skip to content

Commit

Permalink
[bugfix] Fix tusky search issue by returning empty if offset is great…
Browse files Browse the repository at this point in the history
…er than zero (#786)
  • Loading branch information
blackle authored Aug 31, 2022
1 parent ea902bb commit c5c425b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions internal/processing/search.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,13 @@ func (p *processor) SearchGet(ctx context.Context, authed *oauth.Auth, search *a
Statuses: []apimodel.Status{},
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{}
foundStatuses := []*gtsmodel.Status{}

Expand Down

0 comments on commit c5c425b

Please sign in to comment.