X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fdelivery.php;h=8fce98774250cdaeeaccda7bd841671cbda1a7ed;hb=d49325d177cf03b97df250ca3cb081421c541049;hp=59cab43714a4e1c083983deab6b4da84b0fe5803;hpb=22f32d9721809d2e655c7ab78d6a043b93de0af1;p=friendica.git diff --git a/include/delivery.php b/include/delivery.php index 59cab43714..8fce987742 100644 --- a/include/delivery.php +++ b/include/delivery.php @@ -21,8 +21,6 @@ function delivery_run(&$argv, &$argc){ unset($db_host, $db_user, $db_pass, $db_data); } - $a->start_process(); - require_once("include/session.php"); require_once("include/datetime.php"); require_once('include/items.php'); @@ -180,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) @@ -383,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: