diff --git a/cmd/generate-config/main.go b/cmd/generate-config/main.go index bd70cbc5d..b8eeb8fd4 100644 --- a/cmd/generate-config/main.go +++ b/cmd/generate-config/main.go @@ -70,6 +70,7 @@ func main() { // don't hit matrix.org when running tests!!! cfg.SigningKeyServer.KeyPerspectives = config.KeyPerspectives{} cfg.UserAPI.BCryptCost = bcrypt.MinCost + cfg.Global.JetStream.InMemory = true } j, err := yaml.Marshal(cfg) diff --git a/setup/config/config_jetstream.go b/setup/config/config_jetstream.go index 5b1dcdb99..871f6958e 100644 --- a/setup/config/config_jetstream.go +++ b/setup/config/config_jetstream.go @@ -2,8 +2,6 @@ package config import ( "fmt" - "log" - "regexp" ) type JetStream struct { @@ -18,7 +16,7 @@ type JetStream struct { // useful if running more than one Dendrite on the same NATS deployment. TopicPrefix string `yaml:"topic_prefix"` // Keep all storage in memory. This is mostly useful for unit tests. - InMemory bool `yaml:"-"` + InMemory bool `yaml:"in_memory"` } func (c *JetStream) TopicFor(name string) string { @@ -28,11 +26,7 @@ func (c *JetStream) TopicFor(name string) string { func (c *JetStream) Defaults() { c.Addresses = []string{} c.TopicPrefix = "Dendrite" - reg, err := regexp.Compile(`[^a-zA-Z0-9\.]+`) - if err != nil { - log.Fatal(err) - } - c.StoragePath = Path("./" + reg.ReplaceAllString(string(c.Matrix.ServerName), "")) + c.StoragePath = Path("./") } func (c *JetStream) Verify(configErrs *ConfigErrors, isMonolith bool) {