Merge branch 'unstability' into 'next'

Mark unstable versions as unstable in /capabilities

See merge request famedly/conduit!394
This commit is contained in:
Timo Kösters 2022-10-13 09:39:45 +00:00
commit f46d64e52f

View file

@ -11,15 +11,9 @@ pub async fn get_capabilities_route(
_body: Ruma<get_capabilities::v3::IncomingRequest>, _body: Ruma<get_capabilities::v3::IncomingRequest>,
) -> Result<get_capabilities::v3::Response> { ) -> Result<get_capabilities::v3::Response> {
let mut available = BTreeMap::new(); let mut available = BTreeMap::new();
if services().globals.allow_unstable_room_versions() {
for room_version in &services().globals.unstable_room_versions {
available.insert(room_version.clone(), RoomVersionStability::Stable);
}
} else {
for room_version in &services().globals.unstable_room_versions { for room_version in &services().globals.unstable_room_versions {
available.insert(room_version.clone(), RoomVersionStability::Unstable); available.insert(room_version.clone(), RoomVersionStability::Unstable);
} }
}
for room_version in &services().globals.stable_room_versions { for room_version in &services().globals.stable_room_versions {
available.insert(room_version.clone(), RoomVersionStability::Stable); available.insert(room_version.clone(), RoomVersionStability::Stable);
} }