From 936bb64e84a32932735127267d2043479f32d761 Mon Sep 17 00:00:00 2001 From: Jonathan de Jong Date: Fri, 18 Feb 2022 19:45:04 +0100 Subject: [PATCH] Update links to spec.matrix.org/v1.2 --- CONTRIBUTING.md | 2 +- crates/ruma-api/src/lib.rs | 4 ++-- crates/ruma-appservice-api/src/lib.rs | 8 ++++---- crates/ruma-client-api/src/account/register.rs | 2 +- crates/ruma-client-api/src/error.rs | 2 +- crates/ruma-client-api/src/filter/lazy_load.rs | 2 +- crates/ruma-client-api/src/uiaa.rs | 16 ++++++++-------- crates/ruma-common/src/encryption.rs | 2 +- crates/ruma-common/src/power_levels.rs | 2 +- crates/ruma-common/src/presence.rs | 2 +- crates/ruma-common/src/push.rs | 4 ++-- crates/ruma-common/src/push/action.rs | 2 +- crates/ruma-common/src/push/predefined.rs | 4 ++-- crates/ruma-common/src/thirdparty.rs | 2 +- crates/ruma-common/src/to_device.rs | 2 +- crates/ruma-events/src/call/answer.rs | 2 +- crates/ruma-events/src/call/candidates.rs | 2 +- crates/ruma-events/src/call/hangup.rs | 2 +- crates/ruma-events/src/call/invite.rs | 2 +- crates/ruma-events/src/direct.rs | 2 +- crates/ruma-events/src/dummy.rs | 2 +- crates/ruma-events/src/forwarded_room_key.rs | 2 +- crates/ruma-events/src/fully_read.rs | 2 +- crates/ruma-events/src/ignored_user_list.rs | 2 +- .../ruma-events/src/key/verification/accept.rs | 2 +- .../ruma-events/src/key/verification/cancel.rs | 2 +- crates/ruma-events/src/key/verification/done.rs | 2 +- crates/ruma-events/src/key/verification/key.rs | 2 +- crates/ruma-events/src/key/verification/mac.rs | 2 +- crates/ruma-events/src/key/verification/ready.rs | 2 +- .../ruma-events/src/key/verification/request.rs | 2 +- crates/ruma-events/src/key/verification/start.rs | 6 +++--- crates/ruma-events/src/policy/rule/room.rs | 2 +- crates/ruma-events/src/policy/rule/server.rs | 2 +- crates/ruma-events/src/policy/rule/user.rs | 2 +- crates/ruma-events/src/push_rules.rs | 2 +- crates/ruma-events/src/receipt.rs | 2 +- crates/ruma-events/src/room/avatar.rs | 2 +- crates/ruma-events/src/room/canonical_alias.rs | 2 +- crates/ruma-events/src/room/create.rs | 2 +- crates/ruma-events/src/room/encrypted.rs | 4 ++-- crates/ruma-events/src/room/encryption.rs | 2 +- crates/ruma-events/src/room/guest_access.rs | 2 +- .../ruma-events/src/room/history_visibility.rs | 2 +- crates/ruma-events/src/room/join_rules.rs | 2 +- crates/ruma-events/src/room/member.rs | 8 ++++---- crates/ruma-events/src/room/message.rs | 4 ++-- crates/ruma-events/src/room/message/feedback.rs | 2 +- crates/ruma-events/src/room/name.rs | 2 +- crates/ruma-events/src/room/pinned_events.rs | 2 +- crates/ruma-events/src/room/power_levels.rs | 2 +- crates/ruma-events/src/room/redaction.rs | 2 +- crates/ruma-events/src/room/server_acl.rs | 2 +- .../ruma-events/src/room/third_party_invite.rs | 2 +- crates/ruma-events/src/room/tombstone.rs | 2 +- crates/ruma-events/src/room/topic.rs | 2 +- crates/ruma-events/src/room_key.rs | 2 +- crates/ruma-events/src/room_key_request.rs | 2 +- crates/ruma-events/src/secret/request.rs | 2 +- crates/ruma-events/src/secret/send.rs | 2 +- crates/ruma-events/src/space.rs | 2 +- crates/ruma-events/src/space/child.rs | 2 +- crates/ruma-events/src/space/parent.rs | 2 +- crates/ruma-events/src/sticker.rs | 2 +- crates/ruma-events/src/tag.rs | 4 ++-- crates/ruma-events/src/typing.rs | 2 +- .../src/membership/prepare_leave_event.rs | 4 +++- crates/ruma-federation-api/src/serde/v1_pdu.rs | 6 +++--- crates/ruma-identifiers-validation/src/error.rs | 2 +- .../ruma-identifiers-validation/src/mxc_uri.rs | 2 +- .../ruma-identifiers-validation/src/user_id.rs | 4 ++-- crates/ruma-identifiers/src/event_id.rs | 2 +- crates/ruma-identifiers/src/mxc_uri.rs | 4 ++-- crates/ruma-signatures/src/functions.rs | 2 +- crates/ruma-state-res/src/event_auth.rs | 2 +- crates/ruma-state-res/src/room_version.rs | 2 +- crates/ruma/src/lib.rs | 2 +- 77 files changed, 104 insertions(+), 102 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6d2ec764..3fb6b968 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -20,7 +20,7 @@ Here is a list of helpful resources you can consult: ## Documentation -- [Matrix spec Documentation](https://matrix.org/docs/spec/) +- [Matrix spec Documentation](https://spec.matrix.org/v1.2/) ## Chat Rooms diff --git a/crates/ruma-api/src/lib.rs b/crates/ruma-api/src/lib.rs index 58695433..8704cdf3 100644 --- a/crates/ruma-api/src/lib.rs +++ b/crates/ruma-api/src/lib.rs @@ -11,7 +11,7 @@ //! Such types can then be used by client code to make requests, and by server code to fulfill //! those requests. //! -//! [apis]: https://matrix.org/docs/spec/#matrix-apis +//! [apis]: https://spec.matrix.org/v1.2/#matrix-apis #![warn(missing_docs)] @@ -309,7 +309,7 @@ pub trait OutgoingRequestAppserviceExt: OutgoingRequest { /// Tries to convert this request into an `http::Request` and appends a virtual `user_id` to /// [assert Appservice identity][id_assert]. /// - /// [id_assert]: https://matrix.org/docs/spec/application_service/r0.1.2#identity-assertion + /// [id_assert]: https://spec.matrix.org/v1.2/application-service-api/#identity-assertion fn try_into_http_request_with_user_id( self, base_url: &str, diff --git a/crates/ruma-appservice-api/src/lib.rs b/crates/ruma-appservice-api/src/lib.rs index e63f768e..d1326101 100644 --- a/crates/ruma-appservice-api/src/lib.rs +++ b/crates/ruma-appservice-api/src/lib.rs @@ -15,7 +15,7 @@ pub mod thirdparty; /// A namespace defined by an application service. /// -/// Used for [appservice registration](https://matrix.org/docs/spec/application_service/r0.1.2#registration). +/// Used for [appservice registration](https://spec.matrix.org/v1.2/application-service-api/#registration). #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)] pub struct Namespace { @@ -35,7 +35,7 @@ impl Namespace { /// Namespaces defined by an application service. /// -/// Used for [appservice registration](https://matrix.org/docs/spec/application_service/r0.1.2#registration). +/// Used for [appservice registration](https://spec.matrix.org/v1.2/application-service-api/#registration). #[derive(Clone, Debug, Default, Serialize, Deserialize)] #[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)] pub struct Namespaces { @@ -65,7 +65,7 @@ impl Namespaces { /// To create an instance of this type, first create a `RegistrationInit` and convert it via /// `Registration::from` / `.into()`. /// -/// Used for [appservice registration](https://matrix.org/docs/spec/application_service/r0.1.2#registration). +/// Used for [appservice registration](https://spec.matrix.org/v1.2/application-service-api/#registration). #[derive(Clone, Debug, Serialize, Deserialize)] #[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)] pub struct Registration { @@ -103,7 +103,7 @@ pub struct Registration { /// This struct will not be updated even if additional fields are added to `Registration` in a new /// (non-breaking) release of the Matrix specification. /// -/// Used for [appservice registration](https://matrix.org/docs/spec/application_service/r0.1.2#registration). +/// Used for [appservice registration](https://spec.matrix.org/v1.2/application-service-api/#registration). #[derive(Debug)] #[allow(clippy::exhaustive_structs)] pub struct RegistrationInit { diff --git a/crates/ruma-client-api/src/account/register.rs b/crates/ruma-client-api/src/account/register.rs index d8ac3bfa..9e3d61cd 100644 --- a/crates/ruma-client-api/src/account/register.rs +++ b/crates/ruma-client-api/src/account/register.rs @@ -79,7 +79,7 @@ pub mod v3 { /// Appservices can [bypass the registration flows][admin] entirely by providing their /// token in the header and setting this login `type` to `m.login.application_service`. /// - /// [admin]: https://matrix.org/docs/spec/application_service/r0.1.2#server-admin-style-permissions + /// [admin]: https://spec.matrix.org/v1.2/application-service-api/#server-admin-style-permissions #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub login_type: Option<&'a LoginType>, } diff --git a/crates/ruma-client-api/src/error.rs b/crates/ruma-client-api/src/error.rs index 54238ad2..91de32e7 100644 --- a/crates/ruma-client-api/src/error.rs +++ b/crates/ruma-client-api/src/error.rs @@ -33,7 +33,7 @@ pub enum ErrorKind { /// /// For more information, see [the spec]. /// - /// [the spec]: https://matrix.org/docs/spec/client_server/r0.6.1#soft-logout + /// [the spec]: https://spec.matrix.org/v1.2/client-server-api/#soft-logout soft_logout: bool, }, diff --git a/crates/ruma-client-api/src/filter/lazy_load.rs b/crates/ruma-client-api/src/filter/lazy_load.rs index 63ca45b4..adfdb49d 100644 --- a/crates/ruma-client-api/src/filter/lazy_load.rs +++ b/crates/ruma-client-api/src/filter/lazy_load.rs @@ -3,7 +3,7 @@ use serde::{ser::SerializeStruct as _, Deserialize, Serialize, Serializer}; /// Specifies options for [lazy-loading membership events][lazy-loading] on /// supported endpoints /// -/// [lazy-loading]: https://matrix.org/docs/spec/client_server/r0.6.1#lazy-loading-room-members +/// [lazy-loading]: https://spec.matrix.org/v1.2/client-server-api/#lazy-loading-room-members #[derive(Clone, Copy, Debug, Eq, PartialEq, Deserialize)] #[serde(from = "LazyLoadJsonRepr")] #[allow(clippy::exhaustive_enums)] diff --git a/crates/ruma-client-api/src/uiaa.rs b/crates/ruma-client-api/src/uiaa.rs index 4be6c335..26375ea2 100644 --- a/crates/ruma-client-api/src/uiaa.rs +++ b/crates/ruma-client-api/src/uiaa.rs @@ -1,6 +1,6 @@ //! Module for [User-Interactive Authentication API][uiaa] types. //! -//! [uiaa]: https://matrix.org/docs/spec/client_server/r0.6.1#user-interactive-authentication-api +//! [uiaa]: https://spec.matrix.org/v1.2/client-server-api/#user-interactive-authentication-api use std::{borrow::Cow, fmt}; @@ -339,7 +339,7 @@ pub enum AuthType { /// /// See [the spec] for how to use this. /// -/// [the spec]: https://matrix.org/docs/spec/client_server/r0.6.1#password-based +/// [the spec]: https://spec.matrix.org/v1.2/client-server-api/#password-based #[derive(Clone, Debug, Outgoing, Serialize)] #[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)] #[serde(tag = "type", rename = "m.login.password")] @@ -376,7 +376,7 @@ impl IncomingPassword { /// /// See [the spec] for how to use this. /// -/// [the spec]: https://matrix.org/docs/spec/client_server/r0.6.1#google-recaptcha +/// [the spec]: https://spec.matrix.org/v1.2/client-server-api/#google-recaptcha #[derive(Clone, Debug, Outgoing, Serialize)] #[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)] #[serde(tag = "type", rename = "m.login.recaptcha")] @@ -406,7 +406,7 @@ impl IncomingReCaptcha { /// /// See [the spec] for how to use this. /// -/// [the spec]: https://matrix.org/docs/spec/client_server/r0.6.1#email-based-identity-homeserver +/// [the spec]: https://spec.matrix.org/v1.2/client-server-api/#email-based-identity--homeserver #[derive(Clone, Debug, Outgoing, Serialize)] #[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)] #[serde(tag = "type", rename = "m.login.email.identity")] @@ -437,7 +437,7 @@ impl IncomingEmailIdentity { /// /// See [the spec] for how to use this. /// -/// [the spec]: https://matrix.org/docs/spec/client_server/r0.6.1#phone-number-msisdn-based-identity-homeserver +/// [the spec]: https://spec.matrix.org/v1.2/client-server-api/#phone-numbermsisdn-based-identity--homeserver #[derive(Clone, Debug, Outgoing, Serialize)] #[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)] #[serde(tag = "type", rename = "m.login.msisdn")] @@ -465,7 +465,7 @@ impl IncomingMsisdn { /// /// See [the spec] for how to use this. /// -/// [the spec]: https://matrix.org/docs/spec/client_server/r0.6.1#dummy-auth +/// [the spec]: https://spec.matrix.org/v1.2/client-server-api/#dummy-auth #[derive(Clone, Debug, Default, Outgoing, Serialize)] #[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)] #[serde(tag = "type", rename = "m.login.dummy")] @@ -492,7 +492,7 @@ impl IncomingDummy { /// /// See [the spec] for how to use this. /// -/// [the spec]: https://spec.matrix.org/unstable/client-server-api/#token-authenticated-registration +/// [the spec]: https://spec.matrix.org/v1.2/client-server-api/#token-authenticated-registration #[derive(Clone, Debug, Outgoing, Serialize)] #[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)] #[serde(tag = "type", rename = "m.login.registration_token")] @@ -522,7 +522,7 @@ impl IncomingRegistrationToken { /// /// See [the spec] for how to use this. /// -/// [the spec]: https://matrix.org/docs/spec/client_server/r0.6.1#fallback +/// [the spec]: https://spec.matrix.org/v1.2/client-server-api/#fallback #[derive(Clone, Debug, Outgoing, Serialize)] #[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)] pub struct FallbackAcknowledgement<'a> { diff --git a/crates/ruma-common/src/encryption.rs b/crates/ruma-common/src/encryption.rs index c7786fd5..037d2ae0 100644 --- a/crates/ruma-common/src/encryption.rs +++ b/crates/ruma-common/src/encryption.rs @@ -1,6 +1,6 @@ //! Common types for [encryption] related tasks. //! -//! [encryption]: https://matrix.org/docs/spec/client_server/r0.6.1#id76 +//! [encryption]: https://spec.matrix.org/v1.2/client-server-api/#end-to-end-encryption use std::collections::BTreeMap; diff --git a/crates/ruma-common/src/power_levels.rs b/crates/ruma-common/src/power_levels.rs index 7c8b0a06..adc73a45 100644 --- a/crates/ruma-common/src/power_levels.rs +++ b/crates/ruma-common/src/power_levels.rs @@ -1,6 +1,6 @@ //! Common types for the [`m.room.power_levels` event][power_levels]. //! -//! [power_levels]: https://matrix.org/docs/spec/client_server/r0.6.1#m-room-power-levels +//! [power_levels]: https://spec.matrix.org/v1.2/client-server-api/#mroompower_levels use js_int::{int, Int}; use serde::{Deserialize, Serialize}; diff --git a/crates/ruma-common/src/presence.rs b/crates/ruma-common/src/presence.rs index e2efd71f..8aa9f3cc 100644 --- a/crates/ruma-common/src/presence.rs +++ b/crates/ruma-common/src/presence.rs @@ -1,6 +1,6 @@ //! Common types for the [presence module][presence]. //! -//! [presence]: https://matrix.org/docs/spec/client_server/r0.6.1#id62 +//! [presence]: https://spec.matrix.org/v1.2/client-server-api/#presence use ruma_serde::StringEnum; diff --git a/crates/ruma-common/src/push.rs b/crates/ruma-common/src/push.rs index e8b7b49d..b9af15f0 100644 --- a/crates/ruma-common/src/push.rs +++ b/crates/ruma-common/src/push.rs @@ -1,6 +1,6 @@ //! Common types for the [push notifications module][push]. //! -//! [push]: https://matrix.org/docs/spec/client_server/r0.6.1#id89 +//! [push]: https://spec.matrix.org/v1.2/client-server-api/#push-notifications //! //! ## Understanding the types of this module //! @@ -438,7 +438,7 @@ impl PusherData { /// This type can hold an arbitrary string. To check for formats that are not available as a /// documented variant here, use its string representation, obtained through `.as_str()`. /// -/// [spec]: https://matrix.org/docs/spec/push_gateway/r0.1.1#homeserver-behaviour +/// [spec]: https://spec.matrix.org/v1.2/push-gateway-api/#homeserver-behaviour #[derive(Clone, Debug, PartialEq, Eq, StringEnum)] #[ruma_enum(rename_all = "snake_case")] #[non_exhaustive] diff --git a/crates/ruma-common/src/push/action.rs b/crates/ruma-common/src/push/action.rs index 2dc151f8..9a293167 100644 --- a/crates/ruma-common/src/push/action.rs +++ b/crates/ruma-common/src/push/action.rs @@ -6,7 +6,7 @@ use serde_json::value::RawValue as RawJsonValue; /// This represents the different actions that should be taken when a rule is matched, and /// controls how notifications are delivered to the client. /// -/// See for details. +/// See [the spec](https://spec.matrix.org/v1.2/client-server-api/#actions) for details. #[derive(Clone, Debug)] #[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)] pub enum Action { diff --git a/crates/ruma-common/src/push/predefined.rs b/crates/ruma-common/src/push/predefined.rs index 9ffc557b..4a511f95 100644 --- a/crates/ruma-common/src/push/predefined.rs +++ b/crates/ruma-common/src/push/predefined.rs @@ -1,6 +1,6 @@ ///! Constructors for [predefined push rules]. ///! -///! [predefined push rules]: https://matrix.org/docs/spec/client_server/r0.6.1#predefined-rules +///! [predefined push rules]: https://spec.matrix.org/v1.2/client-server-api/#predefined-rules use indexmap::indexset; use ruma_identifiers::UserId; @@ -12,7 +12,7 @@ use super::{ impl Ruleset { /// The list of all [predefined push rules]. /// - /// [predefined push rules]: https://matrix.org/docs/spec/client_server/r0.6.1#predefined-rules + /// [predefined push rules]: https://spec.matrix.org/v1.2/client-server-api/#predefined-rules /// /// # Parameters /// diff --git a/crates/ruma-common/src/thirdparty.rs b/crates/ruma-common/src/thirdparty.rs index 308beebc..fc936380 100644 --- a/crates/ruma-common/src/thirdparty.rs +++ b/crates/ruma-common/src/thirdparty.rs @@ -1,6 +1,6 @@ //! Common types for the [third party networks module][thirdparty]. //! -//! [thirdparty]: https://matrix.org/docs/spec/client_server/r0.6.1#id153 +//! [thirdparty]: https://spec.matrix.org/v1.2/client-server-api/#third-party-networks use std::collections::BTreeMap; diff --git a/crates/ruma-common/src/to_device.rs b/crates/ruma-common/src/to_device.rs index bdadc8de..0ba388e0 100644 --- a/crates/ruma-common/src/to_device.rs +++ b/crates/ruma-common/src/to_device.rs @@ -1,6 +1,6 @@ //! Common types for the Send-To-Device Messaging //! -//! [send-to-device]: https://matrix.org/docs/spec/client_server/r0.6.1#id70 +//! [send-to-device]: https://spec.matrix.org/v1.2/client-server-api/#send-to-device-messaging use std::{ convert::TryFrom, diff --git a/crates/ruma-events/src/call/answer.rs b/crates/ruma-events/src/call/answer.rs index 808d9b7b..06cc80e1 100644 --- a/crates/ruma-events/src/call/answer.rs +++ b/crates/ruma-events/src/call/answer.rs @@ -1,6 +1,6 @@ //! Types for the [`m.call.answer`] event. //! -//! [`m.call.answer`]: https://spec.matrix.org/v1.1/client-server-api/#mcallanswer +//! [`m.call.answer`]: https://spec.matrix.org/v1.2/client-server-api/#mcallanswer use js_int::UInt; use ruma_events_macros::EventContent; diff --git a/crates/ruma-events/src/call/candidates.rs b/crates/ruma-events/src/call/candidates.rs index f7a6ced0..988e1a7d 100644 --- a/crates/ruma-events/src/call/candidates.rs +++ b/crates/ruma-events/src/call/candidates.rs @@ -1,6 +1,6 @@ //! Types for the [`m.call.candidates`] event. //! -//! [`m.call.candidates`]: https://spec.matrix.org/v1.1/client-server-api/#mcallcandidates +//! [`m.call.candidates`]: https://spec.matrix.org/v1.2/client-server-api/#mcallcandidates use js_int::UInt; use ruma_events_macros::EventContent; diff --git a/crates/ruma-events/src/call/hangup.rs b/crates/ruma-events/src/call/hangup.rs index fc14c8c4..fee5c988 100644 --- a/crates/ruma-events/src/call/hangup.rs +++ b/crates/ruma-events/src/call/hangup.rs @@ -1,6 +1,6 @@ //! Types for the [`m.call.hangup`] event. //! -//! [`m.call.hangup`]: https://spec.matrix.org/v1.1/client-server-api/#mcallhangup +//! [`m.call.hangup`]: https://spec.matrix.org/v1.2/client-server-api/#mcallhangup use js_int::UInt; use ruma_events_macros::EventContent; diff --git a/crates/ruma-events/src/call/invite.rs b/crates/ruma-events/src/call/invite.rs index 4c40dc12..9a97350a 100644 --- a/crates/ruma-events/src/call/invite.rs +++ b/crates/ruma-events/src/call/invite.rs @@ -1,6 +1,6 @@ //! Types for the [`m.call.invite`] event. //! -//! [`m.call.invite`]: https://spec.matrix.org/v1.1/client-server-api/#mcallinvite +//! [`m.call.invite`]: https://spec.matrix.org/v1.2/client-server-api/#mcallinvite use js_int::UInt; use ruma_events_macros::EventContent; diff --git a/crates/ruma-events/src/direct.rs b/crates/ruma-events/src/direct.rs index 6ec6c3df..3565406f 100644 --- a/crates/ruma-events/src/direct.rs +++ b/crates/ruma-events/src/direct.rs @@ -1,6 +1,6 @@ //! Types for the [`m.direct`] event. //! -//! [`m.direct`]: https://spec.matrix.org/v1.1/client-server-api/#mdirect +//! [`m.direct`]: https://spec.matrix.org/v1.2/client-server-api/#mdirect use std::{ collections::BTreeMap, diff --git a/crates/ruma-events/src/dummy.rs b/crates/ruma-events/src/dummy.rs index e74ae468..77f09280 100644 --- a/crates/ruma-events/src/dummy.rs +++ b/crates/ruma-events/src/dummy.rs @@ -1,6 +1,6 @@ //! Types for the [`m.dummy`] event. //! -//! [`m.dummy`]: https://spec.matrix.org/v1.1/client-server-api/#mdummy +//! [`m.dummy`]: https://spec.matrix.org/v1.2/client-server-api/#mdummy use std::fmt; diff --git a/crates/ruma-events/src/forwarded_room_key.rs b/crates/ruma-events/src/forwarded_room_key.rs index 652580a8..9ec7f20c 100644 --- a/crates/ruma-events/src/forwarded_room_key.rs +++ b/crates/ruma-events/src/forwarded_room_key.rs @@ -1,6 +1,6 @@ //! Types for the [`m.forwarded_room_key`] event. //! -//! [`m.forwarded_room_key`]: https://spec.matrix.org/v1.1/client-server-api/#mforwarded_room_key +//! [`m.forwarded_room_key`]: https://spec.matrix.org/v1.2/client-server-api/#mforwarded_room_key use ruma_events_macros::EventContent; use ruma_identifiers::{EventEncryptionAlgorithm, RoomId}; diff --git a/crates/ruma-events/src/fully_read.rs b/crates/ruma-events/src/fully_read.rs index 4e7a5978..3975353b 100644 --- a/crates/ruma-events/src/fully_read.rs +++ b/crates/ruma-events/src/fully_read.rs @@ -1,6 +1,6 @@ //! Types for the [`m.fully_read`] event. //! -//! [`m.fully_read`]: https://spec.matrix.org/v1.1/client-server-api/#mfully_read +//! [`m.fully_read`]: https://spec.matrix.org/v1.2/client-server-api/#mfully_read use ruma_events_macros::EventContent; use ruma_identifiers::EventId; diff --git a/crates/ruma-events/src/ignored_user_list.rs b/crates/ruma-events/src/ignored_user_list.rs index 3bbdfd95..32153e96 100644 --- a/crates/ruma-events/src/ignored_user_list.rs +++ b/crates/ruma-events/src/ignored_user_list.rs @@ -1,6 +1,6 @@ //! Types for the [`m.ignored_user_list`] event. //! -//! [`m.ignored_user_list`]: https://spec.matrix.org/v1.1/client-server-api/#mignored_user_list +//! [`m.ignored_user_list`]: https://spec.matrix.org/v1.2/client-server-api/#mignored_user_list use ruma_events_macros::EventContent; use ruma_identifiers::UserId; diff --git a/crates/ruma-events/src/key/verification/accept.rs b/crates/ruma-events/src/key/verification/accept.rs index 6da9ddcd..9d2844d9 100644 --- a/crates/ruma-events/src/key/verification/accept.rs +++ b/crates/ruma-events/src/key/verification/accept.rs @@ -1,6 +1,6 @@ //! Types for the [`m.key.verification.accept`] event. //! -//! [`m.key.verification.accept`]: https://spec.matrix.org/v1.1/client-server-api/#mkeyverificationaccept +//! [`m.key.verification.accept`]: https://spec.matrix.org/v1.2/client-server-api/#mkeyverificationaccept use std::collections::BTreeMap; diff --git a/crates/ruma-events/src/key/verification/cancel.rs b/crates/ruma-events/src/key/verification/cancel.rs index edb0be48..70a5d752 100644 --- a/crates/ruma-events/src/key/verification/cancel.rs +++ b/crates/ruma-events/src/key/verification/cancel.rs @@ -1,6 +1,6 @@ //! Types for the [`m.key.verification.cancel`] event. //! -//! [`m.key.verification.cancel`]: https://spec.matrix.org/v1.1/client-server-api/#mkeyverificationcancel +//! [`m.key.verification.cancel`]: https://spec.matrix.org/v1.2/client-server-api/#mkeyverificationcancel use ruma_events_macros::EventContent; use ruma_identifiers::TransactionId; diff --git a/crates/ruma-events/src/key/verification/done.rs b/crates/ruma-events/src/key/verification/done.rs index e188bc46..604b7442 100644 --- a/crates/ruma-events/src/key/verification/done.rs +++ b/crates/ruma-events/src/key/verification/done.rs @@ -1,6 +1,6 @@ //! Types for the [`m.key.verification.done`] event. //! -//! [`m.key.verification.done`]: https://spec.matrix.org/v1.1/client-server-api/#mkeyverificationdone +//! [`m.key.verification.done`]: https://spec.matrix.org/v1.2/client-server-api/#mkeyverificationdone use ruma_events_macros::EventContent; use ruma_identifiers::TransactionId; diff --git a/crates/ruma-events/src/key/verification/key.rs b/crates/ruma-events/src/key/verification/key.rs index cdef3757..d3736ddf 100644 --- a/crates/ruma-events/src/key/verification/key.rs +++ b/crates/ruma-events/src/key/verification/key.rs @@ -1,6 +1,6 @@ //! Types for the [`m.key.verification.key`] event. //! -//! [`m.key.verification.key`]: https://spec.matrix.org/v1.1/client-server-api/#mkeyverificationkey +//! [`m.key.verification.key`]: https://spec.matrix.org/v1.2/client-server-api/#mkeyverificationkey use ruma_events_macros::EventContent; use ruma_identifiers::TransactionId; diff --git a/crates/ruma-events/src/key/verification/mac.rs b/crates/ruma-events/src/key/verification/mac.rs index 702ab903..67d43557 100644 --- a/crates/ruma-events/src/key/verification/mac.rs +++ b/crates/ruma-events/src/key/verification/mac.rs @@ -1,6 +1,6 @@ //! Types for the [`m.key.verification.mac`] event. //! -//! [`m.key.verification.mac`]: https://spec.matrix.org/v1.1/client-server-api/#mkeyverificationmac +//! [`m.key.verification.mac`]: https://spec.matrix.org/v1.2/client-server-api/#mkeyverificationmac use std::collections::BTreeMap; diff --git a/crates/ruma-events/src/key/verification/ready.rs b/crates/ruma-events/src/key/verification/ready.rs index edf49d3a..da0ef05f 100644 --- a/crates/ruma-events/src/key/verification/ready.rs +++ b/crates/ruma-events/src/key/verification/ready.rs @@ -1,6 +1,6 @@ //! Types for the [`m.key.verification.ready`] event. //! -//! [`m.key.verification.ready`]: https://spec.matrix.org/v1.1/client-server-api/#mkeyverificationready +//! [`m.key.verification.ready`]: https://spec.matrix.org/v1.2/client-server-api/#mkeyverificationready use ruma_events_macros::EventContent; use ruma_identifiers::{DeviceId, TransactionId}; diff --git a/crates/ruma-events/src/key/verification/request.rs b/crates/ruma-events/src/key/verification/request.rs index 4ab6742f..20edae6c 100644 --- a/crates/ruma-events/src/key/verification/request.rs +++ b/crates/ruma-events/src/key/verification/request.rs @@ -1,6 +1,6 @@ //! Types for the [`m.key.verification.request`] event. //! -//! [`m.key.verification.request`]: https://spec.matrix.org/v1.1/client-server-api/#mkeyverificationrequest +//! [`m.key.verification.request`]: https://spec.matrix.org/v1.2/client-server-api/#mkeyverificationrequest use ruma_common::MilliSecondsSinceUnixEpoch; use ruma_events_macros::EventContent; diff --git a/crates/ruma-events/src/key/verification/start.rs b/crates/ruma-events/src/key/verification/start.rs index 7f0021d9..c1479341 100644 --- a/crates/ruma-events/src/key/verification/start.rs +++ b/crates/ruma-events/src/key/verification/start.rs @@ -1,6 +1,6 @@ //! Types for the [`m.key.verification.start`] event. //! -//! [`m.key.verification.start`]: https://spec.matrix.org/v1.1/client-server-api/#mkeyverificationstart +//! [`m.key.verification.start`]: https://spec.matrix.org/v1.2/client-server-api/#mkeyverificationstart use std::collections::BTreeMap; @@ -86,9 +86,9 @@ pub enum StartMethod { /// The `m.reciprocate.v1` verification method. /// - /// The spec entry for this method can be found [here][1]. + /// The spec entry for this method can be found [here]. /// - /// [1]: https://spec.matrix.org/unstable/client-server-api/#mkeyverificationstartmreciprocatev1 + /// [here]: https://spec.matrix.org/v1.2/client-server-api/#mkeyverificationstartmreciprocatev1 ReciprocateV1(ReciprocateV1Content), /// Any unknown start method. diff --git a/crates/ruma-events/src/policy/rule/room.rs b/crates/ruma-events/src/policy/rule/room.rs index d1456434..ba947448 100644 --- a/crates/ruma-events/src/policy/rule/room.rs +++ b/crates/ruma-events/src/policy/rule/room.rs @@ -1,6 +1,6 @@ //! Types for the [`m.policy.rule.room`] event. //! -//! [`m.policy.rule.room`]: https://spec.matrix.org/v1.1/client-server-api/#mpolicyruleroom +//! [`m.policy.rule.room`]: https://spec.matrix.org/v1.2/client-server-api/#mpolicyruleroom use ruma_events_macros::EventContent; use serde::{Deserialize, Serialize}; diff --git a/crates/ruma-events/src/policy/rule/server.rs b/crates/ruma-events/src/policy/rule/server.rs index daaccfdd..487c5951 100644 --- a/crates/ruma-events/src/policy/rule/server.rs +++ b/crates/ruma-events/src/policy/rule/server.rs @@ -1,6 +1,6 @@ //! Types for the [`m.policy.rule.server`] event. //! -//! [`m.policy.rule.server`]: https://spec.matrix.org/v1.1/client-server-api/#mpolicyruleserver +//! [`m.policy.rule.server`]: https://spec.matrix.org/v1.2/client-server-api/#mpolicyruleserver use ruma_events_macros::EventContent; use serde::{Deserialize, Serialize}; diff --git a/crates/ruma-events/src/policy/rule/user.rs b/crates/ruma-events/src/policy/rule/user.rs index 2c96ccd6..86e027da 100644 --- a/crates/ruma-events/src/policy/rule/user.rs +++ b/crates/ruma-events/src/policy/rule/user.rs @@ -1,6 +1,6 @@ //! Types for the [`m.policy.rule.user`] event. //! -//! [`m.policy.rule.user`]: https://spec.matrix.org/v1.1/client-server-api/#mpolicyruleuser +//! [`m.policy.rule.user`]: https://spec.matrix.org/v1.2/client-server-api/#mpolicyruleuser use ruma_events_macros::EventContent; use serde::{Deserialize, Serialize}; diff --git a/crates/ruma-events/src/push_rules.rs b/crates/ruma-events/src/push_rules.rs index 2485dfa8..039445db 100644 --- a/crates/ruma-events/src/push_rules.rs +++ b/crates/ruma-events/src/push_rules.rs @@ -1,6 +1,6 @@ //! Types for the [`m.push_rules`] event. //! -//! [`m.push_rules`]: https://spec.matrix.org/v1.1/client-server-api/#mpush_rules +//! [`m.push_rules`]: https://spec.matrix.org/v1.2/client-server-api/#mpush_rules use ruma_common::push::Ruleset; use ruma_events_macros::EventContent; diff --git a/crates/ruma-events/src/receipt.rs b/crates/ruma-events/src/receipt.rs index d279edb1..3e3c849d 100644 --- a/crates/ruma-events/src/receipt.rs +++ b/crates/ruma-events/src/receipt.rs @@ -1,6 +1,6 @@ //! Types for the [`m.receipt`] event. //! -//! [`m.receipt`]: https://spec.matrix.org/v1.1/client-server-api/#mreceipt +//! [`m.receipt`]: https://spec.matrix.org/v1.2/client-server-api/#mreceipt use std::{ collections::BTreeMap, diff --git a/crates/ruma-events/src/room/avatar.rs b/crates/ruma-events/src/room/avatar.rs index ea069e33..7868f16c 100644 --- a/crates/ruma-events/src/room/avatar.rs +++ b/crates/ruma-events/src/room/avatar.rs @@ -1,6 +1,6 @@ //! Types for the [`m.room.avatar`] event. //! -//! [`m.room.avatar`]: https://spec.matrix.org/v1.1/client-server-api/#mroomavatar +//! [`m.room.avatar`]: https://spec.matrix.org/v1.2/client-server-api/#mroomavatar use js_int::UInt; use ruma_events_macros::EventContent; diff --git a/crates/ruma-events/src/room/canonical_alias.rs b/crates/ruma-events/src/room/canonical_alias.rs index f181a72d..f5ffcc0b 100644 --- a/crates/ruma-events/src/room/canonical_alias.rs +++ b/crates/ruma-events/src/room/canonical_alias.rs @@ -1,6 +1,6 @@ //! Types for the [`m.room.canonical_alias`] event. //! -//! [`m.room.canonical_alias`]: https://spec.matrix.org/v1.1/client-server-api/#mroomcanonical_alias +//! [`m.room.canonical_alias`]: https://spec.matrix.org/v1.2/client-server-api/#mroomcanonical_alias use ruma_events_macros::EventContent; use ruma_identifiers::RoomAliasId; diff --git a/crates/ruma-events/src/room/create.rs b/crates/ruma-events/src/room/create.rs index b9e5e1b9..ade5655c 100644 --- a/crates/ruma-events/src/room/create.rs +++ b/crates/ruma-events/src/room/create.rs @@ -1,6 +1,6 @@ //! Types for the [`m.room.create`] event. //! -//! [`m.room.create`]: https://spec.matrix.org/v1.1/client-server-api/#mroomcreate +//! [`m.room.create`]: https://spec.matrix.org/v1.2/client-server-api/#mroomcreate use ruma_events_macros::EventContent; use ruma_identifiers::{EventId, RoomId, RoomVersionId, UserId}; diff --git a/crates/ruma-events/src/room/encrypted.rs b/crates/ruma-events/src/room/encrypted.rs index 9402e65a..dc1a1b97 100644 --- a/crates/ruma-events/src/room/encrypted.rs +++ b/crates/ruma-events/src/room/encrypted.rs @@ -1,6 +1,6 @@ //! Types for the [`m.room.encrypted`] event. //! -//! [`m.room.encrypted`]: https://spec.matrix.org/v1.1/client-server-api/#mroomencrypted +//! [`m.room.encrypted`]: https://spec.matrix.org/v1.2/client-server-api/#mroomencrypted use std::collections::BTreeMap; @@ -24,7 +24,7 @@ pub struct RoomEncryptedEventContent { /// Information about related messages for [rich replies]. /// - /// [rich replies]: https://matrix.org/docs/spec/client_server/r0.6.1#rich-replies + /// [rich replies]: https://spec.matrix.org/v1.2/client-server-api/#rich-replies #[serde(flatten, skip_serializing_if = "Option::is_none")] pub relates_to: Option, } diff --git a/crates/ruma-events/src/room/encryption.rs b/crates/ruma-events/src/room/encryption.rs index 5d2f9f65..bc42ed16 100644 --- a/crates/ruma-events/src/room/encryption.rs +++ b/crates/ruma-events/src/room/encryption.rs @@ -1,6 +1,6 @@ //! Types for the [`m.room.encryption`] event. //! -//! [`m.room.encryption`]: https://spec.matrix.org/v1.1/client-server-api/#mroomencryption +//! [`m.room.encryption`]: https://spec.matrix.org/v1.2/client-server-api/#mroomencryption use js_int::UInt; use ruma_events_macros::EventContent; diff --git a/crates/ruma-events/src/room/guest_access.rs b/crates/ruma-events/src/room/guest_access.rs index cc8dff78..fb3d9593 100644 --- a/crates/ruma-events/src/room/guest_access.rs +++ b/crates/ruma-events/src/room/guest_access.rs @@ -1,6 +1,6 @@ //! Types for the [`m.room.guest_access`] event. //! -//! [`m.room.guest_access`]: https://spec.matrix.org/v1.1/client-server-api/#mroomguest_access +//! [`m.room.guest_access`]: https://spec.matrix.org/v1.2/client-server-api/#mroomguest_access use ruma_events_macros::EventContent; use ruma_serde::StringEnum; diff --git a/crates/ruma-events/src/room/history_visibility.rs b/crates/ruma-events/src/room/history_visibility.rs index 3c62f669..a668af71 100644 --- a/crates/ruma-events/src/room/history_visibility.rs +++ b/crates/ruma-events/src/room/history_visibility.rs @@ -1,6 +1,6 @@ //! Types for the [`m.room.history_visibility`] event. //! -//! [`m.room.history_visibility`]: https://spec.matrix.org/v1.1/client-server-api/#mroomhistory_visibility +//! [`m.room.history_visibility`]: https://spec.matrix.org/v1.2/client-server-api/#mroomhistory_visibility use ruma_events_macros::EventContent; use ruma_serde::StringEnum; diff --git a/crates/ruma-events/src/room/join_rules.rs b/crates/ruma-events/src/room/join_rules.rs index a495992e..15cd842c 100644 --- a/crates/ruma-events/src/room/join_rules.rs +++ b/crates/ruma-events/src/room/join_rules.rs @@ -1,6 +1,6 @@ //! Types for the [`m.room.join_rules`] event. //! -//! [`m.room.join_rules`]: https://spec.matrix.org/v1.1/client-server-api/#mroomjoin_rules +//! [`m.room.join_rules`]: https://spec.matrix.org/v1.2/client-server-api/#mroomjoin_rules use std::{borrow::Cow, collections::BTreeMap}; diff --git a/crates/ruma-events/src/room/member.rs b/crates/ruma-events/src/room/member.rs index 0ebde4dc..8d534a64 100644 --- a/crates/ruma-events/src/room/member.rs +++ b/crates/ruma-events/src/room/member.rs @@ -1,6 +1,6 @@ //! Types for the [`m.room.member`] event. //! -//! [`m.room.member`]: https://spec.matrix.org/v1.1/client-server-api/#mroommember +//! [`m.room.member`]: https://spec.matrix.org/v1.2/client-server-api/#mroommember use std::collections::BTreeMap; @@ -383,7 +383,7 @@ impl RoomMemberEvent { /// /// Check [the specification][spec] for details. /// - /// [spec]: https://matrix.org/docs/spec/client_server/r0.6.1#m-room-member + /// [spec]: https://spec.matrix.org/v1.2/client-server-api/#mroommember pub fn membership_change(&self) -> MembershipChange { membership_change(&self.content, self.prev_content.as_ref(), &self.sender, &self.state_key) } @@ -394,7 +394,7 @@ impl SyncStateEvent { /// /// Check [the specification][spec] for details. /// - /// [spec]: https://matrix.org/docs/spec/client_server/r0.6.1#m-room-member + /// [spec]: https://spec.matrix.org/v1.2/client-server-api/#mroommember pub fn membership_change(&self) -> MembershipChange { membership_change(&self.content, self.prev_content.as_ref(), &self.sender, &self.state_key) } @@ -405,7 +405,7 @@ impl StrippedStateEvent { /// /// Check [the specification][spec] for details. /// - /// [spec]: https://matrix.org/docs/spec/client_server/r0.6.1#m-room-member + /// [spec]: https://spec.matrix.org/v1.2/client-server-api/#mroommember pub fn membership_change(&self) -> MembershipChange { membership_change(&self.content, None, &self.sender, &self.state_key) } diff --git a/crates/ruma-events/src/room/message.rs b/crates/ruma-events/src/room/message.rs index d37c0995..b1056e60 100644 --- a/crates/ruma-events/src/room/message.rs +++ b/crates/ruma-events/src/room/message.rs @@ -1,6 +1,6 @@ //! Types for the [`m.room.message`] event. //! -//! [`m.room.message`]: https://spec.matrix.org/v1.1/client-server-api/#mroommessage +//! [`m.room.message`]: https://spec.matrix.org/v1.2/client-server-api/#mroommessage use std::{borrow::Cow, fmt}; @@ -38,7 +38,7 @@ pub struct RoomMessageEventContent { /// Information about related messages for [rich replies]. /// - /// [rich replies]: https://matrix.org/docs/spec/client_server/r0.6.1#rich-replies + /// [rich replies]: https://spec.matrix.org/v1.2/client-server-api/#rich-replies #[serde(flatten, skip_serializing_if = "Option::is_none")] pub relates_to: Option, } diff --git a/crates/ruma-events/src/room/message/feedback.rs b/crates/ruma-events/src/room/message/feedback.rs index 33a65c7f..635faaa8 100644 --- a/crates/ruma-events/src/room/message/feedback.rs +++ b/crates/ruma-events/src/room/message/feedback.rs @@ -1,6 +1,6 @@ //! Types for the [`m.room.message.feedback`] event. //! -//! [`m.room.message.feedback`]: https://spec.matrix.org/v1.1/client-server-api/#mroommessagefeedback +//! [`m.room.message.feedback`]: https://spec.matrix.org/v1.2/client-server-api/#mroommessagefeedback use ruma_events_macros::EventContent; use ruma_identifiers::EventId; diff --git a/crates/ruma-events/src/room/name.rs b/crates/ruma-events/src/room/name.rs index 42eaba20..af3a177a 100644 --- a/crates/ruma-events/src/room/name.rs +++ b/crates/ruma-events/src/room/name.rs @@ -1,6 +1,6 @@ //! Types for the [`m.room.name`] event. //! -//! [`m.room.name`]: https://spec.matrix.org/v1.1/client-server-api/#mroomname +//! [`m.room.name`]: https://spec.matrix.org/v1.2/client-server-api/#mroomname use ruma_events_macros::EventContent; use ruma_identifiers::RoomName; diff --git a/crates/ruma-events/src/room/pinned_events.rs b/crates/ruma-events/src/room/pinned_events.rs index a554aecf..4fce1767 100644 --- a/crates/ruma-events/src/room/pinned_events.rs +++ b/crates/ruma-events/src/room/pinned_events.rs @@ -1,6 +1,6 @@ //! Types for the [`m.room.pinned_events`] event. //! -//! [`m.room.pinned_events`]: https://spec.matrix.org/v1.1/client-server-api/#mroompinned_events +//! [`m.room.pinned_events`]: https://spec.matrix.org/v1.2/client-server-api/#mroompinned_events use ruma_events_macros::EventContent; use ruma_identifiers::EventId; diff --git a/crates/ruma-events/src/room/power_levels.rs b/crates/ruma-events/src/room/power_levels.rs index d50c2a66..9a556607 100644 --- a/crates/ruma-events/src/room/power_levels.rs +++ b/crates/ruma-events/src/room/power_levels.rs @@ -1,6 +1,6 @@ //! Types for the [`m.room.power_levels`] event. //! -//! [`m.room.power_levels`]: https://spec.matrix.org/v1.1/client-server-api/#mroompower_levels +//! [`m.room.power_levels`]: https://spec.matrix.org/v1.2/client-server-api/#mroompower_levels use std::collections::BTreeMap; diff --git a/crates/ruma-events/src/room/redaction.rs b/crates/ruma-events/src/room/redaction.rs index 5d93d706..5d4f7ba3 100644 --- a/crates/ruma-events/src/room/redaction.rs +++ b/crates/ruma-events/src/room/redaction.rs @@ -1,6 +1,6 @@ //! Types for the [`m.room.redaction`] event. //! -//! [`m.room.redaction`]: https://spec.matrix.org/v1.1/client-server-api/#mroomredaction +//! [`m.room.redaction`]: https://spec.matrix.org/v1.2/client-server-api/#mroomredaction use ruma_common::MilliSecondsSinceUnixEpoch; use ruma_events_macros::{Event, EventContent}; diff --git a/crates/ruma-events/src/room/server_acl.rs b/crates/ruma-events/src/room/server_acl.rs index 90b25808..0c75bc1b 100644 --- a/crates/ruma-events/src/room/server_acl.rs +++ b/crates/ruma-events/src/room/server_acl.rs @@ -1,6 +1,6 @@ //! Types for the [`m.room.server_acl`] event. //! -//! [`m.room.server_acl`]: https://spec.matrix.org/v1.1/client-server-api/#mroomserver_acl +//! [`m.room.server_acl`]: https://spec.matrix.org/v1.2/client-server-api/#mroomserver_acl use ruma_events_macros::EventContent; use ruma_identifiers::ServerName; diff --git a/crates/ruma-events/src/room/third_party_invite.rs b/crates/ruma-events/src/room/third_party_invite.rs index 75265253..d515f127 100644 --- a/crates/ruma-events/src/room/third_party_invite.rs +++ b/crates/ruma-events/src/room/third_party_invite.rs @@ -1,6 +1,6 @@ //! Types for the [`m.room.third_party_invite`] event. //! -//! [`m.room.third_party_invite`]: https://spec.matrix.org/v1.1/client-server-api/#mroomthird_party_invite +//! [`m.room.third_party_invite`]: https://spec.matrix.org/v1.2/client-server-api/#mroomthird_party_invite use ruma_events_macros::EventContent; use ruma_serde::Base64; diff --git a/crates/ruma-events/src/room/tombstone.rs b/crates/ruma-events/src/room/tombstone.rs index 9eb5bee4..27b70db2 100644 --- a/crates/ruma-events/src/room/tombstone.rs +++ b/crates/ruma-events/src/room/tombstone.rs @@ -1,6 +1,6 @@ //! Types for the [`m.room.tombstone`] event. //! -//! [`m.room.tombstone`]: https://spec.matrix.org/v1.1/client-server-api/#mroomtombstone +//! [`m.room.tombstone`]: https://spec.matrix.org/v1.2/client-server-api/#mroomtombstone use ruma_events_macros::EventContent; use ruma_identifiers::RoomId; diff --git a/crates/ruma-events/src/room/topic.rs b/crates/ruma-events/src/room/topic.rs index e814b229..d58d1a4f 100644 --- a/crates/ruma-events/src/room/topic.rs +++ b/crates/ruma-events/src/room/topic.rs @@ -1,6 +1,6 @@ //! Types for the [`m.room.topic`] event. //! -//! [`m.room.topic`]: https://spec.matrix.org/v1.1/client-server-api/#mroomtopic +//! [`m.room.topic`]: https://spec.matrix.org/v1.2/client-server-api/#mroomtopic use ruma_events_macros::EventContent; use serde::{Deserialize, Serialize}; diff --git a/crates/ruma-events/src/room_key.rs b/crates/ruma-events/src/room_key.rs index 94f49953..570fbe82 100644 --- a/crates/ruma-events/src/room_key.rs +++ b/crates/ruma-events/src/room_key.rs @@ -1,6 +1,6 @@ //! Types for the [`m.room_key`] event. //! -//! [`m.room_key`]: https://spec.matrix.org/v1.1/client-server-api/#mroom_key +//! [`m.room_key`]: https://spec.matrix.org/v1.2/client-server-api/#mroom_key use ruma_events_macros::EventContent; use ruma_identifiers::{EventEncryptionAlgorithm, RoomId}; diff --git a/crates/ruma-events/src/room_key_request.rs b/crates/ruma-events/src/room_key_request.rs index ddf57dec..bc2eb354 100644 --- a/crates/ruma-events/src/room_key_request.rs +++ b/crates/ruma-events/src/room_key_request.rs @@ -1,6 +1,6 @@ //! Types for the [`m.room_key_request`] event. //! -//! [`m.room_key_request`]: https://spec.matrix.org/v1.1/client-server-api/#mroom_key_request +//! [`m.room_key_request`]: https://spec.matrix.org/v1.2/client-server-api/#mroom_key_request use ruma_events_macros::EventContent; use ruma_identifiers::{DeviceId, EventEncryptionAlgorithm, RoomId, TransactionId}; diff --git a/crates/ruma-events/src/secret/request.rs b/crates/ruma-events/src/secret/request.rs index 56fbd288..d89561a1 100644 --- a/crates/ruma-events/src/secret/request.rs +++ b/crates/ruma-events/src/secret/request.rs @@ -1,6 +1,6 @@ //! Types for the [`m.secret.request`] event. //! -//! [`m.secret.request`]: https://spec.matrix.org/v1.1/client-server-api/#msecretrequest +//! [`m.secret.request`]: https://spec.matrix.org/v1.2/client-server-api/#msecretrequest use std::convert::TryFrom; diff --git a/crates/ruma-events/src/secret/send.rs b/crates/ruma-events/src/secret/send.rs index 86d201f4..31f99bb5 100644 --- a/crates/ruma-events/src/secret/send.rs +++ b/crates/ruma-events/src/secret/send.rs @@ -1,6 +1,6 @@ //! Types for the [`m.secret.send`] event. //! -//! [`m.secret.send`]: https://spec.matrix.org/v1.1/client-server-api/#msecretsend +//! [`m.secret.send`]: https://spec.matrix.org/v1.2/client-server-api/#msecretsend use ruma_events_macros::EventContent; use ruma_identifiers::TransactionId; diff --git a/crates/ruma-events/src/space.rs b/crates/ruma-events/src/space.rs index 4bf705dc..0d89319e 100644 --- a/crates/ruma-events/src/space.rs +++ b/crates/ruma-events/src/space.rs @@ -1,6 +1,6 @@ //! Types for the `m.space` events. //! -//! See [the unstable specification](https://spec.matrix.org/unstable/client-server-api/#spaces). +//! See [the specification](https://spec.matrix.org/v1.2/client-server-api/#spaces). pub mod child; pub mod parent; diff --git a/crates/ruma-events/src/space/child.rs b/crates/ruma-events/src/space/child.rs index 41be920f..55158de3 100644 --- a/crates/ruma-events/src/space/child.rs +++ b/crates/ruma-events/src/space/child.rs @@ -1,6 +1,6 @@ //! Types for the [`m.space.child`] event. //! -//! [`m.space.child`]: https://spec.matrix.org/unstable/client-server-api/#mspacechild +//! [`m.space.child`]: https://spec.matrix.org/v1.2/client-server-api/#mspacechild use ruma_events_macros::EventContent; use ruma_identifiers::ServerName; diff --git a/crates/ruma-events/src/space/parent.rs b/crates/ruma-events/src/space/parent.rs index aa417d63..2290e695 100644 --- a/crates/ruma-events/src/space/parent.rs +++ b/crates/ruma-events/src/space/parent.rs @@ -1,6 +1,6 @@ //! Types for the [`m.space.parent`] event. //! -//! [`m.space.parent`]: https://spec.matrix.org/unstable/client-server-api/#mspaceparent +//! [`m.space.parent`]: https://spec.matrix.org/v1.2/client-server-api/#mspaceparent use ruma_events_macros::EventContent; use ruma_identifiers::ServerName; diff --git a/crates/ruma-events/src/sticker.rs b/crates/ruma-events/src/sticker.rs index af5094eb..e1c11f5a 100644 --- a/crates/ruma-events/src/sticker.rs +++ b/crates/ruma-events/src/sticker.rs @@ -1,6 +1,6 @@ //! Types for the [`m.sticker`] event. //! -//! [`m.sticker`]: https://spec.matrix.org/v1.1/client-server-api/#msticker +//! [`m.sticker`]: https://spec.matrix.org/v1.2/client-server-api/#msticker use ruma_events_macros::EventContent; use ruma_identifiers::MxcUri; diff --git a/crates/ruma-events/src/tag.rs b/crates/ruma-events/src/tag.rs index 1d6d0e3e..9cf4a96e 100644 --- a/crates/ruma-events/src/tag.rs +++ b/crates/ruma-events/src/tag.rs @@ -1,6 +1,6 @@ //! Types for the [`m.tag`] event. //! -//! [`m.tag`]: https://spec.matrix.org/v1.1/client-server-api/#mtag +//! [`m.tag`]: https://spec.matrix.org/v1.2/client-server-api/#mtag use std::{collections::BTreeMap, error::Error, fmt, str::FromStr}; @@ -88,7 +88,7 @@ pub enum TagName { LowPriority, /// `m.server_notice`: Used to identify - /// [Server Notice Rooms](https://matrix.org/docs/spec/client_server/r0.6.1#module-server-notices). + /// [Server Notice Rooms](https://spec.matrix.org/v1.2/client-server-api/#server-notices). ServerNotice, /// `u.*`: User-defined tag diff --git a/crates/ruma-events/src/typing.rs b/crates/ruma-events/src/typing.rs index ba924e42..ce6d054a 100644 --- a/crates/ruma-events/src/typing.rs +++ b/crates/ruma-events/src/typing.rs @@ -1,6 +1,6 @@ //! Types for the [`m.typing`] event. //! -//! [`m.typing`]: https://spec.matrix.org/v1.1/client-server-api/#mtyping +//! [`m.typing`]: https://spec.matrix.org/v1.2/client-server-api/#mtyping use ruma_events_macros::EventContent; use ruma_identifiers::UserId; diff --git a/crates/ruma-federation-api/src/membership/prepare_leave_event.rs b/crates/ruma-federation-api/src/membership/prepare_leave_event.rs index 944c0f87..f9a0bba7 100644 --- a/crates/ruma-federation-api/src/membership/prepare_leave_event.rs +++ b/crates/ruma-federation-api/src/membership/prepare_leave_event.rs @@ -4,7 +4,9 @@ //! to prepare a leave event to get out of the room. pub mod v1 { - //! [GET /_matrix/federation/v1/make_leave/{roomId}/{userId}](https://matrix.org/docs/spec/server_server/r0.1.4#get-matrix-federation-v1-make-leave-roomid-userid) + //! `/v1/` ([spec]) + //! + //! [spec]: https://spec.matrix.org/v1.2/server-server-api/#get_matrixfederationv1make_leaveroomiduserid use ruma_api::ruma_api; use ruma_identifiers::{RoomId, RoomVersionId, UserId}; diff --git a/crates/ruma-federation-api/src/serde/v1_pdu.rs b/crates/ruma-federation-api/src/serde/v1_pdu.rs index df61bd10..d0412704 100644 --- a/crates/ruma-federation-api/src/serde/v1_pdu.rs +++ b/crates/ruma-federation-api/src/serde/v1_pdu.rs @@ -1,8 +1,8 @@ //! A module to deserialize a response from incorrectly specified endpoint: //! -//! - [PUT /_matrix/federation/v1/send_join/{roomId}/{eventId}](https://matrix.org/docs/spec/server_server/r0.1.4#put-matrix-federation-v1-send-join-roomid-eventid) -//! - [PUT /_matrix/federation/v1/invite/{roomId}/{eventId}](https://matrix.org/docs/spec/server_server/r0.1.4#put-matrix-federation-v1-invite-roomid-eventid) -//! - [PUT /_matrix/federation/v1/send_leave/{roomId}/{eventId}](https://matrix.org/docs/spec/server_server/r0.1.4#put-matrix-federation-v1-send-leave-roomid-eventid) +//! - [PUT /_matrix/federation/v1/send_join/{roomId}/{eventId}](https://spec.matrix.org/v1.2/server-server-api/#put_matrixfederationv1send_joinroomideventid) +//! - [PUT /_matrix/federation/v1/invite/{roomId}/{eventId}](https://spec.matrix.org/v1.2/server-server-api/#put_matrixfederationv1inviteroomideventid) +//! - [PUT /_matrix/federation/v1/send_leave/{roomId}/{eventId}](https://spec.matrix.org/v1.2/server-server-api/#put_matrixfederationv1send_leaveroomideventid) //! //! For more information, see this [GitHub issue][issue]. //! diff --git a/crates/ruma-identifiers-validation/src/error.rs b/crates/ruma-identifiers-validation/src/error.rs index 267938c3..057818a0 100644 --- a/crates/ruma-identifiers-validation/src/error.rs +++ b/crates/ruma-identifiers-validation/src/error.rs @@ -97,7 +97,7 @@ pub enum MxcUriError { /// Media identifier malformed due to invalid characters detected. /// /// Valid characters are (in regex notation) `[A-Za-z0-9_-]+`. - /// See [here](https://matrix.org/docs/spec/client_server/r0.6.1#id408) for more details. + /// See [here](https://spec.matrix.org/v1.2/client-server-api/#security-considerations-5) for more details. #[error("Media Identifier malformed, invalid characters")] MediaIdMalformed, diff --git a/crates/ruma-identifiers-validation/src/mxc_uri.rs b/crates/ruma-identifiers-validation/src/mxc_uri.rs index d3a400c3..dd515e25 100644 --- a/crates/ruma-identifiers-validation/src/mxc_uri.rs +++ b/crates/ruma-identifiers-validation/src/mxc_uri.rs @@ -17,7 +17,7 @@ pub fn validate(uri: &str) -> Result { let server_name = &uri[..index]; let media_id = &uri[index + 1..]; - // See: https://matrix.org/docs/spec/client_server/r0.6.1#id69 + // See: https://spec.matrix.org/v1.2/client-server-api/#security-considerations-5 let media_id_is_valid = media_id.bytes().all(|b| matches!(b, b'0'..=b'9' | b'a'..=b'z' | b'A'..=b'Z' | b'-' )); diff --git a/crates/ruma-identifiers-validation/src/user_id.rs b/crates/ruma-identifiers-validation/src/user_id.rs index 9880a36d..bf2c26fe 100644 --- a/crates/ruma-identifiers-validation/src/user_id.rs +++ b/crates/ruma-identifiers-validation/src/user_id.rs @@ -18,14 +18,14 @@ pub fn validate(s: &str) -> Result<(), Error> { /// due to Synapse allowing them over federation. This will likely be fixed in an upcoming room /// version; see . pub fn localpart_is_fully_conforming(localpart: &str) -> Result { - // See https://matrix.org/docs/spec/appendices#user-identifiers + // See https://spec.matrix.org/v1.2/appendices/#user-identifiers let is_fully_conforming = localpart .bytes() .all(|b| matches!(b, b'0'..=b'9' | b'a'..=b'z' | b'-' | b'.' | b'=' | b'_' | b'/')); // If it's not fully conforming, check if it contains characters that are also disallowed // for historical user IDs. If there are, return an error. - // See https://matrix.org/docs/spec/appendices#historical-user-ids + // See https://spec.matrix.org/v1.2/appendices/#historical-user-ids #[cfg(not(feature = "compat"))] if !is_fully_conforming && localpart.bytes().any(|b| b < 0x21 || b == b':' || b > 0x7E) { Err(Error::InvalidCharacters) diff --git a/crates/ruma-identifiers/src/event_id.rs b/crates/ruma-identifiers/src/event_id.rs index ddc27545..89d6ac85 100644 --- a/crates/ruma-identifiers/src/event_id.rs +++ b/crates/ruma-identifiers/src/event_id.rs @@ -9,7 +9,7 @@ use crate::ServerName; /// /// # Room versions /// -/// Matrix specifies multiple [room versions](https://matrix.org/docs/spec/#room-versions) and the +/// Matrix specifies multiple [room versions](https://spec.matrix.org/v1.2/#room-versions) and the /// format of event identifiers differ between them. The original format used by room versions 1 and /// 2 uses a short pseudorandom "localpart" followed by the hostname and port of the originating /// homeserver. Later room versions change event identifiers to be a hash of the event encoded with diff --git a/crates/ruma-identifiers/src/mxc_uri.rs b/crates/ruma-identifiers/src/mxc_uri.rs index 3c2d1d92..ab51c921 100644 --- a/crates/ruma-identifiers/src/mxc_uri.rs +++ b/crates/ruma-identifiers/src/mxc_uri.rs @@ -1,6 +1,6 @@ //! A URI that should be a Matrix-spec compliant [MXC URI]. //! -//! [MXC URI]: https://matrix.org/docs/spec/client_server/r0.6.1#mxc-uri +//! [MXC URI]: https://spec.matrix.org/v1.2/client-server-api/#matrix-content-mxc-uris use std::num::NonZeroU8; @@ -12,7 +12,7 @@ type Result = std::result::Result; /// A URI that should be a Matrix-spec compliant [MXC URI]. /// -/// [MXC URI]: https://matrix.org/docs/spec/client_server/r0.6.1#mxc-uri +/// [MXC URI]: https://spec.matrix.org/v1.2/client-server-api/#matrix-content-mxc-uris #[repr(transparent)] #[derive(PartialEq, Eq, PartialOrd, Ord, Hash)] diff --git a/crates/ruma-signatures/src/functions.rs b/crates/ruma-signatures/src/functions.rs index 33d881ed..fde18776 100644 --- a/crates/ruma-signatures/src/functions.rs +++ b/crates/ruma-signatures/src/functions.rs @@ -183,7 +183,7 @@ where /// Converts an event into the [canonical] string form. /// -/// [canonical]: https://matrix.org/docs/spec/appendices#canonical-json +/// [canonical]: https://spec.matrix.org/v1.2/appendices/#canonical-json /// /// # Parameters /// diff --git a/crates/ruma-state-res/src/event_auth.rs b/crates/ruma-state-res/src/event_auth.rs index 924b4983..c5efd60f 100644 --- a/crates/ruma-state-res/src/event_auth.rs +++ b/crates/ruma-state-res/src/event_auth.rs @@ -128,7 +128,7 @@ pub fn auth_check( let sender = incoming_event.sender(); - // Implementation of https://matrix.org/docs/spec/rooms/v1#authorization-rules + // Implementation of https://spec.matrix.org/v1.2/rooms/v1/#authorization-rules // // 1. If type is m.room.create: if *incoming_event.event_type() == EventType::RoomCreate { diff --git a/crates/ruma-state-res/src/room_version.rs b/crates/ruma-state-res/src/room_version.rs index 6ef150fa..5df78459 100644 --- a/crates/ruma-state-res/src/room_version.rs +++ b/crates/ruma-state-res/src/room_version.rs @@ -60,7 +60,7 @@ pub struct RoomVersion { pub extra_redaction_checks: bool, /// Allow knocking in event authentication. /// - /// See: for more information. + /// See [room v7 specification](https://spec.matrix.org/v1.2/rooms/v7/) for more information. pub allow_knocking: bool, /// Adds support for the restricted join rule. /// diff --git a/crates/ruma/src/lib.rs b/crates/ruma/src/lib.rs index c6081bf3..9b06dfb6 100644 --- a/crates/ruma/src/lib.rs +++ b/crates/ruma/src/lib.rs @@ -108,7 +108,7 @@ pub use ruma_state_res as state_res; /// (De)serializable types for various [Matrix APIs][apis] requests and responses and abstractions /// for them. /// -/// [apis]: https://matrix.org/docs/spec/#matrix-apis +/// [apis]: https://spec.matrix.org/v1.2/#matrix-apis #[cfg(feature = "api")] pub mod api { pub use ruma_api::*;