From d43a7659854c4bb6052c05a932b257883ea72748 Mon Sep 17 00:00:00 2001 From: friendica Date: Sat, 31 Aug 2013 04:19:26 -0700 Subject: 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. --- include/conversation.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'include/conversation.php') diff --git a/include/conversation.php b/include/conversation.php index 82010b153..2157f8291 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -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'); -- cgit v1.2.3