aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Daemon/Notifier.php
diff options
context:
space:
mode:
Diffstat (limited to 'Zotlabs/Daemon/Notifier.php')
-rw-r--r--Zotlabs/Daemon/Notifier.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/Zotlabs/Daemon/Notifier.php b/Zotlabs/Daemon/Notifier.php
index 4ca109495..23bddae8f 100644
--- a/Zotlabs/Daemon/Notifier.php
+++ b/Zotlabs/Daemon/Notifier.php
@@ -630,6 +630,18 @@ class Notifier {
// default: zot protocol
+ // Prevent zot6 delivery of group comment boosts, which are not required for conversational platforms.
+ // ActivityPub conversational platforms may wish to filter these if they don't want or require them.
+ // We will assume here that if $target_item exists and has a verb that it is an actual item structure
+ // so we won't need to check the existence of the other item fields prior to evaluation.
+
+ // This shouldn't produce false positives on comment boosts that were generated on other platforms
+ // because we won't be delivering them.
+
+ if (isset($target_item) && isset($target_item['verb']) && $target_item['verb'] === 'Announce' && $target_item['author_xchan'] === $target_item['owner_xchan'] && ! intval($target_item['item_thread_top'])) {
+ continue;
+ }
+
$hash = new_uuid();
$env = (($hub_env && $hub_env[$hub['hubloc_site_id']]) ? $hub_env[$hub['hubloc_site_id']] : '');