more debugging on localize_item top find out why likes are not translated in notifications, but are in displayed posts (using 'new' on matrix page) - in one case we're successfully pulling stuff from item['object'] and in the other we aren't - and it's the same object.

This commit is contained in:
friendica
2013-08-31 04:19:26 -07:00
parent 7458263017
commit d43a765985
66 changed files with 1658 additions and 1364 deletions

View File

@@ -92,8 +92,14 @@ function item_redir_and_replace_images($body, $images, $cid) {
function localize_item(&$item){
if (activity_match($item['verb'],ACTIVITY_LIKE) || activity_match($item['verb'],ACTIVITY_DISLIKE)){
if(! $item['object'])
return;
$obj = json_decode_plus($item['object']);
if((! $obj) && ($item['object'])) {
logger('localize_item: failed to decode object: ' . print_r($item['object'],true));
}
if($obj['author'] && $obj['author']['link'])
$author_link = get_rel_link($obj['author']['link'],'alternate');