]> git.mxchange.org Git - friendica.git/commitdiff
Hopefully fixes relocations that hadn't been executed
authorMichael <heluecht@pirati.ca>
Sat, 22 Sep 2018 06:47:35 +0000 (06:47 +0000)
committerMichael <heluecht@pirati.ca>
Sat, 22 Sep 2018 06:47:35 +0000 (06:47 +0000)
src/Protocol/DFRN.php
src/Worker/Delivery.php

index b207c3ca87cde7b4be9d705e936150c26a2c4cac..1ab4d8f9e4959592cf887e9f09f651989de53455 100644 (file)
@@ -1164,12 +1164,12 @@ class DFRN
         * @return int Deliver status. Negative values mean an error.
         * @todo Add array type-hint for $owner, $contact
         */
-       public static function deliver($owner, $contact, $atom, $dissolve = false)
+       public static function deliver($owner, $contact, $atom, $dissolve = false, $legacy_transport = false)
        {
                $a = get_app();
 
                // At first try the Diaspora transport layer
-               if (!$dissolve) {
+               if (!$dissolve && !$legacy_transport) {
                        $ret = self::transmit($owner, $contact, $atom);
                        if ($ret >= 200) {
                                logger('Delivery via Diaspora transport layer was successful with status ' . $ret);
index e0a5c09c270d48ec72a8379d880a44c6d82c8fcf..3a93d92f7b37366047dfc551e4c792081c9fb65e 100644 (file)
@@ -292,8 +292,10 @@ class Delivery extends BaseObject
                                self::deliverDiaspora($cmd, $contact, $owner, $items, $target_item, $public_message, $top_level, $followup);
                                return;
                        }
-               } else {
+               } elseif ($cmd != self::RELOCATION) {
                        $deliver_status = DFRN::deliver($owner, $contact, $atom);
+               } else {
+                       $deliver_status = DFRN::deliver($owner, $contact, $atom, false, true);
                }
 
                logger('Delivery to ' . $contact["url"] . ' with guid ' . $target_item["guid"] . ' returns ' . $deliver_status);