aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib/Activity.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2022-02-03 11:57:47 +0000
committerMario <mario@mariovavti.com>2022-02-03 11:57:47 +0000
commit99dcdee67ab3521bd3e5e58ba4a85182b7a44890 (patch)
treeb5d5016838963c5d46d34b8c15c6fd6e56bad522 /Zotlabs/Lib/Activity.php
parent99928f1aeae088d1848e1fda870dcf07d91b9683 (diff)
downloadvolse-hubzilla-99dcdee67ab3521bd3e5e58ba4a85182b7a44890.tar.gz
volse-hubzilla-99dcdee67ab3521bd3e5e58ba4a85182b7a44890.tar.bz2
volse-hubzilla-99dcdee67ab3521bd3e5e58ba4a85182b7a44890.zip
move JSalmon stuff from the data to the meta field in Lib ActivityStreams and some more refinement on storing the raw ap and diaspora data in iconfig
Diffstat (limited to 'Zotlabs/Lib/Activity.php')
-rw-r--r--Zotlabs/Lib/Activity.php25
1 files changed, 12 insertions, 13 deletions
diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php
index 8d3702d10..159f2a46f 100644
--- a/Zotlabs/Lib/Activity.php
+++ b/Zotlabs/Lib/Activity.php
@@ -2672,35 +2672,34 @@ class Activity {
}
// old style: can be removed after most hubs are on 7.0.2
- if (!$ap_rawmsg && array_key_exists('signed', $raw_arr) && is_array($act->obj) && is_array($act->obj['attachment'])) {
+ elseif (array_key_exists('signed', $raw_arr) && is_array($act->obj) && is_array($act->obj['attachment'])) {
foreach($act->obj['attachment'] as $a) {
if (
- isset($a['type']) && $a['type'] === 'propertyvalue' &&
+ isset($a['type']) && $a['type'] === 'PropertyValue' &&
isset($a['name']) && $a['name'] === 'zot.activitypub.rawmsg' &&
isset($a['value'])
) {
$ap_rawmsg = $a['value'];
- break;
+ }
+
+ if (
+ isset($a['type']) && $a['type'] === 'PropertyValue' &&
+ isset($a['name']) && $a['name'] === 'zot.diaspora.fields' &&
+ isset($a['value'])
+ ) {
+ $diaspora_rawmsg = $a['value'];
}
}
}
+ // catch the likes
if (!$ap_rawmsg && $response_activity) {
$ap_rawmsg = json_encode($act->data, JSON_UNESCAPED_SLASHES);
}
// end old style
if (!$ap_rawmsg && array_key_exists('signed', $raw_arr)) {
- //zap
- 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']);
-
+ // zap
$ap_rawmsg = json_encode($act->data, JSON_UNESCAPED_SLASHES);
}