fix: when crawling outbox, fetch objects
its weird because we get activities in outbox, however pulling activities makes a mess because we may get objects again and have them appear twice, uggg... this way we may effectively not fetch anything (if remote actor liked a ton of stuff, we only get their likes, and the related object is not from them!) but ehhh will do for now
This commit is contained in:
parent
340b598612
commit
bee382e1e3
1 changed files with 9 additions and 2 deletions
|
@ -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(())
|
||||
|
|
Loading…
Reference in a new issue