From cebfeabc4113af7ff247638cd6562a5aab859b74 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Sat, 15 Sep 2018 16:43:44 -0700 Subject: [PATCH] logic issue --- include/follow.php | 16 +++++++++------- include/socgraph.php | 2 +- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/include/follow.php b/include/follow.php index 88c9c44e7..f3b0dc2fb 100644 --- a/include/follow.php +++ b/include/follow.php @@ -73,14 +73,16 @@ function new_contact($uid,$url,$channel,$interactive = false, $confirm = false) $wf = discover_by_webbie($url,$protocol); - $feeds = get_config('system','feed_contacts'); + if(! $wf) { + $feeds = get_config('system','feed_contacts'); - if(($feeds) && ($protocol === '' || $protocol === 'feed' || $protocol === 'rss')) { - $d = discover_feed($url); - } - else { - $result['message'] = t('Remote channel or protocol unavailable.'); - return $result; + if(($feeds) && ($protocol === '' || $protocol === 'feed' || $protocol === 'rss')) { + $d = discover_feed($url); + } + else { + $result['message'] = t('Remote channel or protocol unavailable.'); + return $result; + } } } diff --git a/include/socgraph.php b/include/socgraph.php index d67de7b6d..7bfe0b0e2 100644 --- a/include/socgraph.php +++ b/include/socgraph.php @@ -154,7 +154,7 @@ function poco_load($xchan = '', $url = null) { if($network === 'zot6') { $j = Zotlabs\Lib\Zotfinger::exec($profile_url); if(is_array($j) && array_path_exists('signature/signer',$j) && $j['signature']['signer'] === $profile_url && intval($j['signature']['header_valid'])) { - import_xchan($j); + Libzot::import_xchan($j); } $x = q("select xchan_hash from xchan where xchan_hash = '%s' limit 1", dbesc($hash)