From f801f5227459564888a0d35fd65a1d2c4c685df3 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Mon, 18 Jun 2018 17:07:20 -0700 Subject: provide flag to collect_recipients to exclude privacy groups (for federation plugin use) --- include/items.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'include/items.php') diff --git a/include/items.php b/include/items.php index caf70b294..51a26f78c 100755 --- a/include/items.php +++ b/include/items.php @@ -19,9 +19,10 @@ require_once('include/permissions.php'); * * @param array $item * @param[out] boolean $private_envelope + * @param boolean $include_groups * @return array containing the recipients */ -function collect_recipients($item, &$private_envelope) { +function collect_recipients($item, &$private_envelope,$include_groups = true) { require_once('include/group.php'); @@ -34,7 +35,12 @@ function collect_recipients($item, &$private_envelope) { $allow_people = expand_acl($item['allow_cid']); - $allow_groups = expand_groups(expand_acl($item['allow_gid'])); + if($include_groups) { + $allow_groups = expand_groups(expand_acl($item['allow_gid'])); + } + else { + $allow_groups = []; + } $recipients = array_unique(array_merge($allow_people,$allow_groups)); -- cgit v1.2.3