dendrite/setup/config/config_roomserver.go
Brian Meek d1c1930be8 Merge upstream changes to version 0.11.1 (#1505)
Merge latest updates to Dendrite
Of note, this no longer builds the Dendrite polylith server, which we
never planned to use anyway
I want to make sure I didn't break the clientapi/routing/routing.go
redaction events, our code differs from Dendrite in that call path.

---------

Signed-off-by: Brian Meek <brian@hntlabs.com>
Co-authored-by: Tak Wai Wong <64229756+tak-hntlabs@users.noreply.github.com>
2023-02-21 22:57:27 -07:00

22 lines
510 B
Go

package config
type RoomServer struct {
Matrix *Global `yaml:"-"`
Database DatabaseOptions `yaml:"database,omitempty"`
}
func (c *RoomServer) Defaults(opts DefaultOpts) {
if opts.Generate {
if !opts.SingleDatabase {
c.Database.ConnectionString = "file:roomserver.db"
}
}
}
func (c *RoomServer) Verify(configErrs *ConfigErrors) {
if c.Matrix.DatabaseOptions.ConnectionString == "" {
checkNotEmpty(configErrs, "room_server.database.connection_string", string(c.Database.ConnectionString))
}
}