aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Daemon/Notifier.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2018-02-19 11:57:47 -0800
committerzotlabs <mike@macgirvin.com>2018-02-19 11:57:47 -0800
commit04185b05ab141cdb8b96f5fa9e4106b4a2cde732 (patch)
treedb8f96fab1d32c057b47e6bd78ae951fe3e12a90 /Zotlabs/Daemon/Notifier.php
parent46cb45d94b6d7892a10b043e036da09cc72cbe98 (diff)
downloadvolse-hubzilla-04185b05ab141cdb8b96f5fa9e4106b4a2cde732.tar.gz
volse-hubzilla-04185b05ab141cdb8b96f5fa9e4106b4a2cde732.tar.bz2
volse-hubzilla-04185b05ab141cdb8b96f5fa9e4106b4a2cde732.zip
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
Diffstat (limited to 'Zotlabs/Daemon/Notifier.php')
-rw-r--r--Zotlabs/Daemon/Notifier.php16
1 files changed, 15 insertions, 1 deletions
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,