summaryrefslogtreecommitdiff
path: root/internal/api/client/search/searchget.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/api/client/search/searchget.go')
-rw-r--r--internal/api/client/search/searchget.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/internal/api/client/search/searchget.go b/internal/api/client/search/searchget.go
index 909c14f24..76cb929bf 100644
--- a/internal/api/client/search/searchget.go
+++ b/internal/api/client/search/searchget.go
@@ -175,6 +175,18 @@ func (m *Module) SearchGETHandler(c *gin.Context) {
return
}
+ if authed.Account.IsMoving() {
+ // For moving/moved accounts, just return
+ // empty to avoid breaking client apps.
+ results := &apimodel.SearchResult{
+ Accounts: make([]*apimodel.Account, 0),
+ Statuses: make([]*apimodel.Status, 0),
+ Hashtags: make([]any, 0),
+ }
+ apiutil.JSON(c, http.StatusOK, results)
+ return
+ }
+
if _, err := apiutil.NegotiateAccept(c, apiutil.JSONAcceptHeaders...); err != nil {
apiutil.ErrorHandler(c, gtserror.NewErrorNotAcceptable(err, err.Error()), m.processor.InstanceGetV1)
return