aboutsummaryrefslogtreecommitdiffstats
path: root/include/zot.php
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-05-20 20:49:06 -0700
committerredmatrix <redmatrix@redmatrix.me>2015-05-20 20:49:06 -0700
commit3763f74a104d5a9b91b3ddba5dd091640672e9bf (patch)
tree90883fc46613327fd17ebb19912d270e51664a2b /include/zot.php
parentc10a4ca9c7422e2d68b3222e5c1a605ff6f456d6 (diff)
parent62df06b3d6b2e56d271b69bebf8427caa715dd16 (diff)
downloadvolse-hubzilla-3763f74a104d5a9b91b3ddba5dd091640672e9bf.tar.gz
volse-hubzilla-3763f74a104d5a9b91b3ddba5dd091640672e9bf.tar.bz2
volse-hubzilla-3763f74a104d5a9b91b3ddba5dd091640672e9bf.zip
Merge branch 'master' of https://github.com/redmatrix/redmatrix
Conflicts: include/items.php include/text.php mod/item.php view/nl/messages.po
Diffstat (limited to 'include/zot.php')
-rw-r--r--include/zot.php21
1 files changed, 5 insertions, 16 deletions
diff --git a/include/zot.php b/include/zot.php
index 22a324edd..694338a9e 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -2899,25 +2899,14 @@ function process_channel_sync_delivery($sender, $arr, $deliveries) {
// Perform discovery if the referenced xchan hasn't ever been seen on this hub.
// This relies on the undocumented behaviour that red sites send xchan info with the abook
+ // and import_author_xchan will look them up on all federated networks
- if($abook['abook_xchan'] && $abook['xchan_address']) {
+ if($abook['abook_xchan'] && $abook['xchan_addr']) {
$h = zot_get_hublocs($abook['abook_xchan']);
if(! $h) {
- $f = zot_finger($abook['xchan_address'],$channel);
- if(! $f['success']) {
- logger('process_channel_sync_delivery: abook not probe-able' . $abook['xchan_address']);
- continue;
- }
- $j = json_decode($f['body'],true);
- if(! ($j['success'] && $j['guid'])) {
- logger('process_channel_sync_delivery: probe failed.');
- continue;
- }
-
- $x = import_xchan($j);
-
- if(! $x['success']) {
- logger('process_channel_sync_delivery: import failed.');
+ $xhash = import_author_xchan(encode_item_xchan($abook));
+ if(! $xhash) {
+ logger('process_channel_sync_delivery: import of ' . $abook['xchan_addr'] . ' failed.');
continue;
}
}