mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-18 12:23:09 -06:00
Fix roomserver/versions
This commit is contained in:
parent
fe74f1ba0e
commit
8a0d5db632
|
|
@ -31,7 +31,7 @@ type RoomVersionDescription struct {
|
||||||
EnforceSigningKeyValidity bool
|
EnforceSigningKeyValidity bool
|
||||||
}
|
}
|
||||||
|
|
||||||
var roomVersions = map[string]RoomVersionDescription{
|
var roomVersions = map[RoomVersionID]RoomVersionDescription{
|
||||||
RoomVersionV1: RoomVersionDescription{
|
RoomVersionV1: RoomVersionDescription{
|
||||||
Supported: true,
|
Supported: true,
|
||||||
Stable: true,
|
Stable: true,
|
||||||
|
|
@ -69,13 +69,13 @@ var roomVersions = map[string]RoomVersionDescription{
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
func GetRoomVersions() map[string]RoomVersionDescription {
|
func GetRoomVersions() map[RoomVersionID]RoomVersionDescription {
|
||||||
return roomVersions
|
return roomVersions
|
||||||
}
|
}
|
||||||
|
|
||||||
func GetSupportedRoomVersions() map[string]RoomVersionDescription {
|
func GetSupportedRoomVersions() map[RoomVersionID]RoomVersionDescription {
|
||||||
versions := make(map[string]RoomVersionDescription)
|
versions := make(map[RoomVersionID]RoomVersionDescription)
|
||||||
for id, version := range GetRoomVersionDescriptions() {
|
for id, version := range GetRoomVersions() {
|
||||||
if version.Supported {
|
if version.Supported {
|
||||||
versions[id] = version
|
versions[id] = version
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue