Roomserver didn't take asAPI param before so return to that

This commit is contained in:
Neil Alexander 2020-04-30 17:14:51 +01:00
parent b99f31ae6b
commit 76cceac638
5 changed files with 4 additions and 9 deletions

View file

@ -149,7 +149,7 @@ func main() {
keyRing := keydb.CreateKeyRing(federation.Client, keyDB, cfg.Matrix.KeyPerspectives) keyRing := keydb.CreateKeyRing(federation.Client, keyDB, cfg.Matrix.KeyPerspectives)
rsAPI := roomserver.SetupRoomServerComponent( rsAPI := roomserver.SetupRoomServerComponent(
&base.Base, keyRing, federation, nil, &base.Base, keyRing, federation,
) )
eduInputAPI := eduserver.SetupEDUServerComponent( eduInputAPI := eduserver.SetupEDUServerComponent(
&base.Base, cache.New(), &base.Base, cache.New(),

View file

@ -58,7 +58,7 @@ func main() {
keyRing := keydb.CreateKeyRing(federation.Client, keyDB, cfg.Matrix.KeyPerspectives) keyRing := keydb.CreateKeyRing(federation.Client, keyDB, cfg.Matrix.KeyPerspectives)
rsAPI := roomserver.SetupRoomServerComponent( rsAPI := roomserver.SetupRoomServerComponent(
base, keyRing, federation, nil, // TODO: AS API here base, keyRing, federation,
) )
eduInputAPI := eduserver.SetupEDUServerComponent( eduInputAPI := eduserver.SetupEDUServerComponent(
base, cache.New(), base, cache.New(),

View file

@ -30,9 +30,8 @@ func main() {
federation := base.CreateFederationClient() federation := base.CreateFederationClient()
keyRing := keydb.CreateKeyRing(federation.Client, keyDB, cfg.Matrix.KeyPerspectives) keyRing := keydb.CreateKeyRing(federation.Client, keyDB, cfg.Matrix.KeyPerspectives)
asAPI := base.CreateHTTPAppServiceAPIs()
fsAPI := base.CreateHTTPFederationSenderAPIs() fsAPI := base.CreateHTTPFederationSenderAPIs()
rsAPI := roomserver.SetupRoomServerComponent(base, keyRing, federation, asAPI) // TODO: AS API here rsAPI := roomserver.SetupRoomServerComponent(base, keyRing, federation)
rsAPI.SetFederationSenderAPI(fsAPI) rsAPI.SetFederationSenderAPI(fsAPI)
base.SetupAndServeHTTP(string(base.Cfg.Bind.RoomServer), string(base.Cfg.Listen.RoomServer)) base.SetupAndServeHTTP(string(base.Cfg.Bind.RoomServer), string(base.Cfg.Listen.RoomServer))

View file

@ -123,7 +123,7 @@ func main() {
} }
p2pPublicRoomProvider := NewLibP2PPublicRoomsProvider(node) p2pPublicRoomProvider := NewLibP2PPublicRoomsProvider(node)
rsAPI := roomserver.SetupRoomServerComponent(base, keyRing, federation, nil) // TODO: AS API here rsAPI := roomserver.SetupRoomServerComponent(base, keyRing, federation)
eduInputAPI := eduserver.SetupEDUServerComponent(base, cache.New()) eduInputAPI := eduserver.SetupEDUServerComponent(base, cache.New())
asQuery := appservice.SetupAppServiceAPIComponent( asQuery := appservice.SetupAppServiceAPIComponent(
base, accountDB, deviceDB, federation, rsAPI, transactions.New(), base, accountDB, deviceDB, federation, rsAPI, transactions.New(),

View file

@ -24,8 +24,6 @@ import (
"github.com/matrix-org/dendrite/roomserver/internal" "github.com/matrix-org/dendrite/roomserver/internal"
"github.com/matrix-org/dendrite/roomserver/storage" "github.com/matrix-org/dendrite/roomserver/storage"
"github.com/sirupsen/logrus" "github.com/sirupsen/logrus"
appserviceAPI "github.com/matrix-org/dendrite/appservice/api"
) )
// SetupRoomServerComponent sets up and registers HTTP handlers for the // SetupRoomServerComponent sets up and registers HTTP handlers for the
@ -36,7 +34,6 @@ func SetupRoomServerComponent(
base *basecomponent.BaseDendrite, base *basecomponent.BaseDendrite,
keyRing gomatrixserverlib.JSONVerifier, keyRing gomatrixserverlib.JSONVerifier,
fedClient *gomatrixserverlib.FederationClient, fedClient *gomatrixserverlib.FederationClient,
asAPI appserviceAPI.AppServiceQueryAPI,
) api.RoomserverInternalAPI { ) api.RoomserverInternalAPI {
roomserverDB, err := storage.Open(string(base.Cfg.Database.RoomServer)) roomserverDB, err := storage.Open(string(base.Cfg.Database.RoomServer))
if err != nil { if err != nil {
@ -52,7 +49,6 @@ func SetupRoomServerComponent(
ServerName: base.Cfg.Matrix.ServerName, ServerName: base.Cfg.Matrix.ServerName,
FedClient: fedClient, FedClient: fedClient,
KeyRing: keyRing, KeyRing: keyRing,
AppserviceAPI: asAPI,
} }
internalAPI.SetupHTTP(http.DefaultServeMux) internalAPI.SetupHTTP(http.DefaultServeMux)