From 04185b05ab141cdb8b96f5fa9e4106b4a2cde732 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Mon, 19 Feb 2018 11:57:47 -0800 Subject: target zot6 deliveries with more precision to ensure we handle a very precise type of content until the mechanism is extended to other types in the future --- Zotlabs/Daemon/Notifier.php | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'Zotlabs/Daemon/Notifier.php') diff --git a/Zotlabs/Daemon/Notifier.php b/Zotlabs/Daemon/Notifier.php index 957b859af..47db32206 100644 --- a/Zotlabs/Daemon/Notifier.php +++ b/Zotlabs/Daemon/Notifier.php @@ -640,7 +640,21 @@ class Notifier { } else { $env = (($hub_env && $hub_env[$hub['hubloc_host'] . $hub['hubloc_sitekey']]) ? $hub_env[$hub['hubloc_host'] . $hub['hubloc_sitekey']] : ''); - $packet = zot6_build_packet($channel,'notify',$env, json_encode($encoded_item), (($private) ? $hub['hubloc_sitekey'] : null), $hub['site_crypto'],$hash); + + // currently zot6 delivery is only performed on normal items and not sync items or mail or anything else + // Eventually we will do this for all deliveries, but for now ensure this is precisely what we are dealing + // with before switching to zot6 as the primary zot6 handler checks for the existence of a message delivery report + // to trigger dequeue'ing + + $z6 = (($encoded_item && $encoded_item['type'] === 'activity' && (! $encoded_item['allow_cid'])) ? true : false); + if($z6) { + $packet = zot6_build_packet($channel,'notify',$env, json_encode($encoded_item), (($private) ? $hub['hubloc_sitekey'] : null), $hub['site_crypto'],$hash); + } + else { + $packet = zot6_build_packet($channel,'notify',$env, (($private) ? $hub['hubloc_sitekey'] : null), $hub['site_crypto'],$hash); + + } + queue_insert( [ 'hash' => $hash, -- cgit v1.2.3