diff --git a/upub/core/src/traits/fetch.rs b/upub/core/src/traits/fetch.rs index 38b69e1..e468994 100644 --- a/upub/core/src/traits/fetch.rs +++ b/upub/core/src/traits/fetch.rs @@ -477,8 +477,15 @@ impl Fetcher for crate::Context { // TODO parallelize these - for item in outbox.ordered_items().all_ids() { - self.fetch_activity(&item, tx).await?; + // TODO we're getting inner objects because + // 1) fetching activities makes it look like we're following this actor: is this desirable? + // 2) fetching activities doesn't properly merge addressing, so we get orphan objects twice + for node in outbox.ordered_items().flat() { + if let Ok(activity) = node.into_inner() { + if let Ok(oid) = activity.object().id() { + self.fetch_object(&oid, tx).await?; + } + } } Ok(())