logic issue

This commit is contained in:
zotlabs 2018-09-15 16:43:44 -07:00
parent f58c244ba0
commit cebfeabc41
2 changed files with 10 additions and 8 deletions

View file

@ -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;
}
}
}

View file

@ -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)