aboutsummaryrefslogtreecommitdiff
path: root/syncapi/syncapi.go
diff options
context:
space:
mode:
authorNeil Alexander <neilalexander@users.noreply.github.com>2020-01-23 17:51:10 +0000
committerGitHub <noreply@github.com>2020-01-23 17:51:10 +0000
commit49f760a30b6496c8b3e1ceaf98dccc4376f6605d (patch)
treeb00d3fc17144cc83df1e5c7b8d1080ca19041243 /syncapi/syncapi.go
parent43ecf8d1f909f4eb71bba93f6e7a57db59ec5941 (diff)
CS API: Support for /messages, fixes for /sync (#847)
* Merge forward * Tidy up a bit * TODO: What to do with NextBatch here? * Replace SyncPosition with PaginationToken throughout syncapi * Fix PaginationTokens * Fix lint errors * Add a couple of missing functions into the syncapi external storage interface * Some updates based on review comments from @babolivier * Some updates based on review comments from @babolivier * argh whitespacing * Fix opentracing span * Remove dead code * Don't overshadow err (fix lint issue) * Handle extremities after inserting event into topology * Try insert event topology as ON CONFLICT DO NOTHING * Prevent OOB error in addRoomDeltaToResponse * Thwarted by gocyclo again * Fix NewPaginationTokenFromString, define unit test for it * Update pagination token test * Update sytest-whitelist * Hopefully fix some of the sync batch tokens * Remove extraneous sync position func * Revert to topology tokens in addRoomDeltaToResponse etc * Fix typo * Remove prevPDUPos as dead now that backwardTopologyPos is used instead * Fix selectEventsWithEventIDsSQL * Update sytest-blacklist * Update sytest-whitelist
Diffstat (limited to 'syncapi/syncapi.go')
-rw-r--r--syncapi/syncapi.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/syncapi/syncapi.go b/syncapi/syncapi.go
index 4738feea..ecf532ca 100644
--- a/syncapi/syncapi.go
+++ b/syncapi/syncapi.go
@@ -21,7 +21,9 @@ import (
"github.com/matrix-org/dendrite/clientapi/auth/storage/accounts"
"github.com/matrix-org/dendrite/common/basecomponent"
+ "github.com/matrix-org/dendrite/common/config"
"github.com/matrix-org/dendrite/roomserver/api"
+ "github.com/matrix-org/gomatrixserverlib"
"github.com/matrix-org/dendrite/clientapi/auth/storage/devices"
"github.com/matrix-org/dendrite/syncapi/consumers"
@@ -37,6 +39,8 @@ func SetupSyncAPIComponent(
deviceDB *devices.Database,
accountsDB *accounts.Database,
queryAPI api.RoomserverQueryAPI,
+ federation *gomatrixserverlib.FederationClient,
+ cfg *config.Dendrite,
) {
syncDB, err := storage.NewSyncServerDatasource(string(base.Cfg.Database.SyncAPI))
if err != nil {
@@ -77,5 +81,5 @@ func SetupSyncAPIComponent(
logrus.WithError(err).Panicf("failed to start typing server consumer")
}
- routing.Setup(base.APIMux, requestPool, syncDB, deviceDB)
+ routing.Setup(base.APIMux, requestPool, syncDB, deviceDB, federation, queryAPI, cfg)
}