Merge pull request #5780 from annando/fix-relocation
Hopefully fixes relocations that hadn't been executed
This commit is contained in:
commit
684dfd5bbd
2 changed files with 5 additions and 3 deletions
|
@ -1164,12 +1164,12 @@ class DFRN
|
||||||
* @return int Deliver status. Negative values mean an error.
|
* @return int Deliver status. Negative values mean an error.
|
||||||
* @todo Add array type-hint for $owner, $contact
|
* @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();
|
$a = get_app();
|
||||||
|
|
||||||
// At first try the Diaspora transport layer
|
// At first try the Diaspora transport layer
|
||||||
if (!$dissolve) {
|
if (!$dissolve && !$legacy_transport) {
|
||||||
$ret = self::transmit($owner, $contact, $atom);
|
$ret = self::transmit($owner, $contact, $atom);
|
||||||
if ($ret >= 200) {
|
if ($ret >= 200) {
|
||||||
logger('Delivery via Diaspora transport layer was successful with status ' . $ret);
|
logger('Delivery via Diaspora transport layer was successful with status ' . $ret);
|
||||||
|
|
|
@ -292,8 +292,10 @@ class Delivery extends BaseObject
|
||||||
self::deliverDiaspora($cmd, $contact, $owner, $items, $target_item, $public_message, $top_level, $followup);
|
self::deliverDiaspora($cmd, $contact, $owner, $items, $target_item, $public_message, $top_level, $followup);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else {
|
} elseif ($cmd != self::RELOCATION) {
|
||||||
$deliver_status = DFRN::deliver($owner, $contact, $atom);
|
$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);
|
logger('Delivery to ' . $contact["url"] . ' with guid ' . $target_item["guid"] . ' returns ' . $deliver_status);
|
||||||
|
|
Loading…
Reference in a new issue