diff options
author | Mario Vavti <mario@mariovavti.com> | 2018-06-25 14:29:32 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2018-06-25 14:29:32 +0200 |
commit | 62610b5ec0bfe5edffc073eb06c609f33464d34f (patch) | |
tree | 7e9c0255eadcb88c0d4146de669bdf74835915ea /include/items.php | |
parent | 259417815820d85deadaf90f6c0ed003880f373f (diff) | |
parent | 07f004342848c633c8108f97238eff2c8eb1658b (diff) | |
download | volse-hubzilla-62610b5ec0bfe5edffc073eb06c609f33464d34f.tar.gz volse-hubzilla-62610b5ec0bfe5edffc073eb06c609f33464d34f.tar.bz2 volse-hubzilla-62610b5ec0bfe5edffc073eb06c609f33464d34f.zip |
Merge branch 'dev' of https://framagit.org/hubzilla/core into dev
Diffstat (limited to 'include/items.php')
-rwxr-xr-x | include/items.php | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/include/items.php b/include/items.php index 54df5d322..8e7a8df34 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)); @@ -2948,6 +2954,18 @@ function start_delivery_chain($channel, $item, $item_id, $parent) { } } } + + // This will change the author to the post owner. Useful for RSS feeds which are to be syndicated + // to federated platforms which can't verify the identity of the author. + // This MAY cause you to run afoul of copyright law. + + $rewrite_author = intval(get_abconfig($channel['channel_id'],$item['owner_xchan'],'system','rself')); + if($rewrite_author) { + $item['author_xchan'] = $item['owner_xchan']; + if($item['owner']) { + $item['author'] = $item['owner']; + } + } } // Change this copy of the post to a forum head message and deliver to all the tgroup members @@ -3008,8 +3026,6 @@ function start_delivery_chain($channel, $item, $item_id, $parent) { ); - - if($r) Zotlabs\Daemon\Master::Summon(array('Notifier','tgroup',$item_id)); else { |