diff --git a/docs/deploying/arch-linux.md b/docs/deploying/arch-linux.md index 52d2afb2..a14201e3 100644 --- a/docs/deploying/arch-linux.md +++ b/docs/deploying/arch-linux.md @@ -1,5 +1,3 @@ # Continuwuity for Arch Linux -Continuwuity is available on the `archlinuxcn` repository and AUR, with the same package name `continuwuity`, which includes latest taggged version. The development version is available on AUR as `continuwuity-git` - -Simply install the `continuwuity` package. Configure the service in `/etc/conduwuit/conduwuit.toml`, then enable/start the continuwuity.service. \ No newline at end of file +Continuwuity does not have any Arch Linux packages at this time. diff --git a/src/admin/debug/commands.rs b/src/admin/debug/commands.rs index a397e0fc..d0debc2a 100644 --- a/src/admin/debug/commands.rs +++ b/src/admin/debug/commands.rs @@ -239,11 +239,10 @@ pub(super) async fn get_remote_pdu( }) .await { - | Err(e) => { + | Err(e) => return Err!( "Remote server did not have PDU or failed sending request to remote server: {e}" - ); - }, + ), | Ok(response) => { let json: CanonicalJsonObject = serde_json::from_str(response.pdu.get()).map_err(|e| { @@ -385,9 +384,8 @@ pub(super) async fn change_log_level(&self, filter: Option, reset: bool) .reload .reload(&old_filter_layer, Some(handles)) { - | Err(e) => { - return Err!("Failed to modify and reload the global tracing log level: {e}"); - }, + | Err(e) => + return Err!("Failed to modify and reload the global tracing log level: {e}"), | Ok(()) => { let value = &self.services.server.config.log; let out = format!("Successfully changed log level back to config value {value}"); @@ -410,9 +408,8 @@ pub(super) async fn change_log_level(&self, filter: Option, reset: bool) .reload(&new_filter_layer, Some(handles)) { | Ok(()) => return self.write_str("Successfully changed log level").await, - | Err(e) => { - return Err!("Failed to modify and reload the global tracing log level: {e}"); - }, + | Err(e) => + return Err!("Failed to modify and reload the global tracing log level: {e}"), } } @@ -532,7 +529,6 @@ pub(super) async fn force_set_room_state_from_server( &self, room_id: OwnedRoomId, server_name: OwnedServerName, - at_event: Option, ) -> Result { if !self .services @@ -544,18 +540,13 @@ pub(super) async fn force_set_room_state_from_server( return Err!("We are not participating in the room / we don't know about the room ID."); } - let at_event_id = match at_event { - | Some(event_id) => event_id, - | None => self - .services - .rooms - .timeline - .latest_pdu_in_room(&room_id) - .await - .map_err(|_| err!(Database("Failed to find the latest PDU in database")))? - .event_id - .clone(), - }; + let first_pdu = self + .services + .rooms + .timeline + .latest_pdu_in_room(&room_id) + .await + .map_err(|_| err!(Database("Failed to find the latest PDU in database")))?; let room_version = self.services.rooms.state.get_room_version(&room_id).await?; @@ -566,7 +557,7 @@ pub(super) async fn force_set_room_state_from_server( .sending .send_federation_request(&server_name, get_room_state::v1::Request { room_id: room_id.clone(), - event_id: at_event_id, + event_id: first_pdu.event_id.clone(), }) .await?; diff --git a/src/admin/debug/mod.rs b/src/admin/debug/mod.rs index bceee9ba..1fd4e263 100644 --- a/src/admin/debug/mod.rs +++ b/src/admin/debug/mod.rs @@ -177,9 +177,6 @@ pub(super) enum DebugCommand { room_id: OwnedRoomId, /// The server we will use to query the room state for server_name: OwnedServerName, - /// The event ID of the latest known PDU in the room. Will be found - /// automatically if not provided. - event_id: Option, }, /// - Runs a server name through conduwuit's true destination resolution