From 9f5dfe797bb8c68b7ba4935abe87f355bd56f04f Mon Sep 17 00:00:00 2001 From: redmatrix Date: Sun, 2 Aug 2015 17:38:34 -0700 Subject: begin moving diaspora to plugin --- include/notifier.php | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) (limited to 'include/notifier.php') diff --git a/include/notifier.php b/include/notifier.php index e4cfbd85d..62aea4106 100644 --- a/include/notifier.php +++ b/include/notifier.php @@ -113,11 +113,9 @@ function notifier_run($argv, $argc){ intval($r[0]['abook_channel']) ); if($s) { - if($r[0]['hubloc_network'] === 'diaspora' || $r[0]['hubloc_network'] === 'friendica-over-diaspora') { - require_once('include/diaspora.php'); - diaspora_share($s[0],$r[0]); - } - else { + $perm_update = array('sender' => $s[0], 'recipient' => $r[0], 'success' => false); + call_hooks('permissions_update',$perm_update); + if(! $perm_update['success']) { // send a refresh message to each hub they have registered here $h = q("select * from hubloc where hubloc_hash = '%s' and not (hubloc_flags & %d) > 0 and not (hubloc_status & %d) > 0", @@ -606,18 +604,9 @@ function notifier_run($argv, $argc){ foreach($dhubs as $hub) { - if($hub['hubloc_network'] === 'diaspora' || $hub['hubloc_network'] === 'friendica-over-diaspora') { - if(! get_config('system','diaspora_enabled')) - continue; - - // allow this to be set per message - - if(strpos($target_item['postopts'],'nodspr') !== false) - continue; - - require_once('include/diaspora.php'); + if($hub['hubloc_network'] !== 'zot') { - diaspora_process_outbound(array( + $narr = array( 'channel' => $channel, 'env_recips' => $env_recips, 'recipients' => $recipients, @@ -638,13 +627,14 @@ function notifier_run($argv, $argc){ 'normal_mode' => $normal_mode, 'packet_type' => $packet_type, 'walltowall' => $walltowall - )); + ); + + call_hooks('notifier_hub',$narr); continue; } - // default: zot protocol -- cgit v1.2.3