From b9314935e6f85bb0098c651d021ce9bdc2753ecb Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 19 Aug 2013 19:05:11 -0700 Subject: localize_item() thinks all likes on posts are likes on comments because we didn't pass any info in the activity object to distinguish them from each other. --- include/conversation.php | 2 +- mod/like.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/conversation.php b/include/conversation.php index 6d551a5c9..aade06b8a 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -137,7 +137,7 @@ function localize_item(&$item){ case ACTIVITY_OBJ_NOTE: default: $post_type = t('status'); - if($obj['id'] != $item['mid']) + if($obj['mid'] != $obj['parent_mid']) $post_type = t('comment'); break; } diff --git a/mod/like.php b/mod/like.php index f617391a1..90005eca3 100755 --- a/mod/like.php +++ b/mod/like.php @@ -110,6 +110,7 @@ function like_content(&$a) { $obj = json_encode(array( 'type' => $objtype, 'id' => $item['mid'], + 'parent' => (($item['thr_parent']) ? $item['thr_parent'] : $item['parent_mid']), 'link' => $links, 'title' => $item['title'], 'content' => $item['body'], -- cgit v1.2.3