From b06c52553d1fee69062b533a46b80190d9b4b350 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Mon, 5 Feb 2018 16:08:01 -0800 Subject: fix manual queue invocation (was using the web argc/argv from the cli) --- Zotlabs/Daemon/Queue.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Zotlabs/Daemon') 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'); -- cgit v1.2.3 From 3a0db39fa05668831e7661ac6edaabfd09d864e2 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Wed, 7 Feb 2018 18:38:10 -0800 Subject: more zot6 delivery work --- Zotlabs/Daemon/Notifier.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Zotlabs/Daemon') diff --git a/Zotlabs/Daemon/Notifier.php b/Zotlabs/Daemon/Notifier.php index b168db5ae..957b859af 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,7 @@ 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); + $packet = zot6_build_packet($channel,'notify',$env, json_encode($encoded_item), (($private) ? $hub['hubloc_sitekey'] : null), $hub['site_crypto'],$hash); queue_insert( [ 'hash' => $hash, -- cgit v1.2.3 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') 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 From f0d68a1a250c6bd8bf5bdcce6334d5dffcba50cd Mon Sep 17 00:00:00 2001 From: zotlabs Date: Mon, 19 Feb 2018 14:13:44 -0800 Subject: fix the fix for precision --- Zotlabs/Daemon/Notifier.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Zotlabs/Daemon') diff --git a/Zotlabs/Daemon/Notifier.php b/Zotlabs/Daemon/Notifier.php index 47db32206..b7f2a384d 100644 --- a/Zotlabs/Daemon/Notifier.php +++ b/Zotlabs/Daemon/Notifier.php @@ -646,7 +646,7 @@ class Notifier { // 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); + $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); } -- cgit v1.2.3 From 331fe92b9e5e7ecd1db0d0582278bf7b95789570 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Mon, 19 Feb 2018 14:14:45 -0800 Subject: and fix the typo --- Zotlabs/Daemon/Notifier.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Zotlabs/Daemon') diff --git a/Zotlabs/Daemon/Notifier.php b/Zotlabs/Daemon/Notifier.php index b7f2a384d..af561c702 100644 --- a/Zotlabs/Daemon/Notifier.php +++ b/Zotlabs/Daemon/Notifier.php @@ -646,7 +646,7 @@ class Notifier { // 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); + $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); } -- cgit v1.2.3 From b4dad817677dbe23221901752cba60418c05287e Mon Sep 17 00:00:00 2001 From: zotlabs Date: Tue, 20 Feb 2018 14:41:46 -0800 Subject: copy/paste error resulting in bad behaviour --- Zotlabs/Daemon/Notifier.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Zotlabs/Daemon') diff --git a/Zotlabs/Daemon/Notifier.php b/Zotlabs/Daemon/Notifier.php index af561c702..fa2368a92 100644 --- a/Zotlabs/Daemon/Notifier.php +++ b/Zotlabs/Daemon/Notifier.php @@ -651,7 +651,7 @@ class Notifier { $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); + $packet = zot_build_packet($channel,'notify',$env, (($private) ? $hub['hubloc_sitekey'] : null), $hub['site_crypto'],$hash); } -- cgit v1.2.3