0
0
Fork 0
mirror of https://github.com/matrix-org/dendrite synced 2024-06-18 12:28:28 +02:00

"Enable" remote room search (#2099)

* "Enable" remote room search

Signed-off-by: Till Faelligen <tfaelligen@gmail.com>

* Update go.mod

* Fix formatting
This commit is contained in:
S7evinK 2022-01-28 12:07:47 +01:00 committed by GitHub
parent 48789ebec5
commit f034098877
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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()