issue #176, sender copy of item not obscured if using private mention

This commit is contained in:
friendica 2015-04-20 20:14:07 -07:00
parent 3eeea9d8f0
commit 53339d19a3
2 changed files with 4 additions and 2 deletions

View File

@ -4813,7 +4813,7 @@ function item_remove_cid($xchan_hash,$mid,$uid) {
} }
// Set item permissions based on results obtained from linkify_tags() // Set item permissions based on results obtained from linkify_tags()
function set_linkified_perms($linkified, &$str_contact_allow, &$str_group_allow, $profile_uid, $parent_item = false) { function set_linkified_perms($linkified, &$str_contact_allow, &$str_group_allow, $profile_uid, $parent_item = false, &$private) {
$first_access_tag = true; $first_access_tag = true;
foreach($linkified as $x) { foreach($linkified as $x) {
@ -4835,10 +4835,12 @@ function set_linkified_perms($linkified, &$str_contact_allow, &$str_group_allow,
if(strpos($access_tag,'cid:') === 0) { if(strpos($access_tag,'cid:') === 0) {
$str_contact_allow .= '<' . substr($access_tag,4) . '>'; $str_contact_allow .= '<' . substr($access_tag,4) . '>';
$access_tag = ''; $access_tag = '';
$private = 1;
} }
elseif(strpos($access_tag,'gid:') === 0) { elseif(strpos($access_tag,'gid:') === 0) {
$str_group_allow .= '<' . substr($access_tag,4) . '>'; $str_group_allow .= '<' . substr($access_tag,4) . '>';
$access_tag = ''; $access_tag = '';
$private = 1;
} }
} }
} }

View File

@ -602,7 +602,7 @@ function item_post(&$a) {
if($results) { if($results) {
// Set permissions based on tag replacements // Set permissions based on tag replacements
set_linkified_perms($results, $str_contact_allow, $str_group_allow, $profile_uid, $parent_item); set_linkified_perms($results, $str_contact_allow, $str_group_allow, $profile_uid, $parent_item, $private);
$post_tags = array(); $post_tags = array();
foreach($results as $result) { foreach($results as $result) {