fix the client side of poco

This commit is contained in:
friendica 2014-09-04 19:45:26 -07:00
parent ad58fe893d
commit 80f956a622

View File

@ -123,7 +123,8 @@ function poco_load($xchan = '',$url = null) {
$profile_url = $url['value']; $profile_url = $url['value'];
continue; continue;
} }
if($url['type'] == 'zot') { if($url['type'] == 'zot' || $url['type'] == 'diaspora' || $url['type'] == 'friendica') {
$network = $url['type'];
$address = str_replace('acct:' , '', $url['value']); $address = str_replace('acct:' , '', $url['value']);
continue; continue;
} }
@ -151,17 +152,25 @@ function poco_load($xchan = '',$url = null) {
if(($x !== false) && (! count($x))) { if(($x !== false) && (! count($x))) {
if($address) { if($address) {
$z = zot_finger($address,null); if($network === 'zot') {
if($z['success']) { $z = zot_finger($address,null);
$j = json_decode($z['body'],true); if($z['success']) {
if($j) $j = json_decode($z['body'],true);
import_xchan($j); if($j)
import_xchan($j);
}
$x = q("select xchan_hash from xchan where xchan_hash = '%s' limit 1",
dbesc($hash)
);
if(! $x) {
continue;
}
} }
$x = q("select xchan_hash from xchan where xchan_hash = '%s' limit 1", else {
dbesc($hash) $x = import_author_diaspora($address);
); if(! $x) {
if(! $x) { continue;
continue; }
} }
} }
else { else {