mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-06-08 08:29:22 +00:00
Keep cargo_fmt happy
This commit is contained in:
parent
cccb8b9c33
commit
f92fde1189
|
@ -103,9 +103,13 @@ pub fn generate_post_link_metadata(
|
||||||
else if federated_thumbnail.is_some() {
|
else if federated_thumbnail.is_some() {
|
||||||
federated_thumbnail
|
federated_thumbnail
|
||||||
}
|
}
|
||||||
// Generate a local thumbnail if allowed
|
// Generate local thumbnail if allowed
|
||||||
else if allow_generate_thumbnail {
|
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(),
|
Some(url) => generate_pictrs_thumbnail(&url, &context).await.ok(),
|
||||||
None => None,
|
None => None,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue