over-ride the private flag if we received a post that isn't completely public, but they didn't set the private flag.
This commit is contained in:
parent
640dbdf5e9
commit
f412f6a654
@ -1227,6 +1227,18 @@ function zot_import($arr, $sender_url) {
|
|||||||
|
|
||||||
$deliveries = allowed_public_recips($i);
|
$deliveries = allowed_public_recips($i);
|
||||||
|
|
||||||
|
// if the scope is anything but 'public' we're going to store it as private regardless
|
||||||
|
// of the private flag on the post.
|
||||||
|
|
||||||
|
if($i['message'] && array_key_exists('public_scope',$i['message'])
|
||||||
|
&& $i['message']['public_scope'] === 'public') {
|
||||||
|
|
||||||
|
if(! array_key_exists('flags',$i['message']))
|
||||||
|
$i['message']['flags'] = array();
|
||||||
|
if(! in_array('private',$i['message']['flags']))
|
||||||
|
$i['message']['flags'][] = 'private';
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Go through the hash array and remove duplicates. array_unique() won't do this because the array is more than one level.
|
// Go through the hash array and remove duplicates. array_unique() won't do this because the array is more than one level.
|
||||||
|
Reference in New Issue
Block a user