From d71510595d0a76e637b9824ba7b0dee4b67b8268 Mon Sep 17 00:00:00 2001 From: alemi Date: Wed, 24 Apr 2024 04:50:17 +0200 Subject: [PATCH] fix(web): don't embed all activities only create and announce, also show actor for follows --- web/src/components/timeline.rs | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/web/src/components/timeline.rs b/web/src/components/timeline.rs index 20161430..19a91540 100644 --- a/web/src/components/timeline.rs +++ b/web/src/components/timeline.rs @@ -145,11 +145,19 @@ pub fn TimelineFeed(tl: Timeline) -> impl IntoView {
}.into_view(), // everything else - Some(apb::ObjectType::Activity(_)) => { + Some(apb::ObjectType::Activity(t)) => { let object_id = item.object().id().unwrap_or_default(); - let object = CACHE.get(&object_id).map(|obj| { - view! { } - }); + let object = match t { + apb::ActivityType::Create | apb::ActivityType::Announce => + CACHE.get(&object_id).map(|obj| { + view! { } + }.into_view()), + apb::ActivityType::Follow => + CACHE.get(&object_id).map(|obj| { + view! {
} + }.into_view()), + _ => None, + }; view! { {object}