don't import to sys channel from self-censored authors

This commit is contained in:
friendica
2014-12-12 00:26:07 -08:00
parent 7f1a42340a
commit 452d275b5e
83 changed files with 1882 additions and 1639 deletions

View File

@@ -1433,9 +1433,19 @@ function process_delivery($sender,$arr,$deliveries,$relay,$public = false,$reque
$channel = $r[0];
// allow public postings to the sys channel regardless of permissions
if(($channel['channel_pageflags'] & PAGE_SYSTEM) && (! $arr['item_private']))
if(($channel['channel_pageflags'] & PAGE_SYSTEM) && (! $arr['item_private'])) {
$local_public = true;
$r = q("select xchan_flags from xchan where xchan_hash = '%s' limit 1",
dbesc($sender['hash'])
);
// don't import sys channel posts from selfcensored authors
if($r && ($r[0]['xchan_flags'] & XCHAN_FLAGS_SELFCENSORED)) {
$local_public = false;
continue;
}
}
$tag_delivery = tgroup_check($channel['channel_id'],$arr);
$perm = (($arr['mid'] == $arr['parent_mid']) ? 'send_stream' : 'post_comments');