diff options
Diffstat (limited to 'include/items.php')
-rwxr-xr-x | include/items.php | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/items.php b/include/items.php index 9d80b3a81..acdae90b2 100755 --- a/include/items.php +++ b/include/items.php @@ -871,6 +871,8 @@ function import_author_xchan($x) { if((! array_key_exists('network', $x)) || ($x['network'] === 'zot')) { $y = import_author_zot($x); } + if(! $y) + $y = import_author_diaspora($x); if($x['network'] === 'rss') { $y = import_author_rss($x); @@ -879,6 +881,21 @@ function import_author_xchan($x) { return(($y) ? $y : false); } + +function import_author_diaspora($x) { + if(! $x['address']) + return false; + if(discover_by_webbie($x['address'])) { + $r = q("select xchan_hash from xchan where xchan_addr = '%s' limit 1", + dbesc($x['address']) + ); + if($r) + return $r[0]['xchan_hash']; + } + return false; +} + + function import_author_rss($x) { if(! $x['url']) |