provide flag to collect_recipients to exclude privacy groups (for federation plugin use)
This commit is contained in:
parent
36d73b3da9
commit
f801f52274
@ -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']);
|
||||
|
||||
if($include_groups) {
|
||||
$allow_groups = expand_groups(expand_acl($item['allow_gid']));
|
||||
}
|
||||
else {
|
||||
$allow_groups = [];
|
||||
}
|
||||
|
||||
$recipients = array_unique(array_merge($allow_people,$allow_groups));
|
||||
|
||||
|
Reference in New Issue
Block a user