Fallback to Diaspora if DFRN transmission fails (#5487)
authorMichael Vogel <icarus@dabo.de>
Tue, 24 Jul 2018 18:12:09 +0000 (20:12 +0200)
committerHypolite Petovan <mrpetovan@eml.cc>
Tue, 24 Jul 2018 18:12:09 +0000 (14:12 -0400)
src/Worker/Delivery.php

index 87e3024..022faa2 100644 (file)
@@ -309,6 +309,10 @@ class Delivery extends BaseObject
                } else {
                        // The message could not be delivered. We mark the contact as "dead"
                        Contact::markForArchival($contact);
+
+                       // Transmit via Diaspora when all other methods (legacy DFRN and new one) are failing.
+                       // This is a fallback for systems that don't know the new methods.
+                       self::deliverDiaspora($cmd, $contact, $owner, $items, $target_item, $public_message, $top_level, $followup);
                }
        }