aboutsummaryrefslogtreecommitdiffstats
path: root/include/notifier.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/notifier.php')
-rw-r--r--include/notifier.php9
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'];