mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-07-31 21:32:46 +00:00
Add config key for default room version (#3171)
This PR adds a config key `room_server.default_config_key` to set the default room version for the room server. Signed-off-by: `Sam Wedgwood <sam@wedgwood.dev>`
This commit is contained in:
parent
294eff8a7f
commit
35804f8493
12 changed files with 56 additions and 36 deletions
|
@ -61,6 +61,7 @@ type RoomserverInternalAPI struct {
|
|||
OutputProducer *producers.RoomEventProducer
|
||||
PerspectiveServerNames []spec.ServerName
|
||||
enableMetrics bool
|
||||
defaultRoomVersion gomatrixserverlib.RoomVersion
|
||||
}
|
||||
|
||||
func NewRoomserverAPI(
|
||||
|
@ -92,6 +93,7 @@ func NewRoomserverAPI(
|
|||
Durable: dendriteCfg.Global.JetStream.Durable("RoomserverInputConsumer"),
|
||||
ServerACLs: serverACLs,
|
||||
enableMetrics: enableMetrics,
|
||||
defaultRoomVersion: dendriteCfg.RoomServer.DefaultRoomVersion,
|
||||
// perform-er structs + queryer struct get initialised when we have a federation sender to use
|
||||
}
|
||||
return a
|
||||
|
@ -218,6 +220,10 @@ func (r *RoomserverInternalAPI) SetAppserviceAPI(asAPI asAPI.AppServiceInternalA
|
|||
r.asAPI = asAPI
|
||||
}
|
||||
|
||||
func (r *RoomserverInternalAPI) DefaultRoomVersion() gomatrixserverlib.RoomVersion {
|
||||
return r.defaultRoomVersion
|
||||
}
|
||||
|
||||
func (r *RoomserverInternalAPI) IsKnownRoom(ctx context.Context, roomID spec.RoomID) (bool, error) {
|
||||
return r.Inviter.IsKnownRoom(ctx, roomID)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue