aboutsummaryrefslogtreecommitdiffstats
path: root/include/items.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-09-04 01:13:01 -0700
committerfriendica <info@friendica.com>2014-09-04 01:13:01 -0700
commitca2bf76b06360d6bd3dc386d53c6d7301cd518f3 (patch)
treef9997ba76aeb1e6ed3d772f54ab7062e3cab711a /include/items.php
parent1659e0e7ad5511bb2f1d786b5dd5dd10000eabf7 (diff)
downloadvolse-hubzilla-ca2bf76b06360d6bd3dc386d53c6d7301cd518f3.tar.gz
volse-hubzilla-ca2bf76b06360d6bd3dc386d53c6d7301cd518f3.tar.bz2
volse-hubzilla-ca2bf76b06360d6bd3dc386d53c6d7301cd518f3.zip
allow stuff with Diaspora authors to federate in zot conversations even if the local site has diaspora disabled. This way it won't look like folks are talking to themselves.
Diffstat (limited to 'include/items.php')
-rwxr-xr-xinclude/items.php17
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'])