From 0f7af7c13a2c71f605ea5c533c53fe2d60f99711 Mon Sep 17 00:00:00 2001 From: Leonora Tindall Date: Wed, 2 Nov 2022 14:39:01 -0500 Subject: [PATCH] Better support for direct shares --- README.md | 1 + src/syndication.rs | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f5b18bc..f37501f 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,7 @@ ports to use for development and deployment. - [ ] Handle redirects - [x] RSS feeds for projects - [x] Index page explaining what's going on +- [x] Better support for transparent shares - [ ] More robust parsing (defaults for all!) - [ ] RSS feeds for tags - [x] Atom Extension pagination support diff --git a/src/syndication.rs b/src/syndication.rs index 567c151..daa2558 100644 --- a/src/syndication.rs +++ b/src/syndication.rs @@ -72,7 +72,9 @@ pub fn channel_for_posts_page( let mut body_text = String::new(); - if item.share_tree.len() == 1 { + if let Some(shared_post_id) = item.transparent_share_of_post_id { + body_text.push_str(&format!("(share of post {} without any commentary)\n\n---\n\n", shared_post_id)); + } else if item.share_tree.len() == 1 { body_text.push_str("(in reply to another post)\n\n---\n\n") } else if item.share_tree.len() > 1 { body_text.push_str(&format!(