aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-09-04 19:45:26 -0700
committerfriendica <info@friendica.com>2014-09-04 19:45:26 -0700
commit80f956a6223ad0a32c6b0e9b05a6075a71206aa5 (patch)
tree50a496d5bee3fbe27b23f941647b62227aeefc85
parentad58fe893db1335ac6a4f6ef45e7e8e32595042e (diff)
downloadvolse-hubzilla-80f956a6223ad0a32c6b0e9b05a6075a71206aa5.tar.gz
volse-hubzilla-80f956a6223ad0a32c6b0e9b05a6075a71206aa5.tar.bz2
volse-hubzilla-80f956a6223ad0a32c6b0e9b05a6075a71206aa5.zip
fix the client side of poco
-rw-r--r--include/socgraph.php31
1 files changed, 20 insertions, 11 deletions
diff --git a/include/socgraph.php b/include/socgraph.php
index e12da5862..dc401ff34 100644
--- a/include/socgraph.php
+++ b/include/socgraph.php
@@ -123,7 +123,8 @@ function poco_load($xchan = '',$url = null) {
$profile_url = $url['value'];
continue;
}
- if($url['type'] == 'zot') {
+ if($url['type'] == 'zot' || $url['type'] == 'diaspora' || $url['type'] == 'friendica') {
+ $network = $url['type'];
$address = str_replace('acct:' , '', $url['value']);
continue;
}
@@ -151,17 +152,25 @@ function poco_load($xchan = '',$url = null) {
if(($x !== false) && (! count($x))) {
if($address) {
- $z = zot_finger($address,null);
- if($z['success']) {
- $j = json_decode($z['body'],true);
- if($j)
- import_xchan($j);
+ if($network === 'zot') {
+ $z = zot_finger($address,null);
+ if($z['success']) {
+ $j = json_decode($z['body'],true);
+ 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",
- dbesc($hash)
- );
- if(! $x) {
- continue;
+ else {
+ $x = import_author_diaspora($address);
+ if(! $x) {
+ continue;
+ }
}
}
else {