Compare commits

..

No commits in common. "e508b1197f3a6e485f35edf0d3c529cb58c391b5" and "6e16a6ef8f90ee4a1b2a92435475ddf7359ba837" have entirely different histories.

3 changed files with 15 additions and 29 deletions

View file

@ -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.
Continuwuity does not have any Arch Linux packages at this time.

View file

@ -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<String>, 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<String>, 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<OwnedEventId>,
) -> 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?;

View file

@ -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<OwnedEventId>,
},
/// - Runs a server name through conduwuit's true destination resolution