diff options
author | zotlabs <mike@macgirvin.com> | 2019-01-16 16:52:21 -0800 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2019-01-16 16:52:21 -0800 |
commit | 7e29bd10b6a59bc9c1700cfb84dbefb6a8930153 (patch) | |
tree | ac49731f7ed9a5071bd4fcf76faaa2003204064c /include/items.php | |
parent | 20eea2184bc1336efb811c29e3fb49262ae02262 (diff) | |
parent | de8582ec07d125bf1c7f08cc3d695c33aaaf9d85 (diff) | |
download | volse-hubzilla-7e29bd10b6a59bc9c1700cfb84dbefb6a8930153.tar.gz volse-hubzilla-7e29bd10b6a59bc9c1700cfb84dbefb6a8930153.tar.bz2 volse-hubzilla-7e29bd10b6a59bc9c1700cfb84dbefb6a8930153.zip |
Merge branch 'dev' of https://framagit.org/hubzilla/core into xdev_merge
Diffstat (limited to 'include/items.php')
-rwxr-xr-x | include/items.php | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/include/items.php b/include/items.php index 02d31fcb5..e5f2be003 100755 --- a/include/items.php +++ b/include/items.php @@ -95,9 +95,24 @@ function collect_recipients($item, &$private_envelope,$include_groups = true) { //$sys = get_sys_channel(); if(array_key_exists('public_policy',$item) && $item['public_policy'] !== 'self') { - $r = q("select abook_xchan, xchan_network from abook left join xchan on abook_xchan = xchan_hash where abook_channel = %d and abook_self = 0 and abook_pending = 0 and abook_archived = 0 ", + + $hookinfo = [ + 'recipients' => [], + 'item' => $item, + 'private_envelope' => $private_envelope, + 'include_groups' => $include_groups + ]; + + call_hooks('collect_public_recipients',$hookinfo); + + if ($hookinfo['recipients']) { + $r = $hookinfo['recipients']; + } else { + $r = q("select abook_xchan, xchan_network from abook left join xchan on abook_xchan = xchan_hash where abook_channel = %d and abook_self = 0 and abook_pending = 0 and abook_archived = 0 ", intval($item['uid']) - ); + ); + } + if($r) { // filter out restrictive public_policy settings from remote networks |