aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2020-03-24 08:32:37 +0000
committerMario <mario@mariovavti.com>2020-03-24 08:32:37 +0000
commit4eaddd12796cd49e9ee5d5527e2eaa519279d57e (patch)
tree736d9c3a8cca351eaa191728d880aba57411d95f /include
parenteb3dbcce7b1e942fc313b904d1170ac01af2efe8 (diff)
downloadvolse-hubzilla-4eaddd12796cd49e9ee5d5527e2eaa519279d57e.tar.gz
volse-hubzilla-4eaddd12796cd49e9ee5d5527e2eaa519279d57e.tar.bz2
volse-hubzilla-4eaddd12796cd49e9ee5d5527e2eaa519279d57e.zip
do not sync with incompatible hubs
Diffstat (limited to 'include')
-rw-r--r--include/zot.php11
1 files changed, 10 insertions, 1 deletions
diff --git a/include/zot.php b/include/zot.php
index 7d7df9ece..bb5537d2e 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -3299,7 +3299,7 @@ function build_sync_packet($uid = 0, $packet = null, $groups_changed = false) {
if(intval($channel['channel_removed']))
return;
- $h = q("select hubloc.*, site.site_crypto from hubloc left join site on site_url = hubloc_url where hubloc_hash = '%s' and hubloc_deleted = 0",
+ $h = q("select hubloc.*, site.site_crypto, site.site_version, site.site_project from hubloc left join site on site_url = hubloc_url where hubloc_hash = '%s' and hubloc_deleted = 0",
dbesc(($keychange) ? $packet['keychange']['old_hash'] : $channel['channel_portable_id'])
);
@@ -3312,6 +3312,14 @@ function build_sync_packet($uid = 0, $packet = null, $groups_changed = false) {
if($x['hubloc_host'] == App::get_hostname())
continue;
+ if(stripos($x['site_project'], 'hubzilla') !== false && version_compare($x['site_version'], '4.7.3', '<=')) {
+
+ logger('Dismiss sync due to incompatible version.');
+ // logger(print_r($x,true));
+ continue;
+
+ }
+
$y = q("select site_dead from site where site_url = '%s' limit 1",
dbesc($x['hubloc_url'])
);
@@ -3326,6 +3334,7 @@ function build_sync_packet($uid = 0, $packet = null, $groups_changed = false) {
$r = q("select xchan_guid, xchan_guid_sig from xchan where xchan_hash = '%s' limit 1",
dbesc($channel['channel_portable_id'])
);
+
if(! $r)
return;