mirror of
https://github.com/friendica/friendica
synced 2025-04-26 22:30:18 +00:00
Create ActivityPub\FetchQueue and ActivityPub\FetchQueueItem classes
- These classes are used to flatten the recursive missing activity fetch that can hit PHP's maximum function nesting limit - The original caller is responsible for processing the remaining queue once the original activity has been fetched
This commit is contained in:
parent
3c70d592f6
commit
da32fa8fa6
7 changed files with 189 additions and 42 deletions
|
@ -25,6 +25,7 @@ use Friendica\Core\Logger;
|
|||
use Friendica\Core\Protocol;
|
||||
use Friendica\Model\APContact;
|
||||
use Friendica\Model\User;
|
||||
use Friendica\Protocol\ActivityPub\FetchQueue;
|
||||
use Friendica\Util\HTTPSignature;
|
||||
use Friendica\Util\JsonLD;
|
||||
|
||||
|
@ -223,10 +224,14 @@ class ActivityPub
|
|||
$items = [];
|
||||
}
|
||||
|
||||
$fetchQueue = new FetchQueue();
|
||||
|
||||
foreach ($items as $activity) {
|
||||
$ldactivity = JsonLD::compact($activity);
|
||||
ActivityPub\Receiver::processActivity($ldactivity, '', $uid, true);
|
||||
ActivityPub\Receiver::processActivity($fetchQueue, $ldactivity, '', $uid, true);
|
||||
}
|
||||
|
||||
$fetchQueue->process();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue