Fix remote image urls

pull/4871/head
sunaurus 2024-06-27 07:51:10 +03:00
parent 9120207314
commit d28c44112d
No known key found for this signature in database
1 changed files with 2 additions and 4 deletions

View File

@ -959,9 +959,7 @@ pub async fn process_markdown(
// Insert image details for the remote image
let details_res = fetch_pictrs_proxied_image_details(&link, context).await;
if let Ok(details) = details_res {
let proxied =
build_proxied_image_url(&link, &context.settings().get_protocol_and_hostname())?;
let details_form = details.build_image_details_form(&proxied);
let details_form = details.build_image_details_form(&link);
RemoteImage::create(&mut context.pool(), &details_form).await?;
}
}
@ -1003,7 +1001,7 @@ async fn proxy_image_link_internal(
let details_res = fetch_pictrs_proxied_image_details(&link, context).await;
if let Ok(details) = details_res {
let details_form = details.build_image_details_form(&proxied);
let details_form = details.build_image_details_form(&link);
RemoteImage::create(&mut context.pool(), &details_form).await?;
};