diff --git a/crates/ruma-common/src/api/metadata.rs b/crates/ruma-common/src/api/metadata.rs
index 08c10c6e..63588ef2 100644
--- a/crates/ruma-common/src/api/metadata.rs
+++ b/crates/ruma-common/src/api/metadata.rs
@@ -516,6 +516,11 @@ pub enum MatrixVersion {
///
/// See .
V1_7,
+
+ /// Version 1.8 of the Matrix specification, released in Q3 2023.
+ ///
+ /// See .
+ V1_8,
}
impl TryFrom<&str> for MatrixVersion {
@@ -536,6 +541,7 @@ impl TryFrom<&str> for MatrixVersion {
"v1.5" => V1_5,
"v1.6" => V1_6,
"v1.7" => V1_7,
+ "v1.8" => V1_8,
_ => return Err(UnknownVersionError),
})
}
@@ -582,6 +588,7 @@ impl MatrixVersion {
MatrixVersion::V1_5 => (1, 5),
MatrixVersion::V1_6 => (1, 6),
MatrixVersion::V1_7 => (1, 7),
+ MatrixVersion::V1_8 => (1, 8),
}
}
@@ -596,6 +603,7 @@ impl MatrixVersion {
(1, 5) => Ok(MatrixVersion::V1_5),
(1, 6) => Ok(MatrixVersion::V1_6),
(1, 7) => Ok(MatrixVersion::V1_7),
+ (1, 8) => Ok(MatrixVersion::V1_8),
_ => Err(UnknownVersionError),
}
}
@@ -684,7 +692,9 @@ impl MatrixVersion {
//
MatrixVersion::V1_6
//
- | MatrixVersion::V1_7 => RoomVersionId::V10,
+ | MatrixVersion::V1_7
+ //
+ | MatrixVersion::V1_8 => RoomVersionId::V10,
}
}
}