aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2020-01-30 20:06:15 +0100
committerMario <mario@mariovavti.com>2020-01-30 20:06:15 +0100
commitc2b6f0bc28afaaa253308bc0b90c914a08b9547b (patch)
tree112a577d708088aecabd8af957c5c40b8e24e313 /Zotlabs/Lib
parent8e2446a2fc706a6750c925b4c2672314be6bb91f (diff)
parent2c42daf6090ba8d0e3a50b8350ea5a3750891b68 (diff)
downloadvolse-hubzilla-c2b6f0bc28afaaa253308bc0b90c914a08b9547b.tar.gz
volse-hubzilla-c2b6f0bc28afaaa253308bc0b90c914a08b9547b.tar.bz2
volse-hubzilla-c2b6f0bc28afaaa253308bc0b90c914a08b9547b.zip
Merge branch 'dev' into 'dev'
z6 compat work See merge request hubzilla/core!1822
Diffstat (limited to 'Zotlabs/Lib')
-rw-r--r--Zotlabs/Lib/Libsync.php4
-rw-r--r--Zotlabs/Lib/Libzot.php7
2 files changed, 8 insertions, 3 deletions
diff --git a/Zotlabs/Lib/Libsync.php b/Zotlabs/Lib/Libsync.php
index d93270bc5..b9e9bb38a 100644
--- a/Zotlabs/Lib/Libsync.php
+++ b/Zotlabs/Lib/Libsync.php
@@ -83,7 +83,7 @@ class Libsync {
$info = (($packet) ? $packet : array());
$info['type'] = 'sync';
- $info['encoding'] = 'red'; // note: not zot, this packet is very platform specific
+ $info['encoding'] = 'hz'; // note: not zot, this packet is very platform specific
$info['relocate'] = ['channel_address' => $channel['channel_address'], 'url' => z_root() ];
if(array_key_exists($uid,\App::$config) && array_key_exists('transient',\App::$config[$uid])) {
@@ -144,7 +144,7 @@ class Libsync {
foreach($synchubs as $hub) {
$hash = random_string();
- $n = Libzot::build_packet($channel,'sync',$env_recips,json_encode($info),'red',$hub['hubloc_sitekey'],$hub['site_crypto']);
+ $n = Libzot::build_packet($channel,'sync',$env_recips,json_encode($info),'hz',$hub['hubloc_sitekey'],$hub['site_crypto']);
Queue::insert(array(
'hash' => $hash,
'account_id' => $channel['channel_account_id'],
diff --git a/Zotlabs/Lib/Libzot.php b/Zotlabs/Lib/Libzot.php
index ad00aa97a..bb70dfbf2 100644
--- a/Zotlabs/Lib/Libzot.php
+++ b/Zotlabs/Lib/Libzot.php
@@ -1277,7 +1277,12 @@ class Libzot {
logger('Channel sync received: ' . print_r($arr,true), LOGGER_DATA, LOG_DEBUG);
logger('Channel sync recipients: ' . print_r($deliveries,true), LOGGER_DATA, LOG_DEBUG);
- $result = Libsync::process_channel_sync_delivery($env['sender'],$arr,$deliveries);
+ if ($env['encoding'] === 'hz') {
+ $result = Libsync::process_channel_sync_delivery($env['sender'],$arr,$deliveries);
+ }
+ else {
+ logger('sync packet type not supported.');
+ }
}
}
if ($result) {