aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs
diff options
context:
space:
mode:
Diffstat (limited to 'Zotlabs')
-rw-r--r--Zotlabs/Daemon/Notifier.php3
-rw-r--r--Zotlabs/Lib/Libzot.php13
2 files changed, 12 insertions, 4 deletions
diff --git a/Zotlabs/Daemon/Notifier.php b/Zotlabs/Daemon/Notifier.php
index 78e116d68..02a0e155f 100644
--- a/Zotlabs/Daemon/Notifier.php
+++ b/Zotlabs/Daemon/Notifier.php
@@ -347,7 +347,6 @@ class Notifier {
return;
}
-
if ($target_item['mid'] === $target_item['parent_mid']) {
$parent_item = $target_item;
$top_level_post = true;
@@ -381,7 +380,7 @@ class Notifier {
$encoded_item = encode_item($target_item);
// Re-use existing signature unless the activity type changed to a Tombstone, which won't verify.
- $m = ((intval($target_item['item_deleted'])) ? '' : get_iconfig($target_item, 'activitystreams', 'signed_data'));
+ $m = ((intval($target_item['item_deleted'])) ? '' : get_iconfig($target_item, 'activitypub', 'signed_data'));
if ($m) {
$activity = json_decode($m, true);
diff --git a/Zotlabs/Lib/Libzot.php b/Zotlabs/Lib/Libzot.php
index 45d536638..6aa49c5a7 100644
--- a/Zotlabs/Lib/Libzot.php
+++ b/Zotlabs/Lib/Libzot.php
@@ -1268,8 +1268,13 @@ class Libzot {
}
}
}
+
if ($AS->data['signed_data']) {
- IConfig::Set($arr, 'activitystreams', 'signed_data', $AS->data['signed_data'], false);
+ IConfig::Set($arr, 'activitypub', 'signed_data', $AS->data['signed_data'], false);
+ $j = json_decode($AS->data['signed_data'], true);
+ if ($j) {
+ IConfig::Set($arr, 'activitypub', 'rawmsg', json_encode(JSalmon::unpack($j['data'])), true);
+ }
}
logger('Activity received: ' . print_r($arr, true), LOGGER_DATA, LOG_DEBUG);
@@ -1953,7 +1958,11 @@ class Libzot {
}
if ($AS->data['signed_data']) {
- IConfig::Set($arr, 'activitystreams', 'signed_data', $AS->data['signed_data'], false);
+ IConfig::Set($arr, 'activitypub', 'signed_data', $AS->data['signed_data'], false);
+ $j = json_decode($AS->data['signed_data'], true);
+ if ($j) {
+ IConfig::Set($arr, 'activitypub', 'rawmsg', json_encode(JSalmon::unpack($j['data'])), true);
+ }
}
logger('FOF Activity received: ' . print_r($arr, true), LOGGER_DATA, LOG_DEBUG);