chain_width to 50

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk
2025-04-22 04:42:26 +00:00
parent 9b658d86b2
commit 76509830e6
190 changed files with 3469 additions and 930 deletions

View File

@@ -87,11 +87,14 @@ async fn fetch_thumbnail_authenticated(
timeout_ms,
};
let Response { content, .. } = self.federation_request(mxc, user, server, request).await?;
let Response { content, .. } = self
.federation_request(mxc, user, server, request)
.await?;
match content {
| FileOrLocation::File(content) =>
self.handle_thumbnail_file(mxc, user, dim, content).await,
self.handle_thumbnail_file(mxc, user, dim, content)
.await,
| FileOrLocation::Location(location) => self.handle_location(mxc, user, &location).await,
}
}
@@ -111,7 +114,9 @@ async fn fetch_content_authenticated(
timeout_ms,
};
let Response { content, .. } = self.federation_request(mxc, user, server, request).await?;
let Response { content, .. } = self
.federation_request(mxc, user, server, request)
.await?;
match content {
| FileOrLocation::File(content) => self.handle_content_file(mxc, user, content).await,
@@ -145,11 +150,14 @@ async fn fetch_thumbnail_unauthenticated(
let Response {
file, content_type, content_disposition, ..
} = self.federation_request(mxc, user, server, request).await?;
} = self
.federation_request(mxc, user, server, request)
.await?;
let content = Content { file, content_type, content_disposition };
self.handle_thumbnail_file(mxc, user, dim, content).await
self.handle_thumbnail_file(mxc, user, dim, content)
.await
}
#[allow(deprecated)]
@@ -173,7 +181,9 @@ async fn fetch_content_unauthenticated(
let Response {
file, content_type, content_disposition, ..
} = self.federation_request(mxc, user, server, request).await?;
} = self
.federation_request(mxc, user, server, request)
.await?;
let content = Content { file, content_type, content_disposition };
@@ -245,11 +255,13 @@ async fn handle_location(
user: Option<&UserId>,
location: &str,
) -> Result<FileMeta> {
self.location_request(location).await.map_err(|error| {
err!(Request(NotFound(
debug_warn!(%mxc, ?user, ?location, ?error, "Fetching media from location failed")
)))
})
self.location_request(location)
.await
.map_err(|error| {
err!(Request(NotFound(
debug_warn!(%mxc, ?user, ?location, ?error, "Fetching media from location failed")
)))
})
}
#[implement(super::Service)]