api: Add MatrixVersion::V1_3
This commit is contained in:
parent
cbad7fcb3a
commit
a940de9e41
@ -27,6 +27,7 @@ Improvements:
|
|||||||
* Add unstable support for polls (MSC3381)
|
* Add unstable support for polls (MSC3381)
|
||||||
* Add unstable support for Improved Signalling for 1:1 VoIP (MSC2746)
|
* Add unstable support for Improved Signalling for 1:1 VoIP (MSC2746)
|
||||||
* Add support for knocking in `events::room::member::MembershipChange`
|
* Add support for knocking in `events::room::member::MembershipChange`
|
||||||
|
* Add `MatrixVersion::V1_3`
|
||||||
|
|
||||||
# 0.9.2
|
# 0.9.2
|
||||||
|
|
||||||
|
@ -152,6 +152,11 @@ pub enum MatrixVersion {
|
|||||||
///
|
///
|
||||||
/// See <https://spec.matrix.org/v1.2/>.
|
/// See <https://spec.matrix.org/v1.2/>.
|
||||||
V1_2,
|
V1_2,
|
||||||
|
|
||||||
|
/// Version 1.3 of the Matrix specification, released in Q2 2022.
|
||||||
|
///
|
||||||
|
/// See <https://spec.matrix.org/v1.3/>.
|
||||||
|
V1_3,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl TryFrom<&str> for MatrixVersion {
|
impl TryFrom<&str> for MatrixVersion {
|
||||||
@ -167,6 +172,7 @@ impl TryFrom<&str> for MatrixVersion {
|
|||||||
"r0.5.0" | "r0.6.0" | "r0.6.1" => V1_0,
|
"r0.5.0" | "r0.6.0" | "r0.6.1" => V1_0,
|
||||||
"v1.1" => V1_1,
|
"v1.1" => V1_1,
|
||||||
"v1.2" => V1_2,
|
"v1.2" => V1_2,
|
||||||
|
"v1.3" => V1_3,
|
||||||
_ => return Err(UnknownVersionError),
|
_ => return Err(UnknownVersionError),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -208,6 +214,7 @@ impl MatrixVersion {
|
|||||||
MatrixVersion::V1_0 => (1, 0),
|
MatrixVersion::V1_0 => (1, 0),
|
||||||
MatrixVersion::V1_1 => (1, 1),
|
MatrixVersion::V1_1 => (1, 1),
|
||||||
MatrixVersion::V1_2 => (1, 2),
|
MatrixVersion::V1_2 => (1, 2),
|
||||||
|
MatrixVersion::V1_3 => (1, 3),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -217,6 +224,7 @@ impl MatrixVersion {
|
|||||||
(1, 0) => Ok(MatrixVersion::V1_0),
|
(1, 0) => Ok(MatrixVersion::V1_0),
|
||||||
(1, 1) => Ok(MatrixVersion::V1_1),
|
(1, 1) => Ok(MatrixVersion::V1_1),
|
||||||
(1, 2) => Ok(MatrixVersion::V1_2),
|
(1, 2) => Ok(MatrixVersion::V1_2),
|
||||||
|
(1, 3) => Ok(MatrixVersion::V1_3),
|
||||||
_ => Err(UnknownVersionError),
|
_ => Err(UnknownVersionError),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,10 @@ pub(crate) fn check_spec_links(path: &Path) -> Result<()> {
|
|||||||
println!("Checking Matrix Spec links are up-to-date...");
|
println!("Checking Matrix Spec links are up-to-date...");
|
||||||
walk_dirs(path, "https://matrix.org/docs/spec/", |_| false)?;
|
walk_dirs(path, "https://matrix.org/docs/spec/", |_| false)?;
|
||||||
walk_dirs(path, "https://spec.matrix.org/", |s| {
|
walk_dirs(path, "https://spec.matrix.org/", |s| {
|
||||||
s.starts_with("v1.1") || s.starts_with("v1.2") || s.starts_with("unstable")
|
s.starts_with("v1.1")
|
||||||
|
|| s.starts_with("v1.2")
|
||||||
|
|| s.starts_with("v1.3")
|
||||||
|
|| s.starts_with("unstable")
|
||||||
})?;
|
})?;
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user