From 4997be5a72f92c30815a5804765c7359484d5a6c Mon Sep 17 00:00:00 2001 From: alemi Date: Mon, 22 Apr 2024 01:44:00 +0200 Subject: [PATCH] fix(web): thread view shows all types of objects --- web/src/components/timeline.rs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/web/src/components/timeline.rs b/web/src/components/timeline.rs index 9f3411e8..e2266a91 100644 --- a/web/src/components/timeline.rs +++ b/web/src/components/timeline.rs @@ -50,18 +50,24 @@ pub fn TimelineRepliesRecursive(tl: Timeline, root: String) -> impl IntoView { .get() .into_iter() .filter_map(|x| CACHE.get(&x)) - .filter(|x| x.object().get().map(|o| o.in_reply_to().id().map(|r| r == root).unwrap_or(false)).unwrap_or(false)) + .filter(|x| match x.object_type() { + Some(apb::ObjectType::Activity(_)) => x.object().get().map(|o| o.in_reply_to().id().map(|r| r == root).unwrap_or(false)) + .unwrap_or_else(|| x.object().id().map(|i| i == root).unwrap_or(false)), + _ => x.in_reply_to().id().map(|r| r == root).unwrap_or(false), + }) .collect::>(); view! { - +
+ +
} } / >