From 7a1c6b64c2dd03adc005e43586b2f76d9cea855f Mon Sep 17 00:00:00 2001 From: Mario Date: Wed, 26 Jan 2022 13:02:51 +0000 Subject: $act->raw will not always hold the AP raw message. Look for it in iconfig. --- Zotlabs/Lib/Activity.php | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'Zotlabs/Lib') diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php index 09aaeae25..3ba8339f6 100644 --- a/Zotlabs/Lib/Activity.php +++ b/Zotlabs/Lib/Activity.php @@ -2638,8 +2638,23 @@ class Activity { } } + if (is_array($act->obj) && is_array($act->obj['attachment'])) { + foreach($act->obj['attachment'] as $a) { + if (isset($a['type']) && $a['type'] === 'PropertyValue' && + isset($a['name']) && $a['name'] === 'zot.activitypub.rawmsg' && + isset($a['value']) + ) { + $rawmsg = $a['value']; + break; + } + } + } + + if ($rawmsg) { + set_iconfig($s, 'activitypub', 'rawmsg', $rawmsg, 1); + } + set_iconfig($s, 'activitypub', 'recips', $act->raw_recips); - set_iconfig($s, 'activitypub', 'rawmsg', $act->raw, 1); $hookinfo = [ 'act' => $act, -- cgit v1.2.3