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:
friendica 2014-08-07 17:49:57 -07:00
parent 640dbdf5e9
commit f412f6a654

View File

@ -1227,6 +1227,18 @@ function zot_import($arr, $sender_url) {
$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.