aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Daemon/Notifier.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-09-24 16:59:56 -0700
committerzotlabs <mike@macgirvin.com>2017-09-24 16:59:56 -0700
commit8b7ab90836ef313e7eaf0a3fd1f29ad8ab1a716c (patch)
tree04add36aa35ce8cda58c5594a783737b25346175 /Zotlabs/Daemon/Notifier.php
parent4d3b0577c9538644ca0eeb2751b285521d2cc86d (diff)
parent866dc9a9b3ca1cd98fc032afe0aec14ccdb86ba0 (diff)
downloadvolse-hubzilla-8b7ab90836ef313e7eaf0a3fd1f29ad8ab1a716c.tar.gz
volse-hubzilla-8b7ab90836ef313e7eaf0a3fd1f29ad8ab1a716c.tar.bz2
volse-hubzilla-8b7ab90836ef313e7eaf0a3fd1f29ad8ab1a716c.zip
Merge branch 'master' into tagging
Diffstat (limited to 'Zotlabs/Daemon/Notifier.php')
-rw-r--r--Zotlabs/Daemon/Notifier.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/Zotlabs/Daemon/Notifier.php b/Zotlabs/Daemon/Notifier.php
index 0e8c99572..5f8490b06 100644
--- a/Zotlabs/Daemon/Notifier.php
+++ b/Zotlabs/Daemon/Notifier.php
@@ -59,6 +59,8 @@ require_once('include/bbcode.php');
*
* ZOT
* permission_create abook_id
+ * permission_accept abook_id
+ * permission_reject abook_id
* permission_update abook_id
* refresh_all channel_id
* purge_all channel_id
@@ -159,7 +161,7 @@ class Notifier {
$packet_type = 'keychange';
$normal_mode = false;
}
- elseif($cmd == 'permission_update' || $cmd == 'permission_create') {
+ elseif(in_array($cmd, [ 'permission_update', 'permission_reject', 'permission_accept', 'permission_create' ])) {
// Get the (single) recipient
$r = q("select * from abook left join xchan on abook_xchan = xchan_hash where abook_id = %d and abook_self = 0",
intval($item_id)
@@ -171,8 +173,12 @@ class Notifier {
if($channel) {
$perm_update = array('sender' => $channel, 'recipient' => $r[0], 'success' => false, 'deliveries' => '');
- if($cmd == 'permission_create')
+ if($cmd === 'permission_create')
call_hooks('permissions_create',$perm_update);
+ elseif($cmd === 'permission_accept')
+ call_hooks('permissions_accept',$perm_update);
+ elseif($cmd === 'permission_reject')
+ call_hooks('permissions_reject',$perm_update);
else
call_hooks('permissions_update',$perm_update);