diff options
author | redmatrix <git@macgirvin.com> | 2016-02-10 19:12:28 -0800 |
---|---|---|
committer | redmatrix <git@macgirvin.com> | 2016-02-10 19:12:28 -0800 |
commit | d31d3df4eafcc3e80f120fc4b23ced2e2ed4969d (patch) | |
tree | 9453fa4a8d4810ea0d4318b50c0464243c7df901 /include | |
parent | 91801d2e2c38ba709fa8fa0226d121d82149d3c5 (diff) | |
download | volse-hubzilla-d31d3df4eafcc3e80f120fc4b23ced2e2ed4969d.tar.gz volse-hubzilla-d31d3df4eafcc3e80f120fc4b23ced2e2ed4969d.tar.bz2 volse-hubzilla-d31d3df4eafcc3e80f120fc4b23ced2e2ed4969d.zip |
hook changes to support pubsubhubbub
Diffstat (limited to 'include')
-rw-r--r-- | include/notifier.php | 34 | ||||
-rw-r--r-- | include/queue_fn.php | 2 |
2 files changed, 32 insertions, 4 deletions
diff --git a/include/notifier.php b/include/notifier.php index 5260e629f..93cc77a1c 100644 --- a/include/notifier.php +++ b/include/notifier.php @@ -423,6 +423,7 @@ function notifier_run($argv, $argc){ $details = q("select xchan_hash, xchan_instance_url, xchan_network, xchan_addr, xchan_guid, xchan_guid_sig from xchan where xchan_hash in (" . implode(',',$recipients) . ")"); + $recip_list = array(); if($details) { @@ -437,12 +438,39 @@ function notifier_run($argv, $argc){ if(! $delivery_options) format_and_send_email($channel,$d,$target_item); } + } + } - - } + $narr = array( + 'channel' => $channel, + 'env_recips' => $env_recips, + 'packet_recips' => $packet_recips, + 'recipients' => $recipients, + 'item' => $item, + 'target_item' => $target_item, + 'top_level_post' => $top_level_post, + 'private' => $private, + 'followup' => $followup, + 'relay_to_owner' => $relay_to_owner, + 'uplink' => $uplink, + 'cmd' => $cmd, + 'mail' => $mail, + 'location' => $location, + 'request' => $request, + 'normal_mode' => $normal_mode, + 'packet_type' => $packet_type, + 'walltowall' => $walltowall, + 'queued' => array() + ); + + call_hooks('notifier_process', $narr); + if($narr['queued']) { + foreach($narr['queued'] as $pq) + $deliveries[] = $pq; } + if(($private) && (! $env_recips)) { // shouldn't happen logger('notifier: private message with no envelope recipients.' . print_r($argv,true), LOGGER_NORMAL, LOG_NOTICE); @@ -504,7 +532,7 @@ function notifier_run($argv, $argc){ } logger('notifier: will notify/deliver to these hubs: ' . print_r($hublist,true), LOGGER_DEBUG, LOG_DEBUG); - + foreach($dhubs as $hub) { diff --git a/include/queue_fn.php b/include/queue_fn.php index 0708aab56..3112a832b 100644 --- a/include/queue_fn.php +++ b/include/queue_fn.php @@ -101,7 +101,7 @@ function queue_deliver($outq, $immediate = false) { } } - $arr = array('outq' => $outq, 'handled' => false, 'immediate' => $immediate); + $arr = array('outq' => $outq, 'base' => $base, 'handled' => false, 'immediate' => $immediate); call_hooks('queue_deliver',$arr); if($arr['handled']) return; |