diff options
author | redmatrix <redmatrix@redmatrix.me> | 2015-11-01 19:07:32 -0800 |
---|---|---|
committer | redmatrix <redmatrix@redmatrix.me> | 2015-11-01 19:07:32 -0800 |
commit | 954957bd8ac961ba06ccbb0105af438afe5afadf (patch) | |
tree | e5342f02fe9a282b212a277f862cc149b5857418 /include/zot.php | |
parent | 14e92f53f16b0f98bb4574f98c54c68e08d528dc (diff) | |
download | volse-hubzilla-954957bd8ac961ba06ccbb0105af438afe5afadf.tar.gz volse-hubzilla-954957bd8ac961ba06ccbb0105af438afe5afadf.tar.bz2 volse-hubzilla-954957bd8ac961ba06ccbb0105af438afe5afadf.zip |
provide discovery for local deletes in zot-finger and mark the hublocs invalid/deleted
Diffstat (limited to 'include/zot.php')
-rw-r--r-- | include/zot.php | 9 |
1 files changed, 9 insertions, 0 deletions
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. |