mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-17 11:53:09 -06:00
Merge branch 'master' into neilalexander/rearch
This commit is contained in:
commit
bd750aaf00
|
|
@ -148,7 +148,7 @@ func main() {
|
||||||
federation := createFederationClient(base)
|
federation := createFederationClient(base)
|
||||||
keyRing := keydb.CreateKeyRing(federation.Client, keyDB, cfg.Matrix.KeyPerspectives)
|
keyRing := keydb.CreateKeyRing(federation.Client, keyDB, cfg.Matrix.KeyPerspectives)
|
||||||
|
|
||||||
alias, input, query := roomserver.SetupRoomServerComponent(&base.Base, keyRing)
|
alias, input, query := roomserver.SetupRoomServerComponent(&base.Base, keyRing, federation)
|
||||||
eduInputAPI := eduserver.SetupEDUServerComponent(&base.Base, cache.New())
|
eduInputAPI := eduserver.SetupEDUServerComponent(&base.Base, cache.New())
|
||||||
asQuery := appservice.SetupAppServiceAPIComponent(
|
asQuery := appservice.SetupAppServiceAPIComponent(
|
||||||
&base.Base, accountDB, deviceDB, federation, alias, query, transactions.New(),
|
&base.Base, accountDB, deviceDB, federation, alias, query, transactions.New(),
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,7 @@ 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)
|
||||||
|
|
||||||
alias, input, query := roomserver.SetupRoomServerComponent(base, keyRing)
|
alias, input, query := 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, alias, query, transactions.New(),
|
base, accountDB, deviceDB, federation, alias, query, transactions.New(),
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ func main() {
|
||||||
keyRing := keydb.CreateKeyRing(federation.Client, keyDB, cfg.Matrix.KeyPerspectives)
|
keyRing := keydb.CreateKeyRing(federation.Client, keyDB, cfg.Matrix.KeyPerspectives)
|
||||||
|
|
||||||
_, fsInputAPI := base.CreateHTTPFederationSenderAPIs()
|
_, fsInputAPI := base.CreateHTTPFederationSenderAPIs()
|
||||||
_, input, _ := roomserver.SetupRoomServerComponent(base, keyRing)
|
_, input, _ := roomserver.SetupRoomServerComponent(base, keyRing, federation)
|
||||||
input.SetFederationSenderInputAPI(fsInputAPI)
|
input.SetFederationSenderInputAPI(fsInputAPI)
|
||||||
|
|
||||||
base.SetupAndServeHTTP(string(base.Cfg.Bind.RoomServer), string(base.Cfg.Listen.RoomServer))
|
base.SetupAndServeHTTP(string(base.Cfg.Bind.RoomServer), string(base.Cfg.Listen.RoomServer))
|
||||||
|
|
|
||||||
|
|
@ -123,7 +123,7 @@ func main() {
|
||||||
}
|
}
|
||||||
p2pPublicRoomProvider := NewLibP2PPublicRoomsProvider(node)
|
p2pPublicRoomProvider := NewLibP2PPublicRoomsProvider(node)
|
||||||
|
|
||||||
alias, input, query := roomserver.SetupRoomServerComponent(base, keyRing)
|
alias, input, query := 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, alias, query, transactions.New(),
|
base, accountDB, deviceDB, federation, alias, query, transactions.New(),
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,7 @@ import (
|
||||||
// APIs directly instead of having to use HTTP.
|
// APIs directly instead of having to use HTTP.
|
||||||
func SetupRoomServerComponent(
|
func SetupRoomServerComponent(
|
||||||
base *basecomponent.BaseDendrite, keyRing gomatrixserverlib.JSONVerifier,
|
base *basecomponent.BaseDendrite, keyRing gomatrixserverlib.JSONVerifier,
|
||||||
|
fedClient *gomatrixserverlib.FederationClient,
|
||||||
) (api.RoomserverAliasAPI, api.RoomserverInputAPI, api.RoomserverQueryAPI) {
|
) (api.RoomserverAliasAPI, api.RoomserverInputAPI, api.RoomserverQueryAPI) {
|
||||||
roomserverDB, err := storage.Open(string(base.Cfg.Database.RoomServer))
|
roomserverDB, err := storage.Open(string(base.Cfg.Database.RoomServer))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
@ -54,7 +55,7 @@ func SetupRoomServerComponent(
|
||||||
DB: roomserverDB,
|
DB: roomserverDB,
|
||||||
ImmutableCache: base.ImmutableCache,
|
ImmutableCache: base.ImmutableCache,
|
||||||
ServerName: base.Cfg.Matrix.ServerName,
|
ServerName: base.Cfg.Matrix.ServerName,
|
||||||
FedClient: base.CreateFederationClient(),
|
FedClient: fedClient,
|
||||||
// TODO: We should have a key server so we don't keep adding components
|
// TODO: We should have a key server so we don't keep adding components
|
||||||
// which talk to the same DB.
|
// which talk to the same DB.
|
||||||
KeyRing: keyRing,
|
KeyRing: keyRing,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue