diff options
author | friendica <info@friendica.com> | 2014-09-14 22:19:19 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2014-09-14 22:19:19 -0700 |
commit | 0dc33900b6799681683fd02f597e95acbd58e960 (patch) | |
tree | cbbf56c19baa44e7ec06005d9a1048bfc83062da /include/zot.php | |
parent | f2b0311f9d0446f4cfbf57143aa58462c7c8f39a (diff) | |
download | volse-hubzilla-0dc33900b6799681683fd02f597e95acbd58e960.tar.gz volse-hubzilla-0dc33900b6799681683fd02f597e95acbd58e960.tar.bz2 volse-hubzilla-0dc33900b6799681683fd02f597e95acbd58e960.zip |
provide a way to sync locations and get rid of bogus hublocs, now implemented
Diffstat (limited to 'include/zot.php')
-rw-r--r-- | include/zot.php | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/include/zot.php b/include/zot.php index c204375e1..f6732037a 100644 --- a/include/zot.php +++ b/include/zot.php @@ -1121,6 +1121,11 @@ function zot_import($arr, $sender_url) { $deliveries = allowed_public_recips($i); + if($i['message'] && array_key_exists('type',$i['message']) && $i['message']['type'] === 'location') { + $sys = get_sys_channel(); + $deliveries = array(array('hash' => $sys['xchan_hash'])); + } + // if the scope is anything but 'public' we're going to store it as private regardless // of the private flag on the post. @@ -1206,7 +1211,7 @@ function zot_import($arr, $sender_url) { $arr = $i['message']; logger('Location message received: ' . print_r($arr,true), LOGGER_DATA); - logger('Location messaeg recipients: ' . print_r($deliveries,true), LOGGER_DATA); + logger('Location message recipients: ' . print_r($deliveries,true), LOGGER_DATA); $result = process_location_delivery($i['notify']['sender'],$arr,$deliveries); } @@ -1665,7 +1670,8 @@ function process_location_delivery($sender,$arr,$deliveries) { if($r) $sender['key'] = $r[0]['xchan_pubkey']; - sync_locations($sender,$arr,true); + $x = sync_locations($sender,$arr,true); + logger('process_location_delivery: results: ' . print_r($x,true), LOGGER_DATA); } // We need to merge this code with that in the import_xchan function so as to make it |