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

@ -197,19 +197,7 @@ func Setup(
}
at := req.URL.Query().Get("at")
return GetMemberships(req, device, vars["roomID"], syncDB, rsAPI, false, membership, notMembership, at)
return GetMemberships(req, device, vars["roomID"], syncDB, rsAPI, membership, notMembership, at)
}, httputil.WithAllowGuests()),
).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)
}
at := req.URL.Query().Get("at")
membership := spec.Join
return GetMemberships(req, device, vars["roomID"], syncDB, rsAPI, true, &membership, nil, at)
}),
).Methods(http.MethodGet, http.MethodOptions)
}