diff --git a/src/github.com/matrix-org/dendrite/cmd/dendrite-sync-api-server/main.go b/src/github.com/matrix-org/dendrite/cmd/dendrite-sync-api-server/main.go index 638eba3cd..3fe5baeb6 100644 --- a/src/github.com/matrix-org/dendrite/cmd/dendrite-sync-api-server/main.go +++ b/src/github.com/matrix-org/dendrite/cmd/dendrite-sync-api-server/main.go @@ -76,8 +76,7 @@ func main() { log.Panicf("startup: failed to create sync server database with data source %s : %s", cfg.DataSource, err) } - // TODO: DO NOT USE THIS DATA SOURCE (it's the sync one, not devices!) - deviceDB, err := devices.NewDatabase(cfg.DataSource, cfg.ServerName) + deviceDB, err := devices.NewDatabase(cfg.AccountDataSource, cfg.ServerName) if err != nil { log.Panicf("startup: failed to create device database with data source %s : %s", cfg.DataSource, err) } diff --git a/src/github.com/matrix-org/dendrite/syncapi/config/config.go b/src/github.com/matrix-org/dendrite/syncapi/config/config.go index 433a7a2b6..18d067b65 100644 --- a/src/github.com/matrix-org/dendrite/syncapi/config/config.go +++ b/src/github.com/matrix-org/dendrite/syncapi/config/config.go @@ -26,6 +26,8 @@ type Sync struct { KafkaConsumerURIs []string `yaml:"consumer_uris"` // The postgres connection config for connecting to the database e.g a postgres:// URI DataSource string `yaml:"database"` + // The postgres connection config for connecting to the account database e.g a postgres:// URI + AccountDataSource string `yaml:"account_database"` // The server_name of the running process e.g "localhost" ServerName gomatrixserverlib.ServerName `yaml:"server_name"` }