diff --git a/web/src/components/object.rs b/web/src/components/object.rs index c46b5a65..63c6ddfd 100644 --- a/web/src/components/object.rs +++ b/web/src/components/object.rs @@ -13,7 +13,7 @@ pub fn Object(object: serde_json::Value) -> impl IntoView { let author = CACHE.get_or(&author_id, serde_json::Value::String(author_id.clone())); let attachments = object.attachment() .map(|x| view! { -

+

}) .collect_view(); view! { diff --git a/web/src/components/timeline.rs b/web/src/components/timeline.rs index e2266a91..6f8e9bff 100644 --- a/web/src/components/timeline.rs +++ b/web/src/components/timeline.rs @@ -51,8 +51,8 @@ pub fn TimelineRepliesRecursive(tl: Timeline, root: String) -> impl IntoView { .into_iter() .filter_map(|x| CACHE.get(&x)) .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)), + Some(apb::ObjectType::Activity(apb::ActivityType::Create)) => x.object().get().map(|o| o.in_reply_to().id().map(|r| r == root).unwrap_or(false)).unwrap_or(false), + Some(apb::ObjectType::Activity(_)) => x.object().id().map(|o| o == root).unwrap_or(false), _ => x.in_reply_to().id().map(|r| r == root).unwrap_or(false), }) .collect::>(); @@ -62,12 +62,19 @@ pub fn TimelineRepliesRecursive(tl: Timeline, root: String) -> impl IntoView { each=root_values key=|k| k.id().unwrap_or_default().to_string() children=move |object: serde_json::Value| { - let oid = object.id().unwrap_or_default().to_string(); - view! { - -
- -
+ match object.object_type() { + Some(apb::ObjectType::Activity(_)) => view! { + + }.into_view(), + _ => { + let oid = object.id().unwrap_or_default().to_string(); + view! { + +
+ +
+ }.into_view() + }, } } / >