X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fdelivery.php;h=8fce98774250cdaeeaccda7bd841671cbda1a7ed;hb=d49325d177cf03b97df250ca3cb081421c541049;hp=1e1dadcd934e3ca0e01be582a88279ff4e9ce9d3;hpb=9ae2b2292fd07a53f46689f778cd4630031912a7;p=friendica.git diff --git a/include/delivery.php b/include/delivery.php index 1e1dadcd93..8fce987742 100644 --- a/include/delivery.php +++ b/include/delivery.php @@ -178,7 +178,7 @@ function delivery_run(&$argv, &$argc){ $r = q("SELECT `contact`.*, `user`.`pubkey` AS `upubkey`, `user`.`prvkey` AS `uprvkey`, `user`.`timezone`, `user`.`nickname`, `user`.`sprvkey`, `user`.`spubkey`, - `user`.`page-flags`, `user`.`prvnets` + `user`.`page-flags`, `user`.`account-type`, `user`.`prvnets` FROM `contact` INNER JOIN `user` ON `user`.`uid` = `contact`.`uid` WHERE `contact`.`uid` = %d AND `contact`.`self` = 1 LIMIT 1", intval($uid) @@ -243,7 +243,8 @@ function delivery_run(&$argv, &$argc){ if ((strlen($parent['allow_cid'])) || (strlen($parent['allow_gid'])) || (strlen($parent['deny_cid'])) - || (strlen($parent['deny_gid']))) { + || (strlen($parent['deny_gid'])) + || $parent["private"]) { $public_message = false; // private recipients, not public } @@ -380,7 +381,14 @@ function delivery_run(&$argv, &$argc){ if ($deliver_status == (-1)) { logger('notifier: delivery failed: queuing message'); add_to_queue($contact['id'],NETWORK_DFRN,$atom); + + // The message could not be delivered. We mark the contact as "dead" + mark_for_death($contact); + } else { + // We successfully delivered a message, the contact is alive + unmark_for_death($contact); } + break; case NETWORK_OSTATUS: @@ -501,7 +509,6 @@ function delivery_run(&$argv, &$argc){ if ($mail) { diaspora::send_mail($item,$owner,$contact); - //diaspora_send_mail($item,$owner,$contact); break; } @@ -524,25 +531,21 @@ function delivery_run(&$argv, &$argc){ // top-level retraction logger('diaspora retract: '.$loc); diaspora::send_retraction($target_item,$owner,$contact,$public_message); - //diaspora_send_retraction($target_item,$owner,$contact,$public_message); break; } elseif ($followup) { // send comments and likes to owner to relay logger('diaspora followup: '.$loc); diaspora::send_followup($target_item,$owner,$contact,$public_message); - //diaspora_send_followup($target_item,$owner,$contact,$public_message); break; } elseif ($target_item['uri'] !== $target_item['parent-uri']) { // we are the relay - send comments, likes and relayable_retractions to our conversants logger('diaspora relay: '.$loc); diaspora::send_relay($target_item,$owner,$contact,$public_message); - //diaspora_send_relay($target_item,$owner,$contact,$public_message); break; } elseif ($top_level && !$walltowall) { // currently no workable solution for sending walltowall logger('diaspora status: '.$loc); diaspora::send_status($target_item,$owner,$contact,$public_message); - //diaspora_send_status($target_item,$owner,$contact,$public_message); break; }