Move /joined_members back to the clientapi/roomserver (#3312)

Partly reverts #2827 by moving `/joined_members` back to the
clientAPI/roomserver
This commit is contained in:
Till 2024-01-25 21:35:05 +01:00 committed by GitHub
parent a4817f31c0
commit 8f68f1ff53
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 278 additions and 107 deletions

View file

@ -1513,4 +1513,14 @@ func Setup(
return GetPresence(req, device, natsClient, cfg.Matrix.JetStream.Prefixed(jetstream.RequestPresence), vars["userId"])
}),
).Methods(http.MethodGet, http.MethodOptions)
v3mux.Handle("/rooms/{roomID}/joined_members",
httputil.MakeAuthAPI("rooms_members", userAPI, func(req *http.Request, device *userapi.Device) util.JSONResponse {
vars, err := httputil.URLDecodeMapValues(mux.Vars(req))
if err != nil {
return util.ErrorResponse(err)
}
return GetJoinedMembers(req, device, vars["roomID"], rsAPI)
}),
).Methods(http.MethodGet, http.MethodOptions)
}