aboutsummaryrefslogtreecommitdiff
path: root/cmd/dendrite-monolith-server
diff options
context:
space:
mode:
authorkegsay <kegan@matrix.org>2022-05-06 12:39:26 +0100
committerGitHub <noreply@github.com>2022-05-06 12:39:26 +0100
commit85704eff207f7690d197172abb991ae1ac238239 (patch)
tree3d43faf35034c270ebaf40a27a75a646e40829d7 /cmd/dendrite-monolith-server
parent4705f5761e620e7f8a35151eeb2007e884847152 (diff)
Clean up interface definitions (#2427)
* tidy up interfaces * remove unused GetCreatorIDForAlias * Add RoomserverUserAPI interface * Define more interfaces * Use AppServiceInternalAPI for consistent naming * clean up federationapi constructor a bit * Fix monolith in -http mode
Diffstat (limited to 'cmd/dendrite-monolith-server')
-rw-r--r--cmd/dendrite-monolith-server/main.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/cmd/dendrite-monolith-server/main.go b/cmd/dendrite-monolith-server/main.go
index 2fa4675a..845b9e46 100644
--- a/cmd/dendrite-monolith-server/main.go
+++ b/cmd/dendrite-monolith-server/main.go
@@ -89,6 +89,7 @@ func main() {
fsAPI := federationapi.NewInternalAPI(
base, federation, rsAPI, base.Caches, nil, false,
)
+ fsImplAPI := fsAPI
if base.UseHTTPAPIs {
federationapi.AddInternalRoutes(base.InternalAPIMux, fsAPI)
fsAPI = base.FederationAPIHTTPClient()
@@ -138,7 +139,10 @@ func main() {
FedClient: federation,
KeyRing: keyRing,
- AppserviceAPI: asAPI, FederationAPI: fsAPI,
+ AppserviceAPI: asAPI,
+ // always use the concrete impl here even in -http mode because adding public routes
+ // must be done on the concrete impl not an HTTP client else fedapi will call itself
+ FederationAPI: fsImplAPI,
RoomserverAPI: rsAPI,
UserAPI: userAPI,
KeyAPI: keyAPI,