aboutsummaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorKegsay <kegan@matrix.org>2020-11-19 11:34:59 +0000
committerGitHub <noreply@github.com>2020-11-19 11:34:59 +0000
commit6353b0b7e42d65d92368b93c021b3a744c03214b (patch)
tree6c8268bf6e133092aadf903bc989906d430f1c66 /cmd
parent1cf9f20d2f740864a48bfb3465f686f4bfe61591 (diff)
MSC2836: Threading - part one (#1589)
* Add mscs/hooks package, begin work for msc2836 * Flesh out hooks and add SQL schema * Begin implementing core msc2836 logic * Add test harness * Linting * Implement visibility checks; stub out APIs for tests * Flesh out testing * Flesh out walkThread a bit * Persist the origin_server_ts as well * Edges table instead of relationships * Add nodes table for event metadata * LEFT JOIN to extract origin_server_ts for children * Add graph walking structs * Implement walking algorithm * Add more graph walking tests * Add auto_join for local rooms * Fix create table syntax on postgres * Add relationship_room_id|servers to the unsigned section of events * Persist the parent room_id/servers in edge metadata Other events cannot assert the true room_id/servers for the parent event, only make claims to them, hence why this is edge metadata. * guts to pass through room_id/servers * Refactor msc2836 to allow handling from federation * Add JoinedVia to PerformJoin responses * Fix tests; review comments
Diffstat (limited to 'cmd')
-rw-r--r--cmd/dendrite-monolith-server/main.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/cmd/dendrite-monolith-server/main.go b/cmd/dendrite-monolith-server/main.go
index e935805f..70b81bbc 100644
--- a/cmd/dendrite-monolith-server/main.go
+++ b/cmd/dendrite-monolith-server/main.go
@@ -23,6 +23,7 @@ import (
"github.com/matrix-org/dendrite/eduserver/cache"
"github.com/matrix-org/dendrite/federationsender"
"github.com/matrix-org/dendrite/internal/config"
+ "github.com/matrix-org/dendrite/internal/mscs"
"github.com/matrix-org/dendrite/internal/setup"
"github.com/matrix-org/dendrite/keyserver"
"github.com/matrix-org/dendrite/roomserver"
@@ -148,6 +149,12 @@ func main() {
base.PublicMediaAPIMux,
)
+ if len(base.Cfg.MSCs.MSCs) > 0 {
+ if err := mscs.Enable(base, &monolith); err != nil {
+ logrus.WithError(err).Fatalf("Failed to enable MSCs")
+ }
+ }
+
// Expose the matrix APIs directly rather than putting them under a /api path.
go func() {
base.SetupAndServeHTTP(