doc: migrate links from matrix-doc to matrix-spec(-proposals)
This commit is contained in:
parent
fca0f6a22b
commit
2ec50bd03c
@ -64,7 +64,7 @@ pub mod v1 {
|
|||||||
/// [MSC2409] regarding supporting EDUs in the future, though it seems to be planned to put
|
/// [MSC2409] regarding supporting EDUs in the future, though it seems to be planned to put
|
||||||
/// EDUs into a different JSON key than `events` to stay backwards compatible.
|
/// EDUs into a different JSON key than `events` to stay backwards compatible.
|
||||||
///
|
///
|
||||||
/// [MSC2409]: https://github.com/matrix-org/matrix-doc/pull/2409
|
/// [MSC2409]: https://github.com/matrix-org/matrix-spec-proposals/pull/2409
|
||||||
#[cfg(feature = "helper")]
|
#[cfg(feature = "helper")]
|
||||||
pub fn try_into_sync_response(
|
pub fn try_into_sync_response(
|
||||||
self,
|
self,
|
||||||
|
@ -29,7 +29,7 @@ pub mod v1 {
|
|||||||
pub protocol: &'a str,
|
pub protocol: &'a str,
|
||||||
|
|
||||||
/// One or more custom fields to help identify the third party location.
|
/// One or more custom fields to help identify the third party location.
|
||||||
// The specification is incorrect for this parameter. See matrix-org/matrix-doc#2352.
|
// The specification is incorrect for this parameter. See [matrix-spec#560](https://github.com/matrix-org/matrix-spec/issues/560).
|
||||||
#[ruma_api(query_map)]
|
#[ruma_api(query_map)]
|
||||||
pub fields: BTreeMap<String, String>,
|
pub fields: BTreeMap<String, String>,
|
||||||
}
|
}
|
||||||
|
@ -29,7 +29,7 @@ pub mod v1 {
|
|||||||
pub protocol: &'a str,
|
pub protocol: &'a str,
|
||||||
|
|
||||||
/// One or more custom fields that are passed to the AS to help identify the user.
|
/// One or more custom fields that are passed to the AS to help identify the user.
|
||||||
// The specification is incorrect for this parameter. See matrix-org/matrix-doc#2352.
|
// The specification is incorrect for this parameter. See [matrix-spec#560](https://github.com/matrix-org/matrix-spec/issues/560).
|
||||||
#[ruma_api(query_map)]
|
#[ruma_api(query_map)]
|
||||||
pub fields: BTreeMap<String, String>,
|
pub fields: BTreeMap<String, String>,
|
||||||
}
|
}
|
||||||
|
@ -37,7 +37,7 @@ pub mod v3 {
|
|||||||
/// Should the server return a blurhash or not.
|
/// Should the server return a blurhash or not.
|
||||||
///
|
///
|
||||||
/// This uses the unstable prefix in
|
/// This uses the unstable prefix in
|
||||||
/// [MSC2448](https://github.com/matrix-org/matrix-doc/pull/2448).
|
/// [MSC2448](https://github.com/matrix-org/matrix-spec-proposals/pull/2448).
|
||||||
#[ruma_api(query)]
|
#[ruma_api(query)]
|
||||||
#[cfg(feature = "unstable-msc2448")]
|
#[cfg(feature = "unstable-msc2448")]
|
||||||
#[serde(default, skip_serializing_if = "ruma_serde::is_default", rename = "xyz.amorgan.blurhash")]
|
#[serde(default, skip_serializing_if = "ruma_serde::is_default", rename = "xyz.amorgan.blurhash")]
|
||||||
@ -51,7 +51,7 @@ pub mod v3 {
|
|||||||
/// The [BlurHash](https://blurha.sh) for the uploaded content.
|
/// The [BlurHash](https://blurha.sh) for the uploaded content.
|
||||||
///
|
///
|
||||||
/// This uses the unstable prefix in
|
/// This uses the unstable prefix in
|
||||||
/// [MSC2448](https://github.com/matrix-org/matrix-doc/pull/2448).
|
/// [MSC2448](https://github.com/matrix-org/matrix-spec-proposals/pull/2448).
|
||||||
#[cfg(feature = "unstable-msc2448")]
|
#[cfg(feature = "unstable-msc2448")]
|
||||||
#[serde(rename = "xyz.amorgan.blurhash", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "xyz.amorgan.blurhash", skip_serializing_if = "Option::is_none")]
|
||||||
pub blurhash: Option<String>,
|
pub blurhash: Option<String>,
|
||||||
|
@ -48,7 +48,7 @@ pub mod v3 {
|
|||||||
|
|
||||||
/// The content type of the file that was previously uploaded.
|
/// The content type of the file that was previously uploaded.
|
||||||
#[ruma_api(header = CONTENT_TYPE)]
|
#[ruma_api(header = CONTENT_TYPE)]
|
||||||
// Potentially not actually optional – https://github.com/matrix-org/matrix-doc/pull/2818
|
// Potentially not actually optional – https://github.com/matrix-org/matrix-spec-proposals/pull/2818
|
||||||
pub content_type: Option<String>,
|
pub content_type: Option<String>,
|
||||||
|
|
||||||
/// The value of the `Content-Disposition` HTTP header, possibly containing the name of the
|
/// The value of the `Content-Disposition` HTTP header, possibly containing the name of the
|
||||||
|
@ -42,7 +42,7 @@ pub mod v3 {
|
|||||||
/// The [BlurHash](https://blurha.sh) for the avatar pointed to by `avatar_url`.
|
/// The [BlurHash](https://blurha.sh) for the avatar pointed to by `avatar_url`.
|
||||||
///
|
///
|
||||||
/// This uses the unstable prefix in
|
/// This uses the unstable prefix in
|
||||||
/// [MSC2448](https://github.com/matrix-org/matrix-doc/pull/2448).
|
/// [MSC2448](https://github.com/matrix-org/matrix-spec-proposals/pull/2448).
|
||||||
#[cfg(feature = "unstable-msc2448")]
|
#[cfg(feature = "unstable-msc2448")]
|
||||||
#[serde(rename = "xyz.amorgan.blurhash", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "xyz.amorgan.blurhash", skip_serializing_if = "Option::is_none")]
|
||||||
pub blurhash: Option<String>,
|
pub blurhash: Option<String>,
|
||||||
|
@ -46,7 +46,7 @@ pub mod v3 {
|
|||||||
/// The [BlurHash](https://blurha.sh) for the avatar pointed to by `avatar_url`.
|
/// The [BlurHash](https://blurha.sh) for the avatar pointed to by `avatar_url`.
|
||||||
///
|
///
|
||||||
/// This uses the unstable prefix in
|
/// This uses the unstable prefix in
|
||||||
/// [MSC2448](https://github.com/matrix-org/matrix-doc/pull/2448).
|
/// [MSC2448](https://github.com/matrix-org/matrix-spec-proposals/pull/2448).
|
||||||
#[cfg(feature = "unstable-msc2448")]
|
#[cfg(feature = "unstable-msc2448")]
|
||||||
#[serde(rename = "xyz.amorgan.blurhash", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "xyz.amorgan.blurhash", skip_serializing_if = "Option::is_none")]
|
||||||
pub blurhash: Option<String>,
|
pub blurhash: Option<String>,
|
||||||
|
@ -48,7 +48,7 @@ pub mod v3 {
|
|||||||
/// The [BlurHash](https://blurha.sh) for the avatar pointed to by `avatar_url`.
|
/// The [BlurHash](https://blurha.sh) for the avatar pointed to by `avatar_url`.
|
||||||
///
|
///
|
||||||
/// This uses the unstable prefix in
|
/// This uses the unstable prefix in
|
||||||
/// [MSC2448](https://github.com/matrix-org/matrix-doc/pull/2448).
|
/// [MSC2448](https://github.com/matrix-org/matrix-spec-proposals/pull/2448).
|
||||||
#[cfg(feature = "unstable-msc2448")]
|
#[cfg(feature = "unstable-msc2448")]
|
||||||
#[serde(rename = "xyz.amorgan.blurhash", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "xyz.amorgan.blurhash", skip_serializing_if = "Option::is_none")]
|
||||||
pub blurhash: Option<&'a str>,
|
pub blurhash: Option<&'a str>,
|
||||||
|
@ -190,12 +190,12 @@ pub mod v3 {
|
|||||||
|
|
||||||
/// An SSO login identity provider brand identifier.
|
/// An SSO login identity provider brand identifier.
|
||||||
///
|
///
|
||||||
/// The predefined ones can be found in the matrix-doc repo in a [separate
|
/// The predefined ones can be found in the matrix-spec-proposals repo in a [separate
|
||||||
/// document][matrix-doc]. To use a custom brand string, simply use
|
/// document][matrix-spec-proposals]. To use a custom brand string, simply use
|
||||||
/// `IdentityProviderBrand::from("custom-brand")` or `"custom-brand".into()` (if the type is
|
/// `IdentityProviderBrand::from("custom-brand")` or `"custom-brand".into()` (if the type is
|
||||||
/// known from the surrounding context).
|
/// known from the surrounding context).
|
||||||
///
|
///
|
||||||
/// [matrix-doc]: https://github.com/matrix-org/matrix-doc/blob/v1.1/informal/idp-brands.md
|
/// [matrix-spec-proposals]: https://github.com/matrix-org/matrix-spec-proposals/blob/v1.1/informal/idp-brands.md
|
||||||
#[derive(Clone, Debug, PartialEq, Eq, StringEnum)]
|
#[derive(Clone, Debug, PartialEq, Eq, StringEnum)]
|
||||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||||
pub enum IdentityProviderBrand {
|
pub enum IdentityProviderBrand {
|
||||||
|
@ -27,7 +27,7 @@ pub mod v3 {
|
|||||||
pub protocol: &'a str,
|
pub protocol: &'a str,
|
||||||
|
|
||||||
/// One or more custom fields to help identify the third party location.
|
/// One or more custom fields to help identify the third party location.
|
||||||
// The specification is incorrect for this parameter. See matrix-org/matrix-doc#2352.
|
// The specification is incorrect for this parameter. See [matrix-spec#560](https://github.com/matrix-org/matrix-spec/issues/560).
|
||||||
#[ruma_api(query_map)]
|
#[ruma_api(query_map)]
|
||||||
pub fields: BTreeMap<String, String>,
|
pub fields: BTreeMap<String, String>,
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,7 @@ pub mod v3 {
|
|||||||
pub protocol: &'a str,
|
pub protocol: &'a str,
|
||||||
|
|
||||||
/// One or more custom fields that are passed to the AS to help identify the user.
|
/// One or more custom fields that are passed to the AS to help identify the user.
|
||||||
// The specification is incorrect for this parameter. See matrix-org/matrix-doc#2352.
|
// The specification is incorrect for this parameter. See [matrix-spec#560](https://github.com/matrix-org/matrix-spec/issues/560).
|
||||||
#[ruma_api(query_map)]
|
#[ruma_api(query_map)]
|
||||||
pub fields: BTreeMap<String, String>,
|
pub fields: BTreeMap<String, String>,
|
||||||
}
|
}
|
||||||
|
@ -2,10 +2,10 @@
|
|||||||
//!
|
//!
|
||||||
//! This module also contains types shared by events in its child namespaces.
|
//! This module also contains types shared by events in its child namespaces.
|
||||||
//!
|
//!
|
||||||
//! The MSC for the in-room variants of the `m.key.verification.*` events can be found
|
//! The MSC for the in-room variants of the `m.key.verification.*` events can be found on
|
||||||
//! [on GitHub][github-matrix-doc-2214].
|
//! [MSC2241].
|
||||||
//!
|
//!
|
||||||
//! [github-matrix-doc-2214]: https://github.com/matrix-org/matrix-doc/pull/2241
|
//! [MSC2241]: https://github.com/matrix-org/matrix-spec-proposals/pull/2241
|
||||||
|
|
||||||
use ruma_identifiers::EventId;
|
use ruma_identifiers::EventId;
|
||||||
use ruma_serde::StringEnum;
|
use ruma_serde::StringEnum;
|
||||||
|
@ -68,7 +68,7 @@ pub struct ImageInfo {
|
|||||||
/// The [BlurHash](https://blurha.sh) for this image.
|
/// The [BlurHash](https://blurha.sh) for this image.
|
||||||
///
|
///
|
||||||
/// This uses the unstable prefix in
|
/// This uses the unstable prefix in
|
||||||
/// [MSC2448](https://github.com/matrix-org/matrix-doc/pull/2448).
|
/// [MSC2448](https://github.com/matrix-org/matrix-spec-proposals/pull/2448).
|
||||||
#[cfg(feature = "unstable-msc2448")]
|
#[cfg(feature = "unstable-msc2448")]
|
||||||
#[serde(rename = "xyz.amorgan.blurhash", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "xyz.amorgan.blurhash", skip_serializing_if = "Option::is_none")]
|
||||||
pub blurhash: Option<String>,
|
pub blurhash: Option<String>,
|
||||||
|
@ -26,14 +26,14 @@ pub struct RoomAvatarEventContent {
|
|||||||
/// URL of the avatar image.
|
/// URL of the avatar image.
|
||||||
///
|
///
|
||||||
/// With the `unstable-pre-spec` feature, this field is optional.
|
/// With the `unstable-pre-spec` feature, this field is optional.
|
||||||
/// See [matrix-doc#2006](https://github.com/matrix-org/matrix-doc/issues/2006).
|
/// See [matrix-spec#471](https://github.com/matrix-org/matrix-spec/issues/471).
|
||||||
#[cfg(not(feature = "unstable-pre-spec"))]
|
#[cfg(not(feature = "unstable-pre-spec"))]
|
||||||
pub url: Box<MxcUri>,
|
pub url: Box<MxcUri>,
|
||||||
|
|
||||||
/// URL of the avatar image.
|
/// URL of the avatar image.
|
||||||
///
|
///
|
||||||
/// Without the `unstable-pre-spec` feature, this field is not optional.
|
/// Without the `unstable-pre-spec` feature, this field is not optional.
|
||||||
/// See [matrix-doc#2006](https://github.com/matrix-org/matrix-doc/issues/2006).
|
/// See [matrix-spec#471](https://github.com/matrix-org/matrix-spec/issues/471).
|
||||||
#[cfg(feature = "unstable-pre-spec")]
|
#[cfg(feature = "unstable-pre-spec")]
|
||||||
pub url: Option<Box<MxcUri>>,
|
pub url: Option<Box<MxcUri>>,
|
||||||
}
|
}
|
||||||
@ -42,7 +42,7 @@ impl RoomAvatarEventContent {
|
|||||||
/// Create an `RoomAvatarEventContent` from the given image URL.
|
/// Create an `RoomAvatarEventContent` from the given image URL.
|
||||||
///
|
///
|
||||||
/// With the `unstable-pre-spec` feature, this method takes no parameters.
|
/// With the `unstable-pre-spec` feature, this method takes no parameters.
|
||||||
/// See [matrix-doc#2006](https://github.com/matrix-org/matrix-doc/issues/2006).
|
/// See [matrix-spec#471](https://github.com/matrix-org/matrix-spec/issues/471).
|
||||||
#[cfg(not(feature = "unstable-pre-spec"))]
|
#[cfg(not(feature = "unstable-pre-spec"))]
|
||||||
pub fn new(url: Box<MxcUri>) -> Self {
|
pub fn new(url: Box<MxcUri>) -> Self {
|
||||||
Self { info: None, url }
|
Self { info: None, url }
|
||||||
@ -51,7 +51,7 @@ impl RoomAvatarEventContent {
|
|||||||
/// Create an empty `RoomAvatarEventContent`.
|
/// Create an empty `RoomAvatarEventContent`.
|
||||||
///
|
///
|
||||||
/// Without the `unstable-pre-spec` feature, this method takes an `MxcUri`.
|
/// Without the `unstable-pre-spec` feature, this method takes an `MxcUri`.
|
||||||
/// See [matrix-doc#2006](https://github.com/matrix-org/matrix-doc/issues/2006).
|
/// See [matrix-spec#471](https://github.com/matrix-org/matrix-spec/issues/471).
|
||||||
#[cfg(feature = "unstable-pre-spec")]
|
#[cfg(feature = "unstable-pre-spec")]
|
||||||
pub fn new() -> Self {
|
pub fn new() -> Self {
|
||||||
Self::default()
|
Self::default()
|
||||||
@ -89,7 +89,7 @@ pub struct ImageInfo {
|
|||||||
/// The [BlurHash](https://blurha.sh) for this image.
|
/// The [BlurHash](https://blurha.sh) for this image.
|
||||||
///
|
///
|
||||||
/// This uses the unstable prefix in
|
/// This uses the unstable prefix in
|
||||||
/// [MSC2448](https://github.com/matrix-org/matrix-doc/pull/2448).
|
/// [MSC2448](https://github.com/matrix-org/matrix-spec-proposals/pull/2448).
|
||||||
#[cfg(feature = "unstable-msc2448")]
|
#[cfg(feature = "unstable-msc2448")]
|
||||||
#[serde(rename = "xyz.amorgan.blurhash", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "xyz.amorgan.blurhash", skip_serializing_if = "Option::is_none")]
|
||||||
pub blurhash: Option<String>,
|
pub blurhash: Option<String>,
|
||||||
|
@ -82,7 +82,7 @@ pub struct RoomMemberEventContent {
|
|||||||
/// The [BlurHash](https://blurha.sh) for the avatar pointed to by `avatar_url`.
|
/// The [BlurHash](https://blurha.sh) for the avatar pointed to by `avatar_url`.
|
||||||
///
|
///
|
||||||
/// This uses the unstable prefix in
|
/// This uses the unstable prefix in
|
||||||
/// [MSC2448](https://github.com/matrix-org/matrix-doc/pull/2448).
|
/// [MSC2448](https://github.com/matrix-org/matrix-spec-proposals/pull/2448).
|
||||||
#[cfg(feature = "unstable-msc2448")]
|
#[cfg(feature = "unstable-msc2448")]
|
||||||
#[serde(rename = "xyz.amorgan.blurhash", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "xyz.amorgan.blurhash", skip_serializing_if = "Option::is_none")]
|
||||||
pub blurhash: Option<String>,
|
pub blurhash: Option<String>,
|
||||||
|
@ -941,7 +941,7 @@ pub struct VideoInfo {
|
|||||||
/// The [BlurHash](https://blurha.sh) for this video.
|
/// The [BlurHash](https://blurha.sh) for this video.
|
||||||
///
|
///
|
||||||
/// This uses the unstable prefix in
|
/// This uses the unstable prefix in
|
||||||
/// [MSC2448](https://github.com/matrix-org/matrix-doc/pull/2448).
|
/// [MSC2448](https://github.com/matrix-org/matrix-spec-proposals/pull/2448).
|
||||||
#[cfg(feature = "unstable-msc2448")]
|
#[cfg(feature = "unstable-msc2448")]
|
||||||
#[serde(rename = "xyz.amorgan.blurhash", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "xyz.amorgan.blurhash", skip_serializing_if = "Option::is_none")]
|
||||||
pub blurhash: Option<String>,
|
pub blurhash: Option<String>,
|
||||||
|
@ -406,7 +406,7 @@ pub struct PusherData {
|
|||||||
/// For more information, see [Sygnal docs][sygnal].
|
/// For more information, see [Sygnal docs][sygnal].
|
||||||
///
|
///
|
||||||
/// [sygnal]: https://github.com/matrix-org/sygnal/blob/main/docs/applications.md#ios-applications-beware
|
/// [sygnal]: https://github.com/matrix-org/sygnal/blob/main/docs/applications.md#ios-applications-beware
|
||||||
// Not specified, issue: https://github.com/matrix-org/matrix-doc/issues/3474
|
// Not specified, issue: https://github.com/matrix-org/matrix-spec/issues/921
|
||||||
#[cfg(feature = "unstable-pre-spec")]
|
#[cfg(feature = "unstable-pre-spec")]
|
||||||
#[serde(default, skip_serializing_if = "JsonValue::is_null")]
|
#[serde(default, skip_serializing_if = "JsonValue::is_null")]
|
||||||
pub default_payload: JsonValue,
|
pub default_payload: JsonValue,
|
||||||
|
@ -89,7 +89,7 @@ pub struct ProtocolInstance {
|
|||||||
|
|
||||||
/// A unique identifier across all instances.
|
/// A unique identifier across all instances.
|
||||||
///
|
///
|
||||||
/// See [matrix-doc#3203](https://github.com/matrix-org/matrix-doc/issues/3203).
|
/// See [matrix-spec#833](https://github.com/matrix-org/matrix-spec/issues/833).
|
||||||
#[cfg(feature = "unstable-pre-spec")]
|
#[cfg(feature = "unstable-pre-spec")]
|
||||||
pub instance_id: String,
|
pub instance_id: String,
|
||||||
}
|
}
|
||||||
@ -112,7 +112,7 @@ pub struct ProtocolInstanceInit {
|
|||||||
|
|
||||||
/// A unique identifier across all instances.
|
/// A unique identifier across all instances.
|
||||||
///
|
///
|
||||||
/// See [matrix-doc#3203](https://github.com/matrix-org/matrix-doc/issues/3203).
|
/// See [matrix-spec#833](https://github.com/matrix-org/matrix-spec/issues/833).
|
||||||
#[cfg(feature = "unstable-pre-spec")]
|
#[cfg(feature = "unstable-pre-spec")]
|
||||||
pub instance_id: String,
|
pub instance_id: String,
|
||||||
}
|
}
|
||||||
|
@ -46,7 +46,7 @@ impl OldVerifyKey {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Spec is wrong, all fields are required (see https://github.com/matrix-org/matrix-doc/issues/2508)
|
// Spec is wrong, all fields are required (see https://github.com/matrix-org/matrix-spec/issues/613)
|
||||||
/// Queried server key, signed by the notary server.
|
/// Queried server key, signed by the notary server.
|
||||||
#[derive(Clone, Debug, Deserialize, Serialize)]
|
#[derive(Clone, Debug, Deserialize, Serialize)]
|
||||||
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
|
||||||
|
@ -36,7 +36,7 @@ impl RoomState {
|
|||||||
/// Creates an empty `RoomState` with the given `origin`.
|
/// Creates an empty `RoomState` with the given `origin`.
|
||||||
///
|
///
|
||||||
/// With the `unstable-pre-spec` feature, this method doesn't take any parameters.
|
/// With the `unstable-pre-spec` feature, this method doesn't take any parameters.
|
||||||
/// See [matrix-doc#1664](https://github.com/matrix-org/matrix-doc/issues/1664).
|
/// See [matrix-spec#374](https://github.com/matrix-org/matrix-spec/issues/374).
|
||||||
pub fn new(origin: String) -> Self {
|
pub fn new(origin: String) -> Self {
|
||||||
Self { origin, auth_chain: Vec::new(), state: Vec::new() }
|
Self { origin, auth_chain: Vec::new(), state: Vec::new() }
|
||||||
}
|
}
|
||||||
@ -45,7 +45,7 @@ impl RoomState {
|
|||||||
/// Creates an empty `RoomState` with the given `origin`.
|
/// Creates an empty `RoomState` with the given `origin`.
|
||||||
///
|
///
|
||||||
/// Without the `unstable-pre-spec` feature, this method takes a parameter for the origin
|
/// Without the `unstable-pre-spec` feature, this method takes a parameter for the origin
|
||||||
/// server. See [matrix-doc#1664](https://github.com/matrix-org/matrix-doc/issues/1664).
|
/// See [matrix-spec#374](https://github.com/matrix-org/matrix-spec/issues/374).
|
||||||
pub fn new() -> Self {
|
pub fn new() -> Self {
|
||||||
Self { auth_chain: Vec::new(), state: Vec::new() }
|
Self { auth_chain: Vec::new(), state: Vec::new() }
|
||||||
}
|
}
|
||||||
|
@ -55,7 +55,7 @@ pub mod v1 {
|
|||||||
/// The [BlurHash](https://blurha.sh) for the avatar pointed to by `avatar_url`.
|
/// The [BlurHash](https://blurha.sh) for the avatar pointed to by `avatar_url`.
|
||||||
///
|
///
|
||||||
/// This uses the unstable prefix in
|
/// This uses the unstable prefix in
|
||||||
/// [MSC2448](https://github.com/matrix-org/matrix-doc/pull/2448).
|
/// [MSC2448](https://github.com/matrix-org/matrix-spec-proposals/pull/2448).
|
||||||
#[cfg(feature = "unstable-msc2448")]
|
#[cfg(feature = "unstable-msc2448")]
|
||||||
#[serde(rename = "xyz.amorgan.blurhash", skip_serializing_if = "Option::is_none")]
|
#[serde(rename = "xyz.amorgan.blurhash", skip_serializing_if = "Option::is_none")]
|
||||||
pub blurhash: Option<String>,
|
pub blurhash: Option<String>,
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
//!
|
//!
|
||||||
//! For more information, see this [GitHub issue][issue].
|
//! For more information, see this [GitHub issue][issue].
|
||||||
//!
|
//!
|
||||||
//! [issue]: https://github.com/matrix-org/matrix-doc/issues/2541
|
//! [issue]: https://github.com/matrix-org/matrix-spec-proposals/issues/2541
|
||||||
|
|
||||||
use std::{fmt, marker::PhantomData};
|
use std::{fmt, marker::PhantomData};
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ pub mod v1 {
|
|||||||
/// Must not be more than 50 items.
|
/// Must not be more than 50 items.
|
||||||
///
|
///
|
||||||
/// With the `unstable-pre-spec` feature, sending `pdus` is optional.
|
/// With the `unstable-pre-spec` feature, sending `pdus` is optional.
|
||||||
/// See [matrix-doc#2824](https://github.com/matrix-org/matrix-doc/issues/2824).
|
/// See [matrix-spec#705](https://github.com/matrix-org/matrix-spec/issues/705).
|
||||||
#[cfg_attr(feature = "unstable-pre-spec", serde(default, skip_serializing_if = "<[_]>::is_empty"))]
|
#[cfg_attr(feature = "unstable-pre-spec", serde(default, skip_serializing_if = "<[_]>::is_empty"))]
|
||||||
pub pdus: &'a [Box<RawJsonValue>],
|
pub pdus: &'a [Box<RawJsonValue>],
|
||||||
|
|
||||||
@ -60,7 +60,7 @@ pub mod v1 {
|
|||||||
/// Map of event IDs and response for each PDU given in the request.
|
/// Map of event IDs and response for each PDU given in the request.
|
||||||
///
|
///
|
||||||
/// With the `unstable-msc3618` feature, returning `pdus` is optional.
|
/// With the `unstable-msc3618` feature, returning `pdus` is optional.
|
||||||
/// See [MSC3618](https://github.com/matrix-org/matrix-doc/pull/3618).
|
/// See [MSC3618](https://github.com/matrix-org/matrix-spec-proposals/pull/3618).
|
||||||
#[cfg_attr(feature = "unstable-msc3618", serde(default))]
|
#[cfg_attr(feature = "unstable-msc3618", serde(default))]
|
||||||
#[serde(with = "crate::serde::pdu_process_response")]
|
#[serde(with = "crate::serde::pdu_process_response")]
|
||||||
pub pdus: BTreeMap<Box<EventId>, Result<(), String>>,
|
pub pdus: BTreeMap<Box<EventId>, Result<(), String>>,
|
||||||
|
@ -16,7 +16,7 @@ pub fn validate(s: &str) -> Result<(), Error> {
|
|||||||
/// With the `compat` feature enabled, this will also return `Ok(false)` for invalid user ID
|
/// With the `compat` feature enabled, this will also return `Ok(false)` for invalid user ID
|
||||||
/// localparts. User IDs that don't even meet the historical user ID restrictions exist in the wild
|
/// localparts. User IDs that don't even meet the historical user ID restrictions exist in the wild
|
||||||
/// due to Synapse allowing them over federation. This will likely be fixed in an upcoming room
|
/// due to Synapse allowing them over federation. This will likely be fixed in an upcoming room
|
||||||
/// version; see <https://github.com/matrix-org/matrix-doc/pull/2828>.
|
/// version; see [MSC2828](https://github.com/matrix-org/matrix-spec-proposals/pull/2828).
|
||||||
pub fn localpart_is_fully_conforming(localpart: &str) -> Result<bool, Error> {
|
pub fn localpart_is_fully_conforming(localpart: &str) -> Result<bool, Error> {
|
||||||
// See https://spec.matrix.org/v1.2/appendices/#user-identifiers
|
// See https://spec.matrix.org/v1.2/appendices/#user-identifiers
|
||||||
let is_fully_conforming = localpart
|
let is_fully_conforming = localpart
|
||||||
|
@ -36,7 +36,7 @@ pub struct Conf(base64::Config);
|
|||||||
pub struct Standard;
|
pub struct Standard;
|
||||||
|
|
||||||
impl Base64Config for Standard {
|
impl Base64Config for Standard {
|
||||||
// See https://github.com/matrix-org/matrix-doc/issues/3211
|
// See https://github.com/matrix-org/matrix-spec/issues/838
|
||||||
const CONF: Conf = Conf(base64::STANDARD_NO_PAD.decode_allow_trailing_bits(true));
|
const CONF: Conf = Conf(base64::STANDARD_NO_PAD.decode_allow_trailing_bits(true));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@ pub struct RoomVersion {
|
|||||||
pub allow_knocking: bool,
|
pub allow_knocking: bool,
|
||||||
/// Adds support for the restricted join rule.
|
/// Adds support for the restricted join rule.
|
||||||
///
|
///
|
||||||
/// See: <https://github.com/matrix-org/matrix-doc/pull/3289> for more information.
|
/// See: [MSC3289](https://github.com/matrix-org/matrix-spec-proposals/pull/3289) for more information.
|
||||||
pub restricted_join_rules: bool,
|
pub restricted_join_rules: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user