From 954957bd8ac961ba06ccbb0105af438afe5afadf Mon Sep 17 00:00:00 2001 From: redmatrix Date: Sun, 1 Nov 2015 19:07:32 -0800 Subject: provide discovery for local deletes in zot-finger and mark the hublocs invalid/deleted --- include/zot.php | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'include') diff --git a/include/zot.php b/include/zot.php index ed4bdc264..f8b8ba43f 100644 --- a/include/zot.php +++ b/include/zot.php @@ -2464,6 +2464,13 @@ function zot_encode_locations($channel) { if($x && count($x)) { foreach($x as $hub) { + + // if this is a local channel that has been deleted, the hubloc is no good - make sure it is marked deleted + // so that nobody tries to use it. + + if(intval($channel['channel_removed']) && $hub['hubloc_url'] === z_root()) + $hub['hubloc_deleted'] = true; + $ret[] = array( 'host' => $hub['hubloc_host'], 'address' => $hub['hubloc_addr'], @@ -3736,6 +3743,8 @@ function zotinfo($arr) { $ret['public_forum'] = $public_forum; if($deleted) $ret['deleted'] = $deleted; + if(intval($e['channel_removed'])) + $ret['deleted_locally'] = true; // premium or other channel desiring some contact with potential followers before connecting. // This is a template - %s will be replaced with the follow_url we discover for the return channel. -- cgit v1.2.3