mirror of
https://github.com/LemmyNet/lemmy
synced 2024-10-30 15:21:20 +00:00
Keep cargo_fmt happy
This commit is contained in:
parent
5e5b5dd8cf
commit
2cebde009d
@ -103,13 +103,14 @@ pub fn generate_post_link_metadata(
|
|||||||
else if federated_thumbnail.is_some() {
|
else if federated_thumbnail.is_some() {
|
||||||
federated_thumbnail
|
federated_thumbnail
|
||||||
}
|
}
|
||||||
// Generate local thumbnail if allowed
|
// Generate local thumbnail from metadata if allowed
|
||||||
else if allow_generate_thumbnail && !is_image_post {
|
else if allow_generate_thumbnail && !is_image_post {
|
||||||
match metadata.opengraph_data.image {
|
match 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,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Generate local thumbnail from post url if allowed
|
||||||
else if allow_generate_thumbnail && is_image_post {
|
else if allow_generate_thumbnail && is_image_post {
|
||||||
match post.url {
|
match post.url {
|
||||||
Some(url) => generate_pictrs_thumbnail(&url, &context).await.ok(),
|
Some(url) => generate_pictrs_thumbnail(&url, &context).await.ok(),
|
||||||
|
Loading…
Reference in New Issue
Block a user