X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fdelivery.php;h=1328771a6789bb3e623459e95e70ec76fd009c50;hb=1406480258a907bfef3accfe01e789f3f24cbaab;hp=32943d5dabdefabe211fee14ca90b8e0a2e051eb;hpb=68757f25042b02624bfb748c25029023b3082f62;p=friendica.git diff --git a/include/delivery.php b/include/delivery.php index 32943d5dab..1328771a67 100644 --- a/include/delivery.php +++ b/include/delivery.php @@ -113,6 +113,7 @@ function delivery_run($argv, $argc){ $uid = $r[0]['uid']; $updated = $r[0]['edited']; + // POSSIBLE CLEANUP --> The following seems superfluous. We've already checked for "if (! intval($r[0]['parent']))" a few lines up if(! $parent_id) continue; @@ -279,7 +280,7 @@ function delivery_run($argv, $argc){ continue; // private emails may be in included in public conversations. Filter them. - if(($public_message) && $item['private']) + if(($public_message) && $item['private'] == 1) continue; $item_contact = get_item_contact($item,$icontacts); @@ -382,7 +383,7 @@ function delivery_run($argv, $argc){ continue; // private emails may be in included in public conversations. Filter them. - if(($public_message) && $item['private']) + if(($public_message) && $item['private'] == 1) continue; $item_contact = get_item_contact($item,$icontacts); @@ -508,17 +509,17 @@ function delivery_run($argv, $argc){ // unsupported break; } - elseif(($target_item['deleted']) && ($target_item['verb'] !== ACTIVITY_LIKE)) { - logger('delivery: diaspora retract: ' . $loc); - // diaspora delete, + elseif(($target_item['deleted']) && ($target_item['uri'] === $target_item['parent-uri'])) { + // top-level retraction + logger('delivery: diaspora retract: ' . $loc); + diaspora_send_retraction($target_item,$owner,$contact,$public_message); break; } - elseif($target_item['parent'] != $target_item['id']) { - - logger('delivery: diaspora relay: ' . $loc); + elseif($target_item['uri'] !== $target_item['parent-uri']) { + // we are the relay - send comments, likes and relayable_retractions to our conversants + logger('delivery: diaspora relay: ' . $loc); - // we are the relay - send comments, likes and unlikes to our conversants diaspora_send_relay($target_item,$owner,$contact,$public_message); break; }