diff options
-rw-r--r-- | Zotlabs/Daemon/Notifier.php | 16 |
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, |