aboutsummaryrefslogtreecommitdiffstats
path: root/include/conversation.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2015-02-11 15:26:35 -0800
committerfriendica <info@friendica.com>2015-02-11 15:26:35 -0800
commit8c061f143f7e019fdea3a2a03d96fc4ec8e39edd (patch)
treeb1785617fc94741f93b8b41116fc5c538c2de5da /include/conversation.php
parent3f76cbf40b57b34f32a64435ca125c0576985c34 (diff)
downloadvolse-hubzilla-8c061f143f7e019fdea3a2a03d96fc4ec8e39edd.tar.gz
volse-hubzilla-8c061f143f7e019fdea3a2a03d96fc4ec8e39edd.tar.bz2
volse-hubzilla-8c061f143f7e019fdea3a2a03d96fc4ec8e39edd.zip
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.
Diffstat (limited to 'include/conversation.php')
-rw-r--r--include/conversation.php6
1 files changed, 6 insertions, 0 deletions
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;
}
}