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 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/conversation.php') 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; } -- cgit v1.2.3 From 02a36948685737afdbbb9a292a338b304bb5cc04 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 20 Aug 2013 19:51:58 -0700 Subject: fix superblock for comments --- include/conversation.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'include/conversation.php') diff --git a/include/conversation.php b/include/conversation.php index aade06b8a..9dab5931b 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -712,6 +712,8 @@ function conversation(&$a, $items, $mode, $update, $page_mode = 'traditional') { $threads = array(); foreach($items as $item) { + // Check for any blocked authors + if($arr_blocked) { $blocked = false; foreach($arr_blocked as $b) { @@ -724,6 +726,18 @@ function conversation(&$a, $items, $mode, $update, $page_mode = 'traditional') { continue; } + // Check all the kids too + + if($arr_blocked && $item['children']) { + for($d = 0; $d < count($item['children']); $d ++) { + foreach($arr_blocked as $b) { + if(($b) && ($item['children'][$d]['author_xchan'] == $b)) + $item['children'][$d]['author_blocked'] = true; + } + } + } + + // Can we put this after the visibility check? like_puller($a,$item,$alike,'like'); -- cgit v1.2.3 From 99a9aee03e55af84f6963bbdbe3e365a7721e93d Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 22 Aug 2013 06:15:00 -0700 Subject: extra logging for translating likes in notification emails - which is still failing on occasion. --- include/conversation.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/conversation.php') diff --git a/include/conversation.php b/include/conversation.php index 9dab5931b..6e6ffef94 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -162,6 +162,9 @@ function localize_item(&$item){ $item['body'] .= "\n\n\n" . '[zrl=' . chanlink_url($author_link) . '][zmg=80x80]' . $Bphoto . '[/zmg][/zrl]'; } + else { + logger('localize_item like failed: link ' . $author_link . ' name ' . $author_name . ' url ' . $item_url); + } } -- cgit v1.2.3