diff options
author | Mario Vavti <mario@mariovavti.com> | 2024-10-10 15:10:51 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2024-10-10 15:10:51 +0200 |
commit | a1818b1a29974132e16fb68c65c1b3a9904a5b18 (patch) | |
tree | cbf0c71a657f398361b92df93521a6d045bc5878 | |
parent | e8eb283fd84cb1dfd83b7138149a75511ea8b581 (diff) | |
download | volse-hubzilla-a1818b1a29974132e16fb68c65c1b3a9904a5b18.tar.gz volse-hubzilla-a1818b1a29974132e16fb68c65c1b3a9904a5b18.tar.bz2 volse-hubzilla-a1818b1a29974132e16fb68c65c1b3a9904a5b18.zip |
document some special handling
-rw-r--r-- | Zotlabs/Lib/Libzot.php | 10 |
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)), |