diff options
author | friendica <info@friendica.com> | 2013-01-26 15:50:31 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2013-01-26 15:50:31 -0800 |
commit | 3e096e4a42b7baeb78d4c080bc331efd8c406f0b (patch) | |
tree | 1eb783c4b980580af531f832f71d380997754ffc /include | |
parent | 3e0040d7c3823e606d222dc4a8225bcb7d08a044 (diff) | |
download | volse-hubzilla-3e096e4a42b7baeb78d4c080bc331efd8c406f0b.tar.gz volse-hubzilla-3e096e4a42b7baeb78d4c080bc331efd8c406f0b.tar.bz2 volse-hubzilla-3e096e4a42b7baeb78d4c080bc331efd8c406f0b.zip |
better handling of failures to lookup remote authors
Diffstat (limited to 'include')
-rw-r--r-- | include/zot.php | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/include/zot.php b/include/zot.php index 827ab2053..ac18dfd41 100644 --- a/include/zot.php +++ b/include/zot.php @@ -229,10 +229,13 @@ function zot_refresh($them,$channel = null) { $j = json_decode($result['body'],true); + if(! (($j) && ($j['success']))) + return false; + $x = import_xchan($j); - if(! $x['success']) - return $x; + if(! $x['success']) + return false; $xchan_hash = $x['hash']; @@ -785,7 +788,10 @@ function zot_import($arr) { if($i['message']) { if($i['message']['type'] === 'activity') { $arr = get_item_elements($i['message']); - + if(! array_key_exists('created',$arr)) { + logger('Activity rejected: probable failure to lookup author/owner. ' . print_r($i['message'],true)); + continue; + } logger('Activity received: ' . print_r($arr,true), LOGGER_DATA); logger('Activity recipients: ' . print_r($deliveries,true), LOGGER_DATA); |