streamline comment policy with downstream

This commit is contained in:
Mario
2022-03-23 19:01:42 +00:00
parent a41c7caa18
commit 62ac0ff21e
2 changed files with 6 additions and 34 deletions

View File

@@ -1073,21 +1073,6 @@ function encode_item($item,$mirror = false,$zap_compat = false) {
$x['type'] = 'activity';
$x['encoding'] = 'zot';
$r = q("select channel_id from channel where channel_id = %d limit 1",
intval($item['uid'])
);
if($r)
$comment_scope = PermissionLimits::Get($item['uid'],'post_comments');
else
$comment_scope = 0;
$scope = $item['public_policy'];
if(! $scope)
$scope = 'public';
$c_scope = map_scope($comment_scope);
$key = get_config('system','prvkey');
// If we're trying to backup an item so that it's recoverable or for export/imprt,
@@ -1180,10 +1165,7 @@ function encode_item($item,$mirror = false,$zap_compat = false) {
$x['public_scope'] = $scope;
if($item['item_nocomment'])
$x['comment_scope'] = 'none';
else
$x['comment_scope'] = $c_scope;
$x['comment_scope'] = $item['comment_policy'];
if(! empty($item['term']))
$x['tags'] = encode_item_terms($item['term'],$mirror);