diff options
author | Mario <mario@mariovavti.com> | 2025-04-10 13:00:57 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2025-04-10 13:03:11 +0000 |
commit | 7c79ec962684043abfcca4625d100e2f5caea45d (patch) | |
tree | bab753a6660a72ca95afe2d7b274a189e67c0b3b /Zotlabs | |
parent | 66f793cb836d2c4f20c7048672865a11b82d96a9 (diff) | |
download | volse-hubzilla-7c79ec962684043abfcca4625d100e2f5caea45d.tar.gz volse-hubzilla-7c79ec962684043abfcca4625d100e2f5caea45d.tar.bz2 volse-hubzilla-7c79ec962684043abfcca4625d100e2f5caea45d.zip |
fix an obscure delivering issue which incidentally also fixes a delivering issue that required an ugly hack to work aroundHEADdev
Diffstat (limited to 'Zotlabs')
-rw-r--r-- | Zotlabs/Daemon/Notifier.php | 4 | ||||
-rw-r--r-- | Zotlabs/Lib/Libzot.php | 15 |
2 files changed, 6 insertions, 13 deletions
diff --git a/Zotlabs/Daemon/Notifier.php b/Zotlabs/Daemon/Notifier.php index b32a047a3..9fdb1defb 100644 --- a/Zotlabs/Daemon/Notifier.php +++ b/Zotlabs/Daemon/Notifier.php @@ -346,6 +346,10 @@ class Notifier { $relay_to_owner = (!$top_level_post && intval($target_item['item_origin']) && comment_local_origin($target_item)); + if (self::$channel['channel_hash'] === $target_item['owner_xchan']) { + $relay_to_owner = false; + } + // $cmd === 'relay' indicates the owner is sending it to the original recipients // don't allow the item in the relay command to relay to owner under any circumstances, it will loop diff --git a/Zotlabs/Lib/Libzot.php b/Zotlabs/Lib/Libzot.php index 60fb5e034..57c110d8b 100644 --- a/Zotlabs/Lib/Libzot.php +++ b/Zotlabs/Lib/Libzot.php @@ -1169,10 +1169,6 @@ class Libzot { $raw_activity = $AS->data; $AS = new ActivityStreams($raw_activity['object'], portable_id: $env['sender']); - - // Store the original activity id and type for later usage - $AS->meta['original_id'] = $original_id; - $AS->meta['original_type'] = $original_type; } if (is_array($AS->obj)) { @@ -1853,19 +1849,12 @@ class Libzot { dbesc($arr['author_xchan']) ); - // 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. - - $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)), + dbesc($arr['mid']), + dbesc(reverse_activity_mid($arr['mid'])), intval($channel['channel_id']) ); |