diff options
author | Mario <mario@mariovavti.com> | 2021-05-23 20:31:03 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2021-05-23 20:31:03 +0000 |
commit | d40686e5d00b816bfa01282c69e8d34ddc9d3616 (patch) | |
tree | 4f39278207656a40106e7b31166c5b6822cd931f | |
parent | 0b7d343c7c16a73c72bc55b3507c1e7d1798c1db (diff) | |
download | volse-hubzilla-d40686e5d00b816bfa01282c69e8d34ddc9d3616.tar.gz volse-hubzilla-d40686e5d00b816bfa01282c69e8d34ddc9d3616.tar.bz2 volse-hubzilla-d40686e5d00b816bfa01282c69e8d34ddc9d3616.zip |
remove request command from notifier
-rw-r--r-- | Zotlabs/Daemon/Notifier.php | 36 | ||||
-rw-r--r-- | include/zot.php | 2 |
2 files changed, 4 insertions, 34 deletions
diff --git a/Zotlabs/Daemon/Notifier.php b/Zotlabs/Daemon/Notifier.php index 818512572..3b84896d8 100644 --- a/Zotlabs/Daemon/Notifier.php +++ b/Zotlabs/Daemon/Notifier.php @@ -15,14 +15,7 @@ require_once('include/bbcode.php'); /* - * This file was at one time responsible for doing all deliveries, but this caused - * big problems on shared hosting systems, where the process might get killed by the - * hosting provider and nothing would get delivered. - * It now only delivers one message under certain cases, and invokes a queued - * delivery mechanism (include/deliver.php) to deliver individual contacts at - * controlled intervals. - * This has a much better chance of surviving random processes getting killed - * by the hosting provider. + * Notifier - message dispatch and preparation for delivery * * The basic flow is: * Identify the type of message @@ -104,23 +97,7 @@ class Notifier { $normal_mode = true; $packet_type = 'undefined'; - if ($cmd === 'request') { - $channel_id = $item_id; - $xchan = $argv[3]; - $request_message_id = $argv[4]; - - $s = q("select * from channel where channel_id = %d limit 1", - intval($channel_id) - ); - if ($s) - $channel = $s[0]; - - $private = true; - $recipients[] = $xchan; - $packet_type = 'request'; - $normal_mode = false; - } - elseif ($cmd === 'keychange') { + if ($cmd === 'keychange') { $channel = channelx_by_n($item_id); $r = q("select abook_xchan from abook where abook_channel = %d", @@ -496,7 +473,6 @@ class Notifier { 'cmd' => $cmd, 'single' => (($cmd === 'single_activity') ? true : false), 'location' => $location, - 'request' => $request, 'normal_mode' => $normal_mode, 'packet_type' => $packet_type, 'walltowall' => $walltowall, @@ -640,7 +616,6 @@ class Notifier { 'cmd' => $cmd, 'single' => (($cmd === 'single_activity') ? true : false), 'location' => $location, - 'request' => $request, 'normal_mode' => $normal_mode, 'packet_type' => $packet_type, 'walltowall' => $walltowall, @@ -691,16 +666,11 @@ class Notifier { $packet = zot_build_packet($channel, $packet_type, (($packet_recips) ? $packet_recips : null)); } } + if ($packet_type === 'keychange' && $hub['hubloc_network'] === 'zot') { $pmsg = get_pconfig($channel['channel_id'], 'system', 'keychange'); $packet = zot_build_packet($channel, $packet_type, (($packet_recips) ? $packet_recips : null)); } - elseif ($packet_type === 'request' && $hub['hubloc_network'] === 'zot') { - $env = (($hub_env && $hub_env[$hub['hubloc_host'] . $hub['hubloc_sitekey']]) ? $hub_env[$hub['hubloc_host'] . $hub['hubloc_sitekey']] : ''); - $packet = zot_build_packet($channel, $packet_type, $env, $hub['hubloc_sitekey'], $hub['site_crypto'], - $hash, ['message_id' => $request_message_id] - ); - } if ($packet) { Queue::insert( diff --git a/include/zot.php b/include/zot.php index 634561fa3..5c1cde812 100644 --- a/include/zot.php +++ b/include/zot.php @@ -1907,7 +1907,7 @@ function process_delivery($sender, $arr, $deliveries, $relay, $public = false, $ if((! $relay) && (! $request) && (! $local_public) && perm_is_allowed($channel['channel_id'],$sender['hash'],'send_stream')) { - Zotlabs\Daemon\Master::Summon(array('Notifier', 'request', $channel['channel_id'], $sender['hash'], $arr['parent_mid'])); + //Zotlabs\Daemon\Master::Summon(array('Notifier', 'request', $channel['channel_id'], $sender['hash'], $arr['parent_mid'])); } continue; } |