aboutsummaryrefslogtreecommitdiffstats
path: root/include/notifier.php
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-08-02 17:38:34 -0700
committerredmatrix <redmatrix@redmatrix.me>2015-08-02 17:38:34 -0700
commit9f5dfe797bb8c68b7ba4935abe87f355bd56f04f (patch)
treea1cd59eb387b298bb261d28955a4d858cc037586 /include/notifier.php
parent49532aa6dd63d2f3fd95a0e20c0dd0529b320ed5 (diff)
downloadvolse-hubzilla-9f5dfe797bb8c68b7ba4935abe87f355bd56f04f.tar.gz
volse-hubzilla-9f5dfe797bb8c68b7ba4935abe87f355bd56f04f.tar.bz2
volse-hubzilla-9f5dfe797bb8c68b7ba4935abe87f355bd56f04f.zip
begin moving diaspora to plugin
Diffstat (limited to 'include/notifier.php')
-rw-r--r--include/notifier.php26
1 files changed, 8 insertions, 18 deletions
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