aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib/ActivityStreams.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2022-10-10 18:05:26 +0000
committerMario <mario@mariovavti.com>2022-10-10 18:05:26 +0000
commitef2448e17e742e7dcef458993bce1e0a29756aa7 (patch)
treed23c62753abbb42e7bb742f2d44d09321b6f2eee /Zotlabs/Lib/ActivityStreams.php
parent6ab65519a0fc3e55ad5f32ce1641190ef609a4e2 (diff)
parent99a5cf1ad4660a31af6c03e5a1abc3d374f82c78 (diff)
downloadvolse-hubzilla-7.8.tar.gz
volse-hubzilla-7.8.tar.bz2
volse-hubzilla-7.8.zip
Merge branch '7.8RC'7.8
Diffstat (limited to 'Zotlabs/Lib/ActivityStreams.php')
-rw-r--r--Zotlabs/Lib/ActivityStreams.php17
1 files changed, 11 insertions, 6 deletions
diff --git a/Zotlabs/Lib/ActivityStreams.php b/Zotlabs/Lib/ActivityStreams.php
index e77b501b3..a07fdacb7 100644
--- a/Zotlabs/Lib/ActivityStreams.php
+++ b/Zotlabs/Lib/ActivityStreams.php
@@ -116,17 +116,17 @@ class ActivityStreams {
$this->obj['object'] = $this->get_compound_property($this->obj['object']);
}
- if ($this->obj && is_array($this->obj) && $this->obj['actor'])
+ if ($this->obj && is_array($this->obj) && isset($this->obj['actor']))
$this->obj['actor'] = $this->get_actor('actor', $this->obj);
- if ($this->tgt && is_array($this->tgt) && $this->tgt['actor'])
+ if ($this->tgt && is_array($this->tgt) && isset($this->tgt['actor']))
$this->tgt['actor'] = $this->get_actor('actor', $this->tgt);
$this->parent_id = $this->get_property_obj('inReplyTo');
- if ((!$this->parent_id) && is_array($this->obj)) {
+ if ((!$this->parent_id) && is_array($this->obj) && isset($this->obj['inReplyTo'])) {
$this->parent_id = $this->obj['inReplyTo'];
}
- if ((!$this->parent_id) && is_array($this->obj)) {
+ if ((!$this->parent_id) && is_array($this->obj) && isset($this->obj['id'])) {
$this->parent_id = $this->obj['id'];
}
}
@@ -294,7 +294,7 @@ class ActivityStreams {
if (!$s) {
return false;
}
- return (in_array($s, ['Like', 'Dislike', 'Flag', 'Block', 'Announce', 'Accept', 'Reject', 'TentativeAccept', 'TentativeReject', 'emojiReaction', 'EmojiReaction', 'EmojiReact']));
+ return (in_array($s, ['Like', 'Dislike', 'Flag', 'Block', 'Accept', 'Reject', 'TentativeAccept', 'TentativeReject', 'emojiReaction', 'EmojiReaction', 'EmojiReact']));
}
/**
@@ -308,20 +308,25 @@ class ActivityStreams {
function get_actor($property, $base = '', $namespace = '') {
$x = $this->get_property_obj($property, $base, $namespace);
+
if ($this->is_url($x)) {
$y = Activity::get_cached_actor($x);
if ($y) {
return $y;
}
}
+
$actor = $this->get_compound_property($property, $base, $namespace, true);
+
if (is_array($actor) && self::is_an_actor($actor['type'])) {
if (array_key_exists('id', $actor) && (!array_key_exists('inbox', $actor))) {
$actor = $this->fetch_property($actor['id']);
}
return $actor;
}
- return null;
+
+ return Activity::get_unknown_actor($this->data);
+
}