aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib/ActivityStreams.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2022-06-01 07:00:21 +0000
committerMario <mario@mariovavti.com>2022-06-01 07:00:21 +0000
commite63f0438415bb364f3085286ca2f199e83ab187b (patch)
treeb107429276ebfc92dc9b4f78e302a4967e5bf0a6 /Zotlabs/Lib/ActivityStreams.php
parentc5f33baf27d80e2a7ad7307eacd3137609eeb089 (diff)
parent33dd0c83e377b8adf00559337d13784ec136cecb (diff)
downloadvolse-hubzilla-e63f0438415bb364f3085286ca2f199e83ab187b.tar.gz
volse-hubzilla-e63f0438415bb364f3085286ca2f199e83ab187b.tar.bz2
volse-hubzilla-e63f0438415bb364f3085286ca2f199e83ab187b.zip
Merge branch '7.4RC'7.4
Diffstat (limited to 'Zotlabs/Lib/ActivityStreams.php')
-rw-r--r--Zotlabs/Lib/ActivityStreams.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/Zotlabs/Lib/ActivityStreams.php b/Zotlabs/Lib/ActivityStreams.php
index 1c278f2ee..e77b501b3 100644
--- a/Zotlabs/Lib/ActivityStreams.php
+++ b/Zotlabs/Lib/ActivityStreams.php
@@ -70,9 +70,12 @@ class ActivityStreams {
}
}
+ // This indicates only that we have sucessfully decoded JSON.
$this->valid = true;
- if (array_key_exists('type', $this->data) && array_key_exists('actor', $this->data) && array_key_exists('object', $this->data)) {
+ // Special handling for Mastodon "delete actor" activities which will often fail to verify
+ // because the key cannot be fetched. We will catch this condition elsewhere.
+ if (is_array($this->data) && array_key_exists('type', $this->data) && array_key_exists('actor', $this->data) && array_key_exists('object', $this->data)) {
if ($this->data['type'] === 'Delete' && $this->data['actor'] === $this->data['object']) {
$this->deleted = $this->data['actor'];
$this->valid = false;
@@ -81,6 +84,7 @@ class ActivityStreams {
}
+ // Attempt to assemble an Activity from what we were given.
if ($this->is_valid()) {
$this->id = $this->get_property_obj('id');
$this->type = $this->get_primary_type();