conduit "library" delete, resolve some warnings from that

Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
strawberry 2024-04-22 22:36:11 -04:00 committed by June
parent 5e8ae971f1
commit 472c32f453
10 changed files with 344 additions and 96 deletions

View file

@ -61,7 +61,7 @@ impl PduEvent {
let mut content = serde_json::from_str(self.content.get())
.map_err(|_| Error::bad_database("PDU in db has invalid content."))?;
redact_content_in_place(&mut content, &room_version_id, self.kind.to_string())
.map_err(|e| Error::RedactionError(self.sender.server_name().to_owned(), e))?;
.map_err(|e| Error::Redaction(self.sender.server_name().to_owned(), e))?;
self.unsigned = Some(
to_raw_value(&json!({

View file

@ -116,7 +116,7 @@ where
debug!("Got {status:?} for {method} {url}");
if !status.is_success() {
return Err(Error::FederationError(
return Err(Error::Federation(
destination.to_owned(),
RumaError::from_http_response(http_response),
));
@ -423,7 +423,7 @@ fn handle_resolve_error(e: &ResolveError) -> Result<()> {
},
_ => {
error!("{e}");
Err(Error::Error(e.to_string()))
Err(Error::Err(e.to_string()))
},
}
}