1
0
Fork 0
forked from alemi/upub

fix(web): prefetch also users from attributed_to

This commit is contained in:
əlemi 2024-04-23 17:35:03 +02:00
parent 597dee934d
commit 1741837bd0
Signed by: alemi
GPG key ID: A4895B84D311642C

View file

@ -211,6 +211,13 @@ async fn process_activities(
activity.clone().set_object(apb::Node::maybe_link(object_id))
);
}
if let Some(uid) = activity.attributed_to().id() {
if CACHE.get(&uid).is_none() && !gonna_fetch.contains(&uid) {
gonna_fetch.insert(uid.clone());
sub_tasks.push(Box::pin(fetch_and_update(FetchKind::User, uid, auth)));
}
}
if let Some(uid) = activity.actor().id() {
if CACHE.get(&uid).is_none() && !gonna_fetch.contains(&uid) {