diff options
author | redmatrix <redmatrix@redmatrix.me> | 2015-10-18 20:13:12 -0700 |
---|---|---|
committer | redmatrix <redmatrix@redmatrix.me> | 2015-10-18 20:13:12 -0700 |
commit | f0a33c00bc7f60f986edc53f3fa98d8b270f978a (patch) | |
tree | 5a9d68f3786143ccc632385edf9cad81b8448165 /include/notifier.php | |
parent | 9b3662e5adc58172c6923c1879b226bc208e9ec4 (diff) | |
download | volse-hubzilla-f0a33c00bc7f60f986edc53f3fa98d8b270f978a.tar.gz volse-hubzilla-f0a33c00bc7f60f986edc53f3fa98d8b270f978a.tar.bz2 volse-hubzilla-f0a33c00bc7f60f986edc53f3fa98d8b270f978a.zip |
separate permission_update notification into permission_create and permission_update, since some networks send out a notification for duplicate share requests even if connected.
Diffstat (limited to 'include/notifier.php')
-rw-r--r-- | include/notifier.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/include/notifier.php b/include/notifier.php index 2676f20d9..b7cea629d 100644 --- a/include/notifier.php +++ b/include/notifier.php @@ -108,7 +108,7 @@ function notifier_run($argv, $argc){ } - if($cmd == 'permission_update') { + if($cmd == 'permission_update' || $cmd == 'permission_create') { // Get the recipient $r = q("select abook.*, hubloc.* from abook left join hubloc on hubloc_hash = abook_xchan @@ -126,7 +126,12 @@ function notifier_run($argv, $argc){ ); if($s) { $perm_update = array('sender' => $s[0], 'recipient' => $r[0], 'success' => false, 'deliveries' => ''); - call_hooks('permissions_update',$perm_update); + + if($cmd == 'permission_create']) + call_hooks('permissions_create',$perm_update); + else + call_hooks('permissions_update',$perm_update); + if($perm_update['success'] && $perm_update['deliveries']) $deliveries[] = $perm_update['deliveries']; |