commit c5c425b4e75855b72eb43f85b6f900e7d8cba2d0
parent ea902bb500f03ac6c2616bc94d3da3563763cf26
Author: Blackle Morisanchetto <isabelle@blackle-mori.com>
Date: Wed, 31 Aug 2022 03:57:50 -0400
[bugfix] Fix tusky search issue by returning empty if offset is greater than zero (#786)
Diffstat:
1 file changed, 7 insertions(+), 0 deletions(-)
diff --git a/internal/processing/search.go b/internal/processing/search.go
@@ -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{}