mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-05-26 20:49:55 +00:00
wip: Room data purging
This commit is contained in:
@@ -118,8 +118,9 @@ pub(crate) async fn get_content_thumbnail_route(
|
||||
} = match fetch_thumbnail_meta(&services, &mxc, user, body.timeout_ms, &dim).await {
|
||||
| Ok(meta) => meta,
|
||||
| Err(conduwuit::Error::Io(e)) => match e.kind() {
|
||||
| std::io::ErrorKind::NotFound =>
|
||||
return Err!(Request(NotFound("Thumbnail not found."))),
|
||||
| std::io::ErrorKind::NotFound => {
|
||||
return Err!(Request(NotFound("Thumbnail not found.")));
|
||||
},
|
||||
| std::io::ErrorKind::PermissionDenied => {
|
||||
error!("Permission denied when trying to read file: {e:?}");
|
||||
return Err!(Request(Unknown("Unknown error when fetching thumbnail.")));
|
||||
|
||||
@@ -375,7 +375,7 @@ async fn allowed_to_send_state_event(
|
||||
},
|
||||
}
|
||||
},
|
||||
| StateEventType::RoomMember =>
|
||||
| StateEventType::RoomMember => {
|
||||
match json.deserialize_as_unchecked::<RoomMemberEventContent>() {
|
||||
| Ok(mut membership_content) => {
|
||||
let Ok(state_key) = UserId::parse(state_key) else {
|
||||
@@ -434,7 +434,8 @@ async fn allowed_to_send_state_event(
|
||||
membership state: {e}"
|
||||
)));
|
||||
},
|
||||
},
|
||||
}
|
||||
},
|
||||
| _ => (),
|
||||
}
|
||||
|
||||
|
||||
@@ -19,10 +19,11 @@ pub(crate) async fn well_known_client(
|
||||
) -> Result<discover_homeserver::Response> {
|
||||
let client_url = match services.config.well_known.client.as_ref() {
|
||||
| Some(url) => url.to_string(),
|
||||
| None =>
|
||||
| None => {
|
||||
return Err!(Request(NotFound(
|
||||
"This server is not configured to serve well-known client information."
|
||||
))),
|
||||
)));
|
||||
},
|
||||
};
|
||||
|
||||
Ok(assign!(discover_homeserver::Response::new(HomeserverInfo::new(client_url)), {
|
||||
|
||||
Reference in New Issue
Block a user