aboutsummaryrefslogtreecommitdiffstats
path: root/include/socgraph.php
diff options
context:
space:
mode:
authorThomas Willingham <beardyunixer@beardyunixer.com>2014-09-09 21:32:25 +0100
committerThomas Willingham <beardyunixer@beardyunixer.com>2014-09-09 21:32:25 +0100
commitec4f30c3f672bbfc57bee8db0aaa0cf002fe8687 (patch)
treecf1aa37d881f2ce3cb844bbcd5c11c5999e96c66 /include/socgraph.php
parent652ec8c3fcc956c1a5fc2adb7410e4c4a2ac6f90 (diff)
parent409c89d629993b59eaafa8443ae9d0b5f0344c1f (diff)
downloadvolse-hubzilla-ec4f30c3f672bbfc57bee8db0aaa0cf002fe8687.tar.gz
volse-hubzilla-ec4f30c3f672bbfc57bee8db0aaa0cf002fe8687.tar.bz2
volse-hubzilla-ec4f30c3f672bbfc57bee8db0aaa0cf002fe8687.zip
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'include/socgraph.php')
-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..504a6b2c0 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(array('address' => $address));
+ if(! $x) {
+ continue;
+ }
}
}
else {