From: Simon Lundström Date: Mon, 26 Jun 2023 13:11:16 +0000 (+0200) Subject: Item URL should point to post URL (#3345) X-Git-Url: http://these/git/%22https:/nerdica.net/photo/contact/80/%24%7Bargs.pageFn.jump%20n%7D?a=commitdiff_plain;h=c9e9ff46faa40e2642343effb117693bfa525c5f;p=lemmy.git Item URL should point to post URL (#3345) If the post is an URL post the item link should point to the URL of the link that is being posted. --- diff --git a/crates/routes/src/feeds.rs b/crates/routes/src/feeds.rs index 3b4c2cd7..2d894c68 100644 --- a/crates/routes/src/feeds.rs +++ b/crates/routes/src/feeds.rs @@ -475,7 +475,6 @@ fn create_post_items( i.pub_date(dt.to_rfc2822()); let post_url = format!("{}/post/{}", protocol_and_hostname, p.post.id); - i.link(post_url.clone()); i.comments(post_url.clone()); let guid = GuidBuilder::default() .permalink(true) @@ -499,6 +498,9 @@ fn create_post_items( if let Some(url) = p.post.url { let link_html = format!("
{url}"); description.push_str(&link_html); + i.link(url.to_string()); + } else { + i.link(post_url.clone()); } if let Some(body) = p.post.body {