From c358aa2806717d1af6e47697f87e54b7c9967c9e Mon Sep 17 00:00:00 2001 From: Mario Date: Thu, 12 Mar 2020 18:27:16 +0000 Subject: first batch of zot6 transition patches. basic communication with transitioned channels *should* work now --- Zotlabs/Daemon/Notifier.php | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'Zotlabs/Daemon/Notifier.php') 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( [ -- cgit v1.2.3