From c5c425b4e75855b72eb43f85b6f900e7d8cba2d0 Mon Sep 17 00:00:00 2001 From: Blackle Morisanchetto Date: Wed, 31 Aug 2022 03:57:50 -0400 Subject: [PATCH] [bugfix] Fix tusky search issue by returning empty if offset is greater than zero (#786) --- internal/processing/search.go | 7 +++++++ 1 file changed, 7 insertions(+) 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{}