diff options
author | redmatrix <git@macgirvin.com> | 2016-03-20 21:41:19 -0700 |
---|---|---|
committer | redmatrix <git@macgirvin.com> | 2016-03-20 21:41:19 -0700 |
commit | 28599fe652de514217e332382f7e5622cb68cc9f (patch) | |
tree | 5edb7ee9c1c1ec59c3f04a3ed5fb7da289ee2f36 /include/network.php | |
parent | d3e7ef70e841c819d8ecf5e4b0900cb3f5b19aa4 (diff) | |
download | volse-hubzilla-28599fe652de514217e332382f7e5622cb68cc9f.tar.gz volse-hubzilla-28599fe652de514217e332382f7e5622cb68cc9f.tar.bz2 volse-hubzilla-28599fe652de514217e332382f7e5622cb68cc9f.zip |
more federation work
Diffstat (limited to 'include/network.php')
-rw-r--r-- | include/network.php | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/include/network.php b/include/network.php index 7d41a7eb7..b0bf628ba 100644 --- a/include/network.php +++ b/include/network.php @@ -1113,8 +1113,7 @@ function discover_by_webbie($webbie) { } } - - logger('webfing: ' . print_r($x,true)); + logger('webfing: ' . print_r($x,true), LOGGER_DATA, LOG_INFO); $arr = array('address' => $webbie, 'success' => false, 'webfinger' => $x); call_hooks('discover_channel_webfinger', $arr); @@ -1131,6 +1130,13 @@ function discover_by_webbie($webbie) { $k = z_fetch_url($atom_feed); if($k['success']) $feed_meta = feed_meta($k['body']); + + // stash any discovered pubsubhubbub hubs in case we need to follow them + // this will save an expensive lookup later + + if($feed_meta['hubs']) + set_xconfig($addr,'system','push_hubs',$feed_meta['hubs']); + if($feed_meta && $feed_meta['author']) { $r = q("select * from xchan where xchan_hash = '%s' limit 1", dbesc($addr) @@ -1156,7 +1162,7 @@ function discover_by_webbie($webbie) { dbescdate(datetime_convert()) ); } - + $r = q("select * from hubloc where hubloc_hash = '%s' limit 1", dbesc($addr) ); |