aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2024-10-10 12:01:46 +0200
committerMario Vavti <mario@mariovavti.com>2024-10-10 12:01:46 +0200
commit2aee659cbdd147eca1c49385ea867ea11d2a72e5 (patch)
tree268d1a22184ae6d8b9db934b3efb15d01457f5ed /Zotlabs
parent44232677c85249b5ae7e83aa0e040586acf2c7cc (diff)
downloadvolse-hubzilla-2aee659cbdd147eca1c49385ea867ea11d2a72e5.tar.gz
volse-hubzilla-2aee659cbdd147eca1c49385ea867ea11d2a72e5.tar.bz2
volse-hubzilla-2aee659cbdd147eca1c49385ea867ea11d2a72e5.zip
also discard Add/Remove at the AP side
Diffstat (limited to 'Zotlabs')
-rw-r--r--Zotlabs/Lib/Activity.php25
1 files changed, 18 insertions, 7 deletions
diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php
index 1ea42acd3..90d7af8e8 100644
--- a/Zotlabs/Lib/Activity.php
+++ b/Zotlabs/Lib/Activity.php
@@ -3054,13 +3054,6 @@ class Activity {
}
$a = new ActivityStreams($n);
- if ($a->type === 'Announce' && is_array($a->obj)
- && array_key_exists('object', $a->obj) && array_key_exists('actor', $a->obj)) {
- // This is a relayed/forwarded Activity (as opposed to a shared/boosted object)
- // Reparse the encapsulated Activity and use that instead
- logger('relayed activity', LOGGER_DEBUG);
- $a = new ActivityStreams($a->obj);
- }
logger($a->debug(), LOGGER_DATA);
@@ -3069,6 +3062,24 @@ class Activity {
break;
}
+ if (in_array($a->type, ['Add', 'Remove'])
+ && is_array($a->obj)
+ && array_key_exists('object', $a->obj)
+ && array_key_exists('actor', $a->obj)
+ && !empty($a->tgt)) {
+
+ logger('unsupported collection operation', LOGGER_DEBUG);
+ return;
+ }
+
+ if ($a->type === 'Announce' && is_array($a->obj)
+ && array_key_exists('object', $a->obj) && array_key_exists('actor', $a->obj)) {
+ // This is a relayed/forwarded Activity (as opposed to a shared/boosted object)
+ // Reparse the encapsulated Activity and use that instead
+ logger('relayed activity', LOGGER_DEBUG);
+ $a = new ActivityStreams($a->obj);
+ }
+
$item = Activity::decode_note($a);
if (!$item) {