New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Item URL should point to post URL #3345
Conversation
I found #1378 after I submitted this PR but I agree with @Nirose that we should follow the RSS standard:
See also https://www.rssboard.org/rss-weblog-comments-use-case and https://validator.w3.org/feed/docs/rss2.html#hrelementsOfLtitemgt |
The build seems to have been stopped due to a timeout https://woodpecker.join-lemmy.org/repos/129/pipeline/372/13 |
@@ -499,6 +499,7 @@ fn create_post_items( | |||
if let Some(url) = p.post.url { | |||
let link_html = format!("<br><a href=\"{url}\">{url}</a>"); | |||
description.push_str(&link_html); | |||
i.link(url.to_string()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This field is already being set above in line 478. So you would have to remove that (which would be a breaking change).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure what you mean. I was under the impression that the link attribute in the item was overwritten? Is this not the case?
I'm sorry for not knowing the proper nomenclature but if the lemmy post is a "self post" like https://lemmy.world/post/579472 the item link should go to the same URL as the item comments attribute.
If the lemmy post links to an URL like https://lemmy.world/post/610949 the item link should go to the URL linked in the lemmy post.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah that makes sense. Then I would move the i.link(post_url.clone());
into an else branch to make this explicit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Like that?
If the post is an URL post the item link should point to the URL of the link that is being posted.
037072a
to
161f606
Compare
If the post is an URL post the item link should point to the URL of the link that is being posted.
See https://www.rssboard.org/rss-specification#hrelementsOfLtitemgt