diff options
author | zotlabs <mike@macgirvin.com> | 2017-08-10 12:49:20 -0700 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2017-08-10 12:49:20 -0700 |
commit | 6c55e44f4cc0950144269f244fdf3baed5be4e49 (patch) | |
tree | b3ba4101c16e2a1d0e084f5a662f0407ed170fa9 /include/network.php | |
parent | 568690186961d2946543c8320faf5575758acfca (diff) | |
download | volse-hubzilla-6c55e44f4cc0950144269f244fdf3baed5be4e49.tar.gz volse-hubzilla-6c55e44f4cc0950144269f244fdf3baed5be4e49.tar.bz2 volse-hubzilla-6c55e44f4cc0950144269f244fdf3baed5be4e49.zip |
when following, allow [network]follow_address syntax to connect with a specific network for multi-protocol services
Diffstat (limited to 'include/network.php')
-rw-r--r-- | include/network.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/network.php b/include/network.php index cd6e980ff..96f4416c8 100644 --- a/include/network.php +++ b/include/network.php @@ -1137,7 +1137,7 @@ function discover_by_url($url, $arr = null) { return true; } -function discover_by_webbie($webbie) { +function discover_by_webbie($webbie,$protocol = '') { $result = []; @@ -1153,7 +1153,7 @@ function discover_by_webbie($webbie) { // If we discover zot - don't search further; grab the info and get out of // here. - if($link['rel'] === PROTOCOL_ZOT) { + if($link['rel'] === PROTOCOL_ZOT && ((! $protocol) || (strtolower($protocol) === 'zot'))) { logger('discover_by_webbie: zot found for ' . $webbie, LOGGER_DEBUG); if(array_key_exists('zot',$x) && $x['zot']['success']) { $i = import_xchan($x['zot']); @@ -1174,7 +1174,7 @@ function discover_by_webbie($webbie) { logger('webfinger: ' . print_r($x,true), LOGGER_DATA, LOG_INFO); - $arr = array('address' => $webbie, 'success' => false, 'webfinger' => $x); + $arr = array('address' => $webbie, 'protocol' => $protocol, 'success' => false, 'webfinger' => $x); call_hooks('discover_channel_webfinger', $arr); if($arr['success']) return true; |