aboutsummaryrefslogtreecommitdiff
path: root/clientapi
diff options
context:
space:
mode:
authorKegsay <kegan@matrix.org>2020-09-07 14:47:59 +0100
committerGitHub <noreply@github.com>2020-09-07 14:47:59 +0100
commitc992f4f1f44b0e43e52010b10bc0a82ddf26848d (patch)
tree5468390c58377a69f9ae30b6511667e011256e8a /clientapi
parent8589f8373e627f9229e729186ab800d3116c12da (diff)
Remove current state server (#1405)
* Remove current state server Closes #1365 #1272 #1357 * Remove current state server from scripts/docs
Diffstat (limited to 'clientapi')
-rw-r--r--clientapi/clientapi.go4
-rw-r--r--clientapi/routing/directory.go3
-rw-r--r--clientapi/routing/profile.go5
-rw-r--r--clientapi/routing/routing.go8
4 files changed, 7 insertions, 13 deletions
diff --git a/clientapi/clientapi.go b/clientapi/clientapi.go
index fe6789fc..2ab92ed4 100644
--- a/clientapi/clientapi.go
+++ b/clientapi/clientapi.go
@@ -21,7 +21,6 @@ import (
"github.com/matrix-org/dendrite/clientapi/api"
"github.com/matrix-org/dendrite/clientapi/producers"
"github.com/matrix-org/dendrite/clientapi/routing"
- currentstateAPI "github.com/matrix-org/dendrite/currentstateserver/api"
eduServerAPI "github.com/matrix-org/dendrite/eduserver/api"
federationSenderAPI "github.com/matrix-org/dendrite/federationsender/api"
"github.com/matrix-org/dendrite/internal/config"
@@ -43,7 +42,6 @@ func AddPublicRoutes(
rsAPI roomserverAPI.RoomserverInternalAPI,
eduInputAPI eduServerAPI.EDUServerInputAPI,
asAPI appserviceAPI.AppServiceQueryAPI,
- stateAPI currentstateAPI.CurrentStateInternalAPI,
transactionsCache *transactions.Cache,
fsAPI federationSenderAPI.FederationSenderInternalAPI,
userAPI userapi.UserInternalAPI,
@@ -58,6 +56,6 @@ func AddPublicRoutes(
routing.Setup(
router, cfg, eduInputAPI, rsAPI, asAPI,
accountsDB, userAPI, federation,
- syncProducer, transactionsCache, fsAPI, stateAPI, keyAPI, extRoomsProvider,
+ syncProducer, transactionsCache, fsAPI, keyAPI, extRoomsProvider,
)
}
diff --git a/clientapi/routing/directory.go b/clientapi/routing/directory.go
index 13fbfe7c..e64d6b23 100644
--- a/clientapi/routing/directory.go
+++ b/clientapi/routing/directory.go
@@ -20,7 +20,6 @@ import (
"github.com/matrix-org/dendrite/clientapi/httputil"
"github.com/matrix-org/dendrite/clientapi/jsonerror"
- currentstateAPI "github.com/matrix-org/dendrite/currentstateserver/api"
federationSenderAPI "github.com/matrix-org/dendrite/federationsender/api"
"github.com/matrix-org/dendrite/internal/config"
roomserverAPI "github.com/matrix-org/dendrite/roomserver/api"
@@ -270,7 +269,7 @@ func GetVisibility(
// SetVisibility implements PUT /directory/list/room/{roomID}
// TODO: Allow admin users to edit the room visibility
func SetVisibility(
- req *http.Request, stateAPI currentstateAPI.CurrentStateInternalAPI, rsAPI roomserverAPI.RoomserverInternalAPI, dev *userapi.Device,
+ req *http.Request, rsAPI roomserverAPI.RoomserverInternalAPI, dev *userapi.Device,
roomID string,
) util.JSONResponse {
resErr := checkMemberInRoom(req.Context(), rsAPI, dev.UserID, roomID)
diff --git a/clientapi/routing/profile.go b/clientapi/routing/profile.go
index 5dd44ca2..60669a0c 100644
--- a/clientapi/routing/profile.go
+++ b/clientapi/routing/profile.go
@@ -23,7 +23,6 @@ import (
"github.com/matrix-org/dendrite/clientapi/auth/authtypes"
"github.com/matrix-org/dendrite/clientapi/httputil"
"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/internal/eventutil"
"github.com/matrix-org/dendrite/roomserver/api"
@@ -94,7 +93,7 @@ func GetAvatarURL(
// SetAvatarURL implements PUT /profile/{userID}/avatar_url
// nolint:gocyclo
func SetAvatarURL(
- req *http.Request, accountDB accounts.Database, stateAPI currentstateAPI.CurrentStateInternalAPI,
+ req *http.Request, accountDB accounts.Database,
device *userapi.Device, userID string, cfg *config.ClientAPI, rsAPI api.RoomserverInternalAPI,
) util.JSONResponse {
if userID != device.UserID {
@@ -212,7 +211,7 @@ func GetDisplayName(
// SetDisplayName implements PUT /profile/{userID}/displayname
// nolint:gocyclo
func SetDisplayName(
- req *http.Request, accountDB accounts.Database, stateAPI currentstateAPI.CurrentStateInternalAPI,
+ req *http.Request, accountDB accounts.Database,
device *userapi.Device, userID string, cfg *config.ClientAPI, rsAPI api.RoomserverInternalAPI,
) util.JSONResponse {
if userID != device.UserID {
diff --git a/clientapi/routing/routing.go b/clientapi/routing/routing.go
index 97ab03e3..326ef70c 100644
--- a/clientapi/routing/routing.go
+++ b/clientapi/routing/routing.go
@@ -25,7 +25,6 @@ import (
"github.com/matrix-org/dendrite/clientapi/auth"
"github.com/matrix-org/dendrite/clientapi/jsonerror"
"github.com/matrix-org/dendrite/clientapi/producers"
- currentstateAPI "github.com/matrix-org/dendrite/currentstateserver/api"
eduServerAPI "github.com/matrix-org/dendrite/eduserver/api"
federationSenderAPI "github.com/matrix-org/dendrite/federationsender/api"
"github.com/matrix-org/dendrite/internal/config"
@@ -56,7 +55,6 @@ func Setup(
syncProducer *producers.SyncAPIProducer,
transactionsCache *transactions.Cache,
federationSender federationSenderAPI.FederationSenderInternalAPI,
- stateAPI currentstateAPI.CurrentStateInternalAPI,
keyAPI keyserverAPI.KeyInternalAPI,
extRoomsProvider api.ExtraPublicRoomsProvider,
) {
@@ -331,7 +329,7 @@ func Setup(
if err != nil {
return util.ErrorResponse(err)
}
- return SetVisibility(req, stateAPI, rsAPI, device, vars["roomID"])
+ return SetVisibility(req, rsAPI, device, vars["roomID"])
}),
).Methods(http.MethodPut, http.MethodOptions)
r0mux.Handle("/publicRooms",
@@ -494,7 +492,7 @@ func Setup(
if err != nil {
return util.ErrorResponse(err)
}
- return SetAvatarURL(req, accountDB, stateAPI, device, vars["userID"], cfg, rsAPI)
+ return SetAvatarURL(req, accountDB, device, vars["userID"], cfg, rsAPI)
}),
).Methods(http.MethodPut, http.MethodOptions)
// Browsers use the OPTIONS HTTP method to check if the CORS policy allows
@@ -519,7 +517,7 @@ func Setup(
if err != nil {
return util.ErrorResponse(err)
}
- return SetDisplayName(req, accountDB, stateAPI, device, vars["userID"], cfg, rsAPI)
+ return SetDisplayName(req, accountDB, device, vars["userID"], cfg, rsAPI)
}),
).Methods(http.MethodPut, http.MethodOptions)
// Browsers use the OPTIONS HTTP method to check if the CORS policy allows