diff options
author | redmatrix <mike@macgirvin.com> | 2016-08-29 18:06:39 -0700 |
---|---|---|
committer | redmatrix <mike@macgirvin.com> | 2016-08-29 18:06:39 -0700 |
commit | 8b6230726fac986b96f0dc8405d30afe456605df (patch) | |
tree | ea53a5f0e19ddca9af73f8263a6dfa3ea7adc5d5 /include | |
parent | 6b4cfe4f180a10e3008356c3a4590ad313fa88dd (diff) | |
download | volse-hubzilla-8b6230726fac986b96f0dc8405d30afe456605df.tar.gz volse-hubzilla-8b6230726fac986b96f0dc8405d30afe456605df.tar.bz2 volse-hubzilla-8b6230726fac986b96f0dc8405d30afe456605df.zip |
add authors to post distribution; case insensitive sort apps
Diffstat (limited to 'include')
-rwxr-xr-x | include/items.php | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/include/items.php b/include/items.php index ac746c189..53a7b7927 100755 --- a/include/items.php +++ b/include/items.php @@ -113,6 +113,26 @@ function collect_recipients($item, &$private_envelope) { // if($policy === 'pub') // $recipients[] = $sys['xchan_hash']; } + + // Add the authors of any posts in this thread, if they are known to us. + // This is specifically designed to forward wall-to-wall posts to the original author, + // in case they aren't a connection but have permission to write on our wall. + // This is important for issue tracker channels. It should be a no-op for most channels. + // Whether or not they will accept the delivery is not determined here, but should + // be taken into account by zot:process_delivery() + + $r = q("select author_xchan from item where parent = %d", + intval($item['parent']) + ); + if($r) { + foreach($r as $rv) { + if(! in_array($rv['author_xchan'],$recipients)) { + $recipients[] = $rv['author_xchan']; + } + } + } + + } // This is a somewhat expensive operation but important. |