From 8c061f143f7e019fdea3a2a03d96fc4ec8e39edd Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 11 Feb 2015 15:26:35 -0800 Subject: more efficient processing of response activities, plus a proof of concept fix for the problem of receiving a delete notification before we actually get the item which we're supposed to delete. --- include/conversation.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include/conversation.php') diff --git a/include/conversation.php b/include/conversation.php index 0af603ca9..ea7719d4b 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -972,7 +972,10 @@ function item_photo_menu($item){ */ function builtin_activity_puller($item, &$conv_responses) { + // if this item is a post or comment there's nothing for us to do here, just return. + if(activity_match($item['verb'],ACTIVITY_POST)) + return; foreach($conv_responses as $mode => $v) { @@ -1036,6 +1039,9 @@ function builtin_activity_puller($item, &$conv_responses) { $conv_responses[$mode][$item['thr_parent']] ++; $conv_responses[$mode][$item['thr_parent'] . '-l'][] = $url; + + // there can only be one activity verb per item so if we found anything, we can stop looking + $return; } } -- cgit v1.2.3