re-obscure item body if localize_item() changes it. It's already flagged as obscured so we need it to actually be obscured.

This commit is contained in:
friendica 2014-08-25 02:14:48 -07:00
parent e0ee66d0b4
commit 86fb165dc9
2 changed files with 14 additions and 1 deletions

View File

@ -262,6 +262,8 @@ function localize_item(&$item){
$item['body'] = sprintf($txt, $A, t($verb));
}
/*
// FIXME store parent item as object or target
// (and update to json storage)
@ -363,6 +365,17 @@ function localize_item(&$item){
// if($sparkle)
// $item['plink'] = $y . '?f=&url=' . $item['plink'];
// }
// if item body was obscured and we changed it, re-obscure it
// FIXME - we need a better filter than just the string 'data'; try and
// match the fact that it's json encoded
if(($item['item_flags'] & ITEM_OBSCURED)
&& strlen($item['body']) && (! strpos($item['body'],'data'))) {
$item['body'] = json_encode(crypto_encapsulate($item['body'],get_config('system','pubkey')));
}
}
/**

View File

@ -1 +1 @@
2014-08-24.777
2014-08-25.778