Skip to content

Commit

Permalink
rss: proxy links in users and subreddit feeds, fixes #359 (#361)
Browse files Browse the repository at this point in the history
  • Loading branch information
martinlindhe authored Feb 3, 2025
1 parent fd1c32f commit cb659cc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/subreddit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,7 @@ pub async fn rss(req: Request<Body>) -> Result<Response<Body>, String> {
.into_iter()
.map(|post| Item {
title: Some(post.title.to_string()),
link: Some(utils::get_post_url(&post)),
link: Some(format_url(&utils::get_post_url(&post))),
author: Some(post.author.name),
content: Some(rewrite_urls(&post.body)),
pub_date: Some(DateTime::from_timestamp(post.created_ts as i64, 0).unwrap_or_default().to_rfc2822()),
Expand Down
2 changes: 1 addition & 1 deletion src/user.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ pub async fn rss(req: Request<Body>) -> Result<Response<Body>, String> {
.into_iter()
.map(|post| Item {
title: Some(post.title.to_string()),
link: Some(utils::get_post_url(&post)),
link: Some(format_url(&utils::get_post_url(&post))),
author: Some(post.author.name),
pub_date: Some(DateTime::from_timestamp(post.created_ts as i64, 0).unwrap_or_default().to_rfc2822()),
content: Some(rewrite_urls(&post.body)),
Expand Down

0 comments on commit cb659cc

Please sign in to comment.