diff options
author | Mario <mario@mariovavti.com> | 2022-02-02 18:59:14 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2022-02-02 18:59:14 +0000 |
commit | 99928f1aeae088d1848e1fda870dcf07d91b9683 (patch) | |
tree | 6ba4b7844b3fe9acf85cb59ce4a2435ca273d98c | |
parent | 1740ae2104ff734edd45f6c0f1273d561cc4a69c (diff) | |
download | volse-hubzilla-99928f1aeae088d1848e1fda870dcf07d91b9683.tar.gz volse-hubzilla-99928f1aeae088d1848e1fda870dcf07d91b9683.tar.bz2 volse-hubzilla-99928f1aeae088d1848e1fda870dcf07d91b9683.zip |
only unset if set
-rw-r--r-- | Zotlabs/Lib/Activity.php | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php index df994cd79..8d3702d10 100644 --- a/Zotlabs/Lib/Activity.php +++ b/Zotlabs/Lib/Activity.php @@ -2650,7 +2650,7 @@ class Activity { $raw_arr = json_decode($act->raw, true); - // This is a zot6 packet and the raw activitypub message json + // This is a zot6 packet and the raw activitypub or diaspora message json // is possibly available in the attachement. if (array_key_exists('signed', $raw_arr) && is_array($act->data['attachment'])) { foreach($act->data['attachment'] as $a) { @@ -2692,9 +2692,14 @@ class Activity { if (!$ap_rawmsg && array_key_exists('signed', $raw_arr)) { //zap - unset($act->data['signer']); - unset($act->data['signed_data']); - unset($act->data['hubloc']); + if (isset($act->data['signer'])) + unset($act->data['signer']); + + if (isset($act->data['signed_data'])) + unset($act->data['signed_data']); + + if (isset($act->data['hubloc'])) + unset($act->data['hubloc']); $ap_rawmsg = json_encode($act->data, JSON_UNESCAPED_SLASHES); } |