diff --git a/crates/api_common/src/request.rs b/crates/api_common/src/request.rs index 8430031cc..abf99f670 100644 --- a/crates/api_common/src/request.rs +++ b/crates/api_common/src/request.rs @@ -103,9 +103,13 @@ pub fn generate_post_link_metadata( else if federated_thumbnail.is_some() { federated_thumbnail } - // Generate a local thumbnail if allowed + // Generate local thumbnail if allowed else if allow_generate_thumbnail { - match post.url.filter(|_| is_image_post).or(metadata.opengraph_data.image) { + match post + .url + .filter(|_| is_image_post) + .or(metadata.opengraph_data.image) + { Some(url) => generate_pictrs_thumbnail(&url, &context).await.ok(), None => None, }