From f0340988777fa13727d458a56480f2c3f70d8660 Mon Sep 17 00:00:00 2001 From: S7evinK <2353100+S7evinK@users.noreply.github.com> Date: Fri, 28 Jan 2022 12:07:47 +0100 Subject: [PATCH] "Enable" remote room search (#2099) * "Enable" remote room search Signed-off-by: Till Faelligen * Update go.mod * Fix formatting --- clientapi/routing/directory_public.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/clientapi/routing/directory_public.go b/clientapi/routing/directory_public.go index 2e3283be..0dacfced 100644 --- a/clientapi/routing/directory_public.go +++ b/clientapi/routing/directory_public.go @@ -63,7 +63,12 @@ func GetPostPublicRooms( serverName := gomatrixserverlib.ServerName(request.Server) if serverName != "" && serverName != cfg.Matrix.ServerName { - res, err := federation.GetPublicRooms(req.Context(), serverName, int(request.Limit), request.Since, false, "") + res, err := federation.GetPublicRoomsFiltered( + req.Context(), serverName, + int(request.Limit), request.Since, + request.Filter.SearchTerms, false, + "", + ) if err != nil { util.GetLogger(req.Context()).WithError(err).Error("failed to get public rooms") return jsonerror.InternalServerError()