diff options
author | Max Kostikov <max@kostikov.co> | 2020-03-31 19:54:20 +0200 |
---|---|---|
committer | Max Kostikov <max@kostikov.co> | 2020-03-31 19:54:20 +0200 |
commit | 5a2c62466e773ce043a1b39bd2f1e7003a53d9f2 (patch) | |
tree | 363847c74a9068f3c8cf5110a5ac377c5d40fba1 /Zotlabs/Daemon | |
parent | c2b691fd0153f0b468f9014b4ca1f0f2b339c617 (diff) | |
parent | b739f91caa1522522a4ce093d7c63f0f4c777085 (diff) | |
download | volse-hubzilla-5a2c62466e773ce043a1b39bd2f1e7003a53d9f2.tar.gz volse-hubzilla-5a2c62466e773ce043a1b39bd2f1e7003a53d9f2.tar.bz2 volse-hubzilla-5a2c62466e773ce043a1b39bd2f1e7003a53d9f2.zip |
Merge branch 'dev' into 'dev'
Sync dev
See merge request kostikov/core!2
Diffstat (limited to 'Zotlabs/Daemon')
-rw-r--r-- | Zotlabs/Daemon/Notifier.php | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/Zotlabs/Daemon/Notifier.php b/Zotlabs/Daemon/Notifier.php index 00c6fb077..fdf0148a6 100644 --- a/Zotlabs/Daemon/Notifier.php +++ b/Zotlabs/Daemon/Notifier.php @@ -542,11 +542,10 @@ class Notifier { // Now we have collected recipients (except for external mentions, FIXME) // Let's reduce this to a set of hubs; checking that the site is not dead. - $r = q("select hubloc.*, site.site_crypto, site.site_flags from hubloc left join site on site_url = hubloc_url where hubloc_hash in (" . protect_sprintf(implode(',',$recipients)) . ") + $r = q("select hubloc.*, site.site_crypto, site.site_flags, site.site_version, site.site_project from hubloc left join site on site_url = hubloc_url where hubloc_hash in (" . protect_sprintf(implode(',',$recipients)) . ") and hubloc_error = 0 and hubloc_deleted = 0 and ( site_dead = 0 OR site_dead is null ) " - ); + ); - if(! $r) { logger('notifier: no hubs', LOGGER_NORMAL, LOG_NOTICE); return; @@ -735,7 +734,14 @@ class Notifier { $packet = zot_build_packet($channel,'notify',$env, (($private) ? $hub['hubloc_sitekey'] : null), $hub['site_crypto'],$hash); } - } + } + + if(stripos($hub['site_project'], 'hubzilla') !== false && version_compare($hub['site_version'], '4.7.3', '<=')) { + $encoded_item['owner']['network'] = 'zot'; + $encoded_item['owner']['guid_sig'] = str_replace('sha256.', '', $encoded_item['owner']['guid_sig']); + $encoded_item['author']['network'] = 'zot'; + $encoded_item['author']['guid_sig'] = str_replace('sha256.', '', $encoded_item['author']['guid_sig']); + } queue_insert( [ |