X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FProtocol%2FActivityPub%2FProcessor.php;h=2025aba04ef83366aeae16b8f0c7ea7f530d25cf;hb=206bda861ea17143338d8d2a2ffcf8583c4bec13;hp=d012498ab2a5f777afa6c8024705f984ca7f281a;hpb=78343599571fb42eb75ef63af13909fa34e50998;p=friendica.git diff --git a/src/Protocol/ActivityPub/Processor.php b/src/Protocol/ActivityPub/Processor.php index d012498ab2..2025aba04e 100644 --- a/src/Protocol/ActivityPub/Processor.php +++ b/src/Protocol/ActivityPub/Processor.php @@ -361,8 +361,6 @@ class Processor if (!empty($activity['raw'])) { $item['source'] = $activity['raw']; $item['protocol'] = Conversation::PARCEL_ACTIVITYPUB; - $item['conversation-href'] = $activity['context'] ?? ''; - $item['conversation-uri'] = $activity['conversation'] ?? ''; if (isset($activity['push'])) { $item['direction'] = $activity['push'] ? Conversation::PUSH : Conversation::PULL; @@ -475,7 +473,19 @@ class Processor } // @todo To ensure that the remote system is working correctly, we can check if the "Content-Type" contains JSON - return in_array($curlResult->getReturnCode(), [404]); + if (in_array($curlResult->getReturnCode(), [404])) { + return true; + } + + $object = json_decode($curlResult->getBody(), true); + if (!empty($object)) { + $activity = JsonLD::compact($object); + if (JsonLD::fetchElement($activity, '@type') == 'as:Tombstone') { + return true; + } + } + + return false; } /** * Delete items @@ -970,7 +980,10 @@ class Processor if ($success) { Queue::remove($activity); - Queue::processReplyByUri($item['uri']); + + if (Queue::hasChildren($item['uri'])) { + Worker::add(PRIORITY_HIGH, 'ProcessReplyByUri', $item['uri']); + } } // Store send a follow request for every reshare - but only when the item had been stored