aboutsummaryrefslogtreecommitdiffstats
path: root/mod/like.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/like.php')
-rwxr-xr-xmod/like.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/mod/like.php b/mod/like.php
index cfd848636..d3b6f3ecf 100755
--- a/mod/like.php
+++ b/mod/like.php
@@ -303,7 +303,7 @@ function like_content(&$a) {
$multi_undo = 1;
}
- $r = q("SELECT id, parent, uid FROM item WHERE verb in ( $verbs ) AND item_restrict = 0
+ $r = q("SELECT id, parent, uid, verb FROM item WHERE verb in ( $verbs ) AND item_restrict = 0
AND author_xchan = '%s' AND ( parent = %d OR thr_parent = '%s') and uid = %d ",
dbesc($observer['xchan_hash']),
intval($item_id),
@@ -322,6 +322,10 @@ function like_content(&$a) {
intval($rr['parent']),
intval($rr['uid'])
);
+ // Prior activity was a duplicate of the one we're submitting, just undo it;
+ // don't fall through and create another
+ if(activity_match($rr['verb'],$activity))
+ $multi_undo = false;
}
if($interactive)