diff --git a/src/admin/debug/mod.rs b/src/admin/debug/mod.rs index afcc49b00bb2f52947972296037bc91666dac761..b993872bc26b99714f0d5be3417047e0e24ab9ed 100644 --- a/src/admin/debug/mod.rs +++ b/src/admin/debug/mod.rs @@ -35,8 +35,8 @@ pub(crate) enum DebugCommand { }, /// - Attempts to retrieve a PDU from a remote server. Inserts it into our - /// database/timeline if found and we do not have this PDU already - /// (following normal event auth rules, handles it as an incoming PDU). + /// database/timeline if found and we do not have this PDU already + /// (following normal event auth rules, handles it as an incoming PDU). GetRemotePdu { /// An event ID (a $ followed by the base64 reference hash) event_id: Box<EventId>, @@ -47,8 +47,7 @@ pub(crate) enum DebugCommand { }, /// - Same as `get-remote-pdu` but accepts a codeblock newline delimited - /// list - /// of PDUs and a single server to fetch from + /// list of PDUs and a single server to fetch from GetRemotePduList { /// Argument for us to attempt to fetch all the events from the /// specified remote server. diff --git a/src/api/client/context.rs b/src/api/client/context.rs index a137bf8dc4965fda7c381112842ef2966ab302c5..2ca161c91cfd8fe5700dcda0ebd2395bdd925f69 100644 --- a/src/api/client/context.rs +++ b/src/api/client/context.rs @@ -13,8 +13,7 @@ /// Allows loading room history around an event. /// /// - Only works if the user is joined (TODO: always allow, but only show events -/// if the user was -/// joined, depending on history_visibility) +/// if the user was joined, depending on history_visibility) pub(crate) async fn get_context_route(body: Ruma<get_context::v3::Request>) -> Result<get_context::v3::Response> { let sender_user = body.sender_user.as_ref().expect("user is authenticated"); let sender_device = body.sender_device.as_ref().expect("user is authenticated"); diff --git a/src/api/client/message.rs b/src/api/client/message.rs index a57defb2b374b68bd4113363c112c14eacede070..9548f0844e6ea2196e9b4ca641cb534543690011 100644 --- a/src/api/client/message.rs +++ b/src/api/client/message.rs @@ -107,8 +107,7 @@ pub(crate) async fn send_message_event_route( /// Allows paginating through room history. /// /// - Only works if the user is joined (TODO: always allow, but only show events -/// where the user was -/// joined, depending on `history_visibility`) +/// where the user was joined, depending on `history_visibility`) pub(crate) async fn get_message_events_route( body: Ruma<get_message_events::v3::Request>, ) -> Result<get_message_events::v3::Response> { diff --git a/src/api/client/profile.rs b/src/api/client/profile.rs index b71280f16e1afcd005fdabbb4affcdcee960de14..2b23344ee7ef34d574e1b59c18000f288dfb9a47 100644 --- a/src/api/client/profile.rs +++ b/src/api/client/profile.rs @@ -50,8 +50,8 @@ pub(crate) async fn set_displayname_route( /// /// Returns the displayname of the user. /// -/// - If user is on another server and we do not have a local copy already -/// fetch displayname over federation +/// - If user is on another server and we do not have a local copy already fetch +/// displayname over federation pub(crate) async fn get_displayname_route( body: Ruma<get_display_name::v3::Request>, ) -> Result<get_display_name::v3::Response> { @@ -140,8 +140,8 @@ pub(crate) async fn set_avatar_url_route( /// /// Returns the `avatar_url` and `blurhash` of the user. /// -/// - If user is on another server and we do not have a local copy already -/// fetch `avatar_url` and blurhash over federation +/// - If user is on another server and we do not have a local copy already fetch +/// `avatar_url` and blurhash over federation pub(crate) async fn get_avatar_url_route( body: Ruma<get_avatar_url::v3::Request>, ) -> Result<get_avatar_url::v3::Response> { @@ -199,7 +199,7 @@ pub(crate) async fn get_avatar_url_route( /// Returns the displayname, avatar_url and blurhash of the user. /// /// - If user is on another server and we do not have a local copy already, -/// fetch profile over federation. +/// fetch profile over federation. pub(crate) async fn get_profile_route(body: Ruma<get_profile::v3::Request>) -> Result<get_profile::v3::Response> { if !user_is_local(&body.user_id) { // Create and update our local copy of the user diff --git a/src/api/client/sync.rs b/src/api/client/sync.rs index 84cf11b6aaf0fe777b29337a3225201630c67b7e..9e9a9ffd30a881d5de9d528b68fe93620cc511af 100644 --- a/src/api/client/sync.rs +++ b/src/api/client/sync.rs @@ -36,8 +36,7 @@ /// Synchronize the client's state with the latest state on the server. /// /// - This endpoint takes a `since` parameter which should be the `next_batch` -/// value from a -/// previous request for incremental syncs. +/// value from a previous request for incremental syncs. /// /// Calling this endpoint without a `since` parameter returns: /// - Some of the most recent events of each timeline @@ -49,11 +48,9 @@ /// returns: For joined rooms: /// - Some of the most recent events of each timeline that happened after since /// - If user joined the room after since: All state events (unless lazy loading -/// is activated) and -/// all device list updates in that room +/// is activated) and all device list updates in that room /// - If the user was already in the room: A list of all events that are in the -/// state now, but were -/// not in the state at `since` +/// state now, but were not in the state at `since` /// - If the state we send contains a member event: Joined and invited member /// counts, heroes /// - Device list updates that happened after `since` diff --git a/src/api/client/user_directory.rs b/src/api/client/user_directory.rs index 4d9947f8fc7023fbe33495b3b99965886bfc6331..ca5f834a93fbb7d5025d44d78c598d6726504ed3 100644 --- a/src/api/client/user_directory.rs +++ b/src/api/client/user_directory.rs @@ -13,8 +13,7 @@ /// Searches all known users for a match. /// /// - Hides any local users that aren't in any public rooms (i.e. those that -/// have the join rule set to public) -/// and don't share a room with the sender +/// have the join rule set to public) and don't share a room with the sender pub(crate) async fn search_users_route(body: Ruma<search_users::v3::Request>) -> Result<search_users::v3::Response> { let sender_user = body.sender_user.as_ref().expect("user is authenticated"); let limit = usize::try_from(body.limit).unwrap_or(10); // default limit is 10 diff --git a/src/api/server/key.rs b/src/api/server/key.rs index ddc8e8ef008621802d803faadafcf9df7fe255b4..27d8663974dde463695e58c554359e9c546a3897 100644 --- a/src/api/server/key.rs +++ b/src/api/server/key.rs @@ -20,8 +20,7 @@ /// Gets the public signing keys of this server. /// /// - Matrix does not support invalidating public keys, so the key returned by -/// this will be valid -/// forever. +/// this will be valid forever. // Response type for this endpoint is Json because we need to calculate a // signature for the response pub(crate) async fn get_server_keys_route() -> Result<impl IntoResponse> { @@ -71,6 +70,5 @@ pub(crate) async fn get_server_keys_route() -> Result<impl IntoResponse> { /// Gets the public signing keys of this server. /// /// - Matrix does not support invalidating public keys, so the key returned by -/// this will be valid -/// forever. +/// this will be valid forever. pub(crate) async fn get_server_keys_deprecated_route() -> impl IntoResponse { get_server_keys_route().await }