api: Add initial support for Matrix 1.7
This commit is contained in:
parent
631c4e6733
commit
dc68190adc
@ -35,6 +35,7 @@ Improvements:
|
||||
- `user_can_send_state`
|
||||
- `user_can_trigger_room_notification`
|
||||
- Add `MessageType::sanitize` behind the `unstable-sanitize` feature
|
||||
- Add `MatrixVersion::V1_7`
|
||||
|
||||
# 0.11.3
|
||||
|
||||
|
@ -512,6 +512,11 @@ pub enum MatrixVersion {
|
||||
///
|
||||
/// See <https://spec.matrix.org/v1.6/>.
|
||||
V1_6,
|
||||
|
||||
/// Version 1.7 of the Matrix specification, released in Q2 2023.
|
||||
///
|
||||
/// See <https://spec.matrix.org/v1.7/>.
|
||||
V1_7,
|
||||
}
|
||||
|
||||
impl TryFrom<&str> for MatrixVersion {
|
||||
@ -531,6 +536,7 @@ impl TryFrom<&str> for MatrixVersion {
|
||||
"v1.4" => V1_4,
|
||||
"v1.5" => V1_5,
|
||||
"v1.6" => V1_6,
|
||||
"v1.7" => V1_7,
|
||||
_ => return Err(UnknownVersionError),
|
||||
})
|
||||
}
|
||||
@ -576,6 +582,7 @@ impl MatrixVersion {
|
||||
MatrixVersion::V1_4 => (1, 4),
|
||||
MatrixVersion::V1_5 => (1, 5),
|
||||
MatrixVersion::V1_6 => (1, 6),
|
||||
MatrixVersion::V1_7 => (1, 7),
|
||||
}
|
||||
}
|
||||
|
||||
@ -589,6 +596,7 @@ impl MatrixVersion {
|
||||
(1, 4) => Ok(MatrixVersion::V1_4),
|
||||
(1, 5) => Ok(MatrixVersion::V1_5),
|
||||
(1, 6) => Ok(MatrixVersion::V1_6),
|
||||
(1, 7) => Ok(MatrixVersion::V1_7),
|
||||
_ => Err(UnknownVersionError),
|
||||
}
|
||||
}
|
||||
@ -675,7 +683,9 @@ impl MatrixVersion {
|
||||
// <https://spec.matrix.org/v1.5/rooms/#complete-list-of-room-versions>
|
||||
| MatrixVersion::V1_5 => RoomVersionId::V9,
|
||||
// <https://spec.matrix.org/v1.6/rooms/#complete-list-of-room-versions>
|
||||
MatrixVersion::V1_6 => RoomVersionId::V10,
|
||||
MatrixVersion::V1_6
|
||||
// <https://spec.matrix.org/v1.7/rooms/#complete-list-of-room-versions>
|
||||
| MatrixVersion::V1_7 => RoomVersionId::V10,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -18,7 +18,7 @@ const OLD_URL_WHITELIST: &[&str] =
|
||||
|
||||
/// Authorized versions in URLs pointing to the new specs.
|
||||
const NEW_VERSION_WHITELIST: &[&str] = &[
|
||||
"v1.1", "v1.2", "v1.3", "v1.4", "v1.5", "v1.6",
|
||||
"v1.1", "v1.2", "v1.3", "v1.4", "v1.5", "v1.6", "v1.7",
|
||||
"latest",
|
||||
// This should only be enabled if a legitimate use case is found.
|
||||
// "unstable",
|
||||
|
Loading…
x
Reference in New Issue
Block a user