aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-11-18 20:34:47 -0800
committerfriendica <info@friendica.com>2014-11-18 20:34:47 -0800
commitefcbcd6f8809a7540bae6eb0a8c38c60def86537 (patch)
tree394263dac957ede28331a43985fd4e6a07d6c336 /include
parent3224848bad07fefec7ab830e70634740329ccae6 (diff)
downloadvolse-hubzilla-efcbcd6f8809a7540bae6eb0a8c38c60def86537.tar.gz
volse-hubzilla-efcbcd6f8809a7540bae6eb0a8c38c60def86537.tar.bz2
volse-hubzilla-efcbcd6f8809a7540bae6eb0a8c38c60def86537.zip
add sys channel to public recips if scope public
Diffstat (limited to 'include')
-rw-r--r--include/zot.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/zot.php b/include/zot.php
index 3ffc9b43f..837154ee8 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -1256,8 +1256,14 @@ function zot_import($arr, $sender_url) {
function public_recips($msg) {
+
+ require_once('include/identity.php');
+
$check_mentions = false;
+ $include_sys = false;
+
if($msg['message']['type'] === 'activity') {
+ $include_sys = true;
$col = 'channel_w_stream';
$field = PERMS_W_STREAM;
if(array_key_exists('flags',$msg['message']) && in_array('thread_parent', $msg['message']['flags'])) {
@@ -1307,6 +1313,12 @@ function public_recips($msg) {
$r = array_merge($r,$x);
+ if($include_sys && array_key_exists('public_scope',$msg['message']) && $msg['message']['public_scope'] === 'public') {
+ $sys = get_sys_channel();
+ if($sys)
+ $r[] = array('hash' => $sys['channel_hash']);
+ }
+
// look for any public mentions on this site
// They will get filtered by tgroup_check() so we don't need to check permissions now