Fetch featured posts through a worker

This commit is contained in:
Michael 2022-05-15 09:08:35 +00:00
parent 036b565a78
commit 30b9af10ac
2 changed files with 43 additions and 1 deletions

View file

@ -2316,7 +2316,10 @@ class Contact
if ($uid == 0) {
if ($ret['network'] == Protocol::ACTIVITYPUB) {
ActivityPub\Processor::fetchFeaturedPosts($ret['url']);
$apcontact = APContact::getByURL($ret['url'], false);
if (!empty($apcontact['featured'])) {
Worker::add(PRIORITY_LOW, 'FetchFeaturedPosts', $ret['url']);
}
}
$ret['last-item'] = Probe::getLastUpdate($ret);