diff options
author | Till <2353100+S7evinK@users.noreply.github.com> | 2022-05-12 11:35:35 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-12 11:35:35 +0200 |
commit | 0d1505a4c1ccca7c5cf4a64faf5d1044d8aa96f9 (patch) | |
tree | 8791e60d8bb0b6afa3d3a6eb7a0aab7aed1ebb09 | |
parent | 3437adf5970a11342c22089ec1a18f46d0708740 (diff) |
Fix `create-account` with global database settings (#2455)
* Fix create-account with global database settings
* Avoid warning about open registration
-rw-r--r-- | cmd/create-account/main.go | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/cmd/create-account/main.go b/cmd/create-account/main.go index 7a566052..7f6d5105 100644 --- a/cmd/create-account/main.go +++ b/cmd/create-account/main.go @@ -25,6 +25,7 @@ import ( "strings" "github.com/matrix-org/dendrite/setup" + "github.com/matrix-org/dendrite/setup/base" "github.com/matrix-org/dendrite/userapi/api" "github.com/matrix-org/dendrite/userapi/storage" "github.com/sirupsen/logrus" @@ -99,8 +100,14 @@ func main() { } } + // avoid warning about open registration + cfg.ClientAPI.RegistrationDisabled = true + + b := base.NewBaseDendrite(cfg, "") + defer b.Close() // nolint: errcheck + accountDB, err := storage.NewUserAPIDatabase( - nil, + b, &cfg.UserAPI.AccountDatabase, cfg.Global.ServerName, cfg.UserAPI.BCryptCost, |