summaryrefslogtreecommitdiff
path: root/internal/processing
diff options
context:
space:
mode:
authorLibravatar Blackle Morisanchetto <isabelle@blackle-mori.com>2022-08-31 03:57:50 -0400
committerLibravatar GitHub <noreply@github.com>2022-08-31 09:57:50 +0200
commitc5c425b4e75855b72eb43f85b6f900e7d8cba2d0 (patch)
treeea2051728e326e9d3b13fd7c2acd58c96ac4ff75 /internal/processing
parent[Admin panel] Make Description boxes multi-line (#781) (diff)
downloadgotosocial-c5c425b4e75855b72eb43f85b6f900e7d8cba2d0.tar.xz
[bugfix] Fix tusky search issue by returning empty if offset is greater than zero (#786)
Diffstat (limited to 'internal/processing')
-rw-r--r--internal/processing/search.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/internal/processing/search.go b/internal/processing/search.go
index b766b4ba2..2e5ec2025 100644
--- 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{}