mirror of
https://github.com/matrix-org/dendrite.git
synced 2026-01-16 18:43:10 -06:00
Remove userAPI from federationapi
This commit is contained in:
parent
32b39d28d3
commit
92657ccf45
|
|
@ -23,6 +23,11 @@ import (
|
|||
|
||||
"github.com/getsentry/sentry-go"
|
||||
"github.com/gorilla/mux"
|
||||
"github.com/matrix-org/gomatrixserverlib"
|
||||
"github.com/matrix-org/util"
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
"github.com/sirupsen/logrus"
|
||||
|
||||
"github.com/matrix-org/dendrite/clientapi/jsonerror"
|
||||
federationAPI "github.com/matrix-org/dendrite/federationapi/api"
|
||||
fedInternal "github.com/matrix-org/dendrite/federationapi/internal"
|
||||
|
|
@ -34,10 +39,6 @@ import (
|
|||
roomserverAPI "github.com/matrix-org/dendrite/roomserver/api"
|
||||
"github.com/matrix-org/dendrite/setup/config"
|
||||
userapi "github.com/matrix-org/dendrite/userapi/api"
|
||||
"github.com/matrix-org/gomatrixserverlib"
|
||||
"github.com/matrix-org/util"
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
// Setup registers HTTP handlers with the given ServeMux.
|
||||
|
|
@ -128,7 +129,7 @@ func Setup(
|
|||
func(httpReq *http.Request, request *gomatrixserverlib.FederationRequest, vars map[string]string) util.JSONResponse {
|
||||
return Send(
|
||||
httpReq, request, gomatrixserverlib.TransactionID(vars["txnID"]),
|
||||
cfg, rsAPI, keyAPI, userAPI, keys, federation, mu, servers, producer,
|
||||
cfg, rsAPI, keyAPI, keys, federation, mu, servers, producer,
|
||||
)
|
||||
},
|
||||
)).Methods(http.MethodPut, http.MethodOptions)
|
||||
|
|
|
|||
|
|
@ -85,7 +85,6 @@ func Send(
|
|||
cfg *config.FederationAPI,
|
||||
rsAPI api.FederationRoomserverAPI,
|
||||
keyAPI keyapi.FederationKeyAPI,
|
||||
userAPI userapi.FederationUserAPI,
|
||||
keys gomatrixserverlib.JSONVerifier,
|
||||
federation federationAPI.FederationClient,
|
||||
mu *internal.MutexByRoom,
|
||||
|
|
@ -133,7 +132,6 @@ func Send(
|
|||
roomsMu: mu,
|
||||
producer: producer,
|
||||
inboundPresenceEnabled: cfg.Matrix.Presence.EnableInbound,
|
||||
userAPI: userAPI,
|
||||
}
|
||||
|
||||
var txnEvents struct {
|
||||
|
|
@ -187,7 +185,6 @@ type txnReq struct {
|
|||
gomatrixserverlib.Transaction
|
||||
rsAPI api.FederationRoomserverAPI
|
||||
keyAPI keyapi.FederationKeyAPI
|
||||
userAPI userapi.FederationUserAPI
|
||||
ourServerName gomatrixserverlib.ServerName
|
||||
keys gomatrixserverlib.JSONVerifier
|
||||
federation txnFederationClient
|
||||
|
|
|
|||
|
|
@ -98,13 +98,6 @@ func NewInternalAPI(
|
|||
logrus.WithError(err).Panic("failed to start user API streamed event consumer")
|
||||
}
|
||||
|
||||
roomserverConsumer := consumers.NewOutputRoomEventConsumer(
|
||||
base, js, db,
|
||||
)
|
||||
if err := roomserverConsumer.Start(); err != nil {
|
||||
logrus.WithError(err).Panic("failed to start user API roomserver event consumer")
|
||||
}
|
||||
|
||||
var cleanOldNotifs func()
|
||||
cleanOldNotifs = func() {
|
||||
logrus.Infof("Cleaning old notifications")
|
||||
|
|
|
|||
Loading…
Reference in a new issue