aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Daemon
diff options
context:
space:
mode:
authormrjive <mrjive@mrjive.it>2018-02-21 12:55:29 +0100
committerGitHub <noreply@github.com>2018-02-21 12:55:29 +0100
commit2d17e1c677cd981858a4080af98edb51bbb5d822 (patch)
tree54d5d148d368632158584ba7eec7872170524e00 /Zotlabs/Daemon
parentd7ecaa8b23a36ea1e9a0f185017930b5552c00b5 (diff)
parenta829256bc4803731881a51bddd19ee59a5a234ff (diff)
downloadvolse-hubzilla-2d17e1c677cd981858a4080af98edb51bbb5d822.tar.gz
volse-hubzilla-2d17e1c677cd981858a4080af98edb51bbb5d822.tar.bz2
volse-hubzilla-2d17e1c677cd981858a4080af98edb51bbb5d822.zip
Merge pull request #15 from redmatrix/dev
Dev
Diffstat (limited to 'Zotlabs/Daemon')
-rw-r--r--Zotlabs/Daemon/Notifier.php18
-rw-r--r--Zotlabs/Daemon/Queue.php6
2 files changed, 19 insertions, 5 deletions
diff --git a/Zotlabs/Daemon/Notifier.php b/Zotlabs/Daemon/Notifier.php
index b168db5ae..fa2368a92 100644
--- a/Zotlabs/Daemon/Notifier.php
+++ b/Zotlabs/Daemon/Notifier.php
@@ -618,8 +618,8 @@ class Notifier {
$packet = zot_build_packet($channel,$packet_type,(($packet_recips) ? $packet_recips : null));
}
if($packet_type === 'keychange') {
- $packet = zot_build_packet($channel,$packet_type,(($packet_recips) ? $packet_recips : null));
$pmsg = get_pconfig($channel['channel_id'],'system','keychange');
+ $packet = zot_build_packet($channel,$packet_type,(($packet_recips) ? $packet_recips : null));
}
elseif($packet_type === 'request') {
$env = (($hub_env && $hub_env[$hub['hubloc_host'] . $hub['hubloc_sitekey']]) ? $hub_env[$hub['hubloc_host'] . $hub['hubloc_sitekey']] : '');
@@ -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 = zot_build_packet($channel,'notify',$env,(($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' && (! array_key_exists('allow_cid',$encoded_item))) ? 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 = zot_build_packet($channel,'notify',$env, (($private) ? $hub['hubloc_sitekey'] : null), $hub['site_crypto'],$hash);
+
+ }
+
queue_insert(
[
'hash' => $hash,
diff --git a/Zotlabs/Daemon/Queue.php b/Zotlabs/Daemon/Queue.php
index 17d150250..8f529ff13 100644
--- a/Zotlabs/Daemon/Queue.php
+++ b/Zotlabs/Daemon/Queue.php
@@ -13,10 +13,10 @@ class Queue {
require_once('include/bbcode.php');
- if(argc() > 1)
- $queue_id = argv(1);
+ if($argc > 1)
+ $queue_id = $argv[1];
else
- $queue_id = 0;
+ $queue_id = EMPTY_STR;
logger('queue: start');