aboutsummaryrefslogtreecommitdiff
path: root/syncapi/storage/postgres/syncserver.go
diff options
context:
space:
mode:
authorMatthew Hodgson <matthew@matrix.org>2020-09-10 14:39:18 +0100
committerGitHub <noreply@github.com>2020-09-10 14:39:18 +0100
commit39507bacc3dbfc532e0d69b42957c87f27af4c77 (patch)
tree7ad845e1b25e03e7b7d7cd2d49278fe843c2ff86 /syncapi/storage/postgres/syncserver.go
parent35564dd73c48b16b97cd1a972a9b9bc65ec6d7ef (diff)
Peeking via MSC2753 (#1370)
Initial implementation of MSC2753, as tested by https://github.com/matrix-org/sytest/pull/944. Doesn't yet handle unpeeks, peeked EDUs, or history viz changing during a peek - these will follow. https://github.com/matrix-org/dendrite/pull/1370 has full details.
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 e7f2c944..7f19722a 100644
--- a/syncapi/storage/postgres/syncserver.go
+++ b/syncapi/storage/postgres/syncserver.go
@@ -62,6 +62,10 @@ func NewDatabase(dbProperties *config.DatabaseOptions) (*SyncServerDatasource, e
if err != nil {
return nil, err
}
+ peeks, err := NewPostgresPeeksTable(d.db)
+ if err != nil {
+ return nil, err
+ }
topology, err := NewPostgresTopologyTable(d.db)
if err != nil {
return nil, err
@@ -82,6 +86,7 @@ func NewDatabase(dbProperties *config.DatabaseOptions) (*SyncServerDatasource, e
DB: d.db,
Writer: d.writer,
Invites: invites,
+ Peeks: peeks,
AccountData: accountData,
OutputEvents: events,
Topology: topology,