aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib/Libsync.php
diff options
context:
space:
mode:
Diffstat (limited to 'Zotlabs/Lib/Libsync.php')
-rw-r--r--Zotlabs/Lib/Libsync.php11
1 files changed, 8 insertions, 3 deletions
diff --git a/Zotlabs/Lib/Libsync.php b/Zotlabs/Lib/Libsync.php
index d52b501e4..0d383c697 100644
--- a/Zotlabs/Lib/Libsync.php
+++ b/Zotlabs/Lib/Libsync.php
@@ -141,7 +141,7 @@ class Libsync {
$total = count($synchubs);
foreach ($synchubs as $hub) {
- $hash = random_string();
+ $hash = new_uuid();
$n = Libzot::build_packet($channel, 'sync', $env_recips, json_encode($info), 'hz', $hub['hubloc_sitekey'], $hub['site_crypto']);
Queue::insert([
'hash' => $hash,
@@ -771,7 +771,12 @@ class Libsync {
static function sync_locations($sender, $arr) {
- $ret = [];
+ $ret = [
+ 'change_message' => '',
+ 'changed' => false,
+ 'message' => ''
+ ];
+
$what = '';
$changed = false;
@@ -786,7 +791,7 @@ class Libsync {
if (isset($arr['locations']) && $arr['locations']) {
- $xisting = q("select * from hubloc where hubloc_hash = '%s'",
+ $xisting = q("select * from hubloc where hubloc_hash = '%s' and hubloc_deleted = 0",
dbesc($sender['hash'])
);