aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Zotlabs/Lib/Libzot.php10
1 files changed, 7 insertions, 3 deletions
diff --git a/Zotlabs/Lib/Libzot.php b/Zotlabs/Lib/Libzot.php
index 3f339a21a..a9b24974d 100644
--- a/Zotlabs/Lib/Libzot.php
+++ b/Zotlabs/Lib/Libzot.php
@@ -1876,12 +1876,16 @@ class Libzot {
dbesc($arr['author_xchan'])
);
- // Reactions such as like and dislike could have an mid with /activity/ in it.
- // Check for both forms in order to prevent duplicates.
+ // If we import an add/remove activity ($is_collection_operation) we strip off the
+ // add/remove part and only process the object.
+ // When looking up the item to pass it to the notifier for relay, we need to look up
+ // the original (stripped off) message id which we stored in $act->meta.
- // If we process an add/remove activity, look for the original activity id instead of the object id
$sql_mid = (($is_collection_operation && $relay && $channel['channel_hash'] === $arr['owner_xchan']) ? $act->meta['original_id'] : $arr['mid']);
+ // Reactions such as like and dislike could have an mid with /activity/ in it.
+ // Check for both forms in order to prevent duplicates.
+
$r = q("select * from item where mid in ('%s', '%s') and uid = %d limit 1",
dbesc($sql_mid),
dbesc(reverse_activity_mid($sql_mid)),