]> git.mxchange.org Git - friendica.git/commitdiff
Don't spool relay deliveries
authorMichael <heluecht@pirati.ca>
Mon, 30 Apr 2018 05:56:40 +0000 (05:56 +0000)
committerMichael <heluecht@pirati.ca>
Mon, 30 Apr 2018 05:56:40 +0000 (05:56 +0000)
src/Worker/Delivery.php

index f874e5f23024069200f284e6fa7edff11655073c..423691e2a5ea022b3911a0833608d94a8bbef988 100644 (file)
@@ -275,6 +275,13 @@ class Delivery extends BaseObject
                        $public_dfrn = ($contact['contact-type'] == ACCOUNT_TYPE_RELAY);
 
                        $deliver_status = DFRN::transmit($owner, $contact, $atom, $public_dfrn);
+
+                       // We never spool failed relay deliveries
+                       if ($public_dfrn) {
+                               logger('Relay delivery to ' . $contact["url"] . ' with guid ' . $target_item["guid"] . ' returns ' . $deliver_status);
+                               return;
+                       }
+
                        if (($deliver_status < 200) || ($deliver_status > 299)) {
                                // Transmit via Diaspora if not possible via Friendica
                                self::deliverDiaspora($cmd, $contact, $owner, $items, $target_item, $public_message, $top_level, $followup);