aboutsummaryrefslogtreecommitdiffstats
path: root/include/items.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2020-01-23 14:24:46 +0000
committerMario <mario@mariovavti.com>2020-01-23 14:24:46 +0000
commit8789edb65db0945d2996e39c15a995c19f7214bc (patch)
treea791ee137a20886eca449d01c37e9c4d4cca830c /include/items.php
parent6c9130be469173b1cc63660beb5562a157a270f8 (diff)
downloadvolse-hubzilla-8789edb65db0945d2996e39c15a995c19f7214bc.tar.gz
volse-hubzilla-8789edb65db0945d2996e39c15a995c19f7214bc.tar.bz2
volse-hubzilla-8789edb65db0945d2996e39c15a995c19f7214bc.zip
make sure we import the zot6 xchan if we do not have it yet
Diffstat (limited to 'include/items.php')
-rwxr-xr-xinclude/items.php13
1 files changed, 12 insertions, 1 deletions
diff --git a/include/items.php b/include/items.php
index 917808ad5..9f90b2f3b 100755
--- a/include/items.php
+++ b/include/items.php
@@ -930,8 +930,19 @@ function import_author_xchan($x) {
}
// if we were told that it's a zot connection, don't probe/import anything else
- if(array_key_exists('network',$x) && $x['network'] === 'zot')
+ if(array_key_exists('network',$x) && $x['network'] === 'zot') {
+ if($x['url']) {
+ // check if we already have the zot6 xchan of this xchan_url. if not import it.
+ $r = q("SELECT xchan_hash FROM xchan WHERE xchan_url = '%s' AND xchan_network = 'zot6'",
+ dbesc($x['url'])
+ );
+
+ if(! $r)
+ discover_by_webbie($x['url'], 'zot6');
+ }
+
return $y;
+ }
// perform zot6 discovery