From 96af21b5cf10b4aa5b48b061c8b10b2c5f54072a Mon Sep 17 00:00:00 2001 From: Mike Macgirvin Date: Wed, 31 Jan 2024 20:01:35 +1100 Subject: [PATCH 1/3] block activities that haven't been invented yet --- Code/Lib/Libzot.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Code/Lib/Libzot.php b/Code/Lib/Libzot.php index b8754939e..f1915a47d 100644 --- a/Code/Lib/Libzot.php +++ b/Code/Lib/Libzot.php @@ -1215,6 +1215,11 @@ class Libzot $AS = new ActivityStreams($AS->obj, portable_id: $env['sender']); } + if (in_array($AS->type, ['Add', 'Remove'])) { + logger('future acivity'); + return false; + } + if (!$AS->is_valid()) { logger('Activity rejected: ' . print_r($data, true)); return false; From 016f2be995e4a4959dc715229c80013d881389f5 Mon Sep 17 00:00:00 2001 From: Mike Macgirvin Date: Wed, 31 Jan 2024 20:12:03 +1100 Subject: [PATCH 2/3] remove collection filtering until it works correctly --- Code/Lib/Libzot.php | 6 ------ include/conversation.php | 6 +----- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/Code/Lib/Libzot.php b/Code/Lib/Libzot.php index f1915a47d..fc03bd610 100644 --- a/Code/Lib/Libzot.php +++ b/Code/Lib/Libzot.php @@ -1214,12 +1214,6 @@ class Libzot logger('relayed activity', LOGGER_DEBUG); $AS = new ActivityStreams($AS->obj, portable_id: $env['sender']); } - - if (in_array($AS->type, ['Add', 'Remove'])) { - logger('future acivity'); - return false; - } - if (!$AS->is_valid()) { logger('Activity rejected: ' . print_r($data, true)); return false; diff --git a/include/conversation.php b/include/conversation.php index 88f6f37fa..b9a79fc04 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -267,11 +267,7 @@ function visible_activity($item) if (intval($item['item_notshown'])) { return false; } - - if (in_array($item['verb'], ['Add', 'Remove'])) { - return false; - } - + // normal poll responses if ($item['obj_type'] === 'Answer') { return false; From 2aef006862c565a92c53ee3e9d5ca11749cdc185 Mon Sep 17 00:00:00 2001 From: Mike Macgirvin Date: Wed, 31 Jan 2024 20:29:16 +1100 Subject: [PATCH 3/3] found the issue - let's try again --- include/conversation.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/conversation.php b/include/conversation.php index b9a79fc04..cb239f884 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -267,7 +267,10 @@ function visible_activity($item) if (intval($item['item_notshown'])) { return false; } - + + if (in_array($item['verb'], ['Add', 'Remove'])) { + return false; + } // normal poll responses if ($item['obj_type'] === 'Answer') { return false;