aboutsummaryrefslogtreecommitdiff
path: root/syncapi/storage/postgres/syncserver.go
diff options
context:
space:
mode:
authorNeil Alexander <neilalexander@users.noreply.github.com>2022-10-13 14:50:52 +0100
committerGitHub <noreply@github.com>2022-10-13 14:50:52 +0100
commit23a3e04579172de89266e9554428b71172c58495 (patch)
treed1a03b1be93f55fffc799bf395be9ba7ccf7b3da /syncapi/storage/postgres/syncserver.go
parent3c1474f68f2ac5e564d2bd4bd15f01d2a73f2845 (diff)
Event relations (#2790)
This adds support for tracking `m.relates_to`, as well as adding support for the various `/room/{roomID}/relations/...` endpoints to the CS API.
Diffstat (limited to 'syncapi/storage/postgres/syncserver.go')
-rw-r--r--syncapi/storage/postgres/syncserver.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/syncapi/storage/postgres/syncserver.go b/syncapi/storage/postgres/syncserver.go
index 979ff664..850d24a0 100644
--- a/syncapi/storage/postgres/syncserver.go
+++ b/syncapi/storage/postgres/syncserver.go
@@ -98,6 +98,10 @@ func NewDatabase(base *base.BaseDendrite, dbProperties *config.DatabaseOptions)
if err != nil {
return nil, err
}
+ relations, err := NewPostgresRelationsTable(d.db)
+ if err != nil {
+ return nil, err
+ }
// apply migrations which need multiple tables
m := sqlutil.NewMigrator(d.db)
@@ -129,6 +133,7 @@ func NewDatabase(base *base.BaseDendrite, dbProperties *config.DatabaseOptions)
NotificationData: notificationData,
Ignores: ignores,
Presence: presence,
+ Relations: relations,
}
return &d, nil
}