Don't populate config defaults where it doesn't make sense (#2058)

* Don't populate config defaults where it doesn't make sense

* Fix dendritejs builds
This commit is contained in:
Neil Alexander 2021-11-24 11:57:39 +00:00 committed by GitHub
parent ec716793eb
commit c9419e51af
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
28 changed files with 83 additions and 61 deletions

View file

@ -260,7 +260,7 @@ func (m *DendriteMonolith) Start() {
prefix := hex.EncodeToString(pk)
cfg := &config.Dendrite{}
cfg.Defaults()
cfg.Defaults(true)
cfg.Global.ServerName = gomatrixserverlib.ServerName(hex.EncodeToString(pk))
cfg.Global.PrivateKey = sk
cfg.Global.KeyID = gomatrixserverlib.KeyID(signing.KeyID)

View file

@ -82,7 +82,7 @@ func (m *DendriteMonolith) Start() {
m.YggdrasilNode = ygg
cfg := &config.Dendrite{}
cfg.Defaults()
cfg.Defaults(true)
cfg.Global.ServerName = gomatrixserverlib.ServerName(ygg.DerivedServerName())
cfg.Global.PrivateKey = ygg.PrivateKey()
cfg.Global.KeyID = gomatrixserverlib.KeyID(signing.KeyID)