]> git.mxchange.org Git - friendica.git/blobdiff - src/Worker/Delivery.php
Relay code reworked to support AP delivery
[friendica.git] / src / Worker / Delivery.php
index 9027598c4eaff281684636d99e227149d26ca37d..44041957fc428472e56a1df7366e8a566f25fd36 100644 (file)
@@ -34,6 +34,7 @@ use Friendica\Util\Strings;
 use Friendica\Util\Network;
 use Friendica\Core\Worker;
 use Friendica\Model\FContact;
+use Friendica\Protocol\Relay;
 
 class Delivery
 {
@@ -83,6 +84,10 @@ class Delivery
                        $itemdata = Model\Item::select([], $condition, $params);
 
                        while ($item = Model\Item::fetch($itemdata)) {
+                               if ($item['verb'] == Activity::ANNOUNCE) {
+                                       continue;
+                               }
+       
                                if ($item['id'] == $parent_id) {
                                        $parent = $item;
                                }
@@ -480,7 +485,7 @@ class Delivery
 
                        // When it is delivered to the public endpoint, we do mark the relay contact for archival as well
                        if ($public_message) {
-                               Diaspora::markRelayForArchival($contact);
+                               Relay::markForArchival($contact);
                        }
 
                        if (empty($contact['contact-type']) || ($contact['contact-type'] != Model\Contact::TYPE_RELAY)) {