From 69c7a69afd04e8dbf9eafb250a110fd5c329242a Mon Sep 17 00:00:00 2001 From: freedit-dev Date: Sat, 21 Sep 2024 12:05:32 +0800 Subject: [PATCH] =?UTF-8?q?add=20description=20for=20rss=20item=20(just=20?= =?UTF-8?q?like=20https://news.ycombinator.com/=E2=80=A6=20(#220)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix #201 --- src/subreddit.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/subreddit.rs b/src/subreddit.rs index 5d05f96..8a9270e 100644 --- a/src/subreddit.rs +++ b/src/subreddit.rs @@ -494,6 +494,11 @@ pub async fn rss(req: Request) -> Result, String> { link: Some(utils::get_post_url(&post)), author: Some(post.author.name), content: Some(rewrite_urls(&post.body)), + description: Some(format!( + "Comments", + config::get_setting("REDLIB_FULL_URL").unwrap_or_default(), + post.permalink + )), ..Default::default() }) .collect::>(),