Remove QueryRoomsForUser from current state server (#1398)

This commit is contained in:
Kegsay 2020-09-04 15:58:30 +01:00 committed by GitHub
parent 5076925c18
commit 088294ee65
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 21 additions and 75 deletions

View file

@ -19,7 +19,6 @@ import (
"net/http"
"github.com/matrix-org/dendrite/clientapi/jsonerror"
currentstateAPI "github.com/matrix-org/dendrite/currentstateserver/api"
"github.com/matrix-org/dendrite/internal/config"
"github.com/matrix-org/dendrite/roomserver/api"
userapi "github.com/matrix-org/dendrite/userapi/api"
@ -94,10 +93,10 @@ func GetMemberships(
func GetJoinedRooms(
req *http.Request,
device *userapi.Device,
stateAPI currentstateAPI.CurrentStateInternalAPI,
rsAPI api.RoomserverInternalAPI,
) util.JSONResponse {
var res currentstateAPI.QueryRoomsForUserResponse
err := stateAPI.QueryRoomsForUser(req.Context(), &currentstateAPI.QueryRoomsForUserRequest{
var res api.QueryRoomsForUserResponse
err := rsAPI.QueryRoomsForUser(req.Context(), &api.QueryRoomsForUserRequest{
UserID: device.UserID,
WantMembership: "join",
}, &res)