aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib/Activity.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2023-05-15 08:03:27 +0000
committerMario <mario@mariovavti.com>2023-05-15 08:03:27 +0000
commitb50da2d8b783745d2dde3e82c5809effafd9b7d5 (patch)
tree0e40082173670f3aa0f4d6f5b7793c2cf79247a7 /Zotlabs/Lib/Activity.php
parent29e8e6d95c469c08cff7cd615319d1059f57e22e (diff)
downloadvolse-hubzilla-b50da2d8b783745d2dde3e82c5809effafd9b7d5.tar.gz
volse-hubzilla-b50da2d8b783745d2dde3e82c5809effafd9b7d5.tar.bz2
volse-hubzilla-b50da2d8b783745d2dde3e82c5809effafd9b7d5.zip
fix parent_mid and thr_parent not set correctly for response activities
Diffstat (limited to 'Zotlabs/Lib/Activity.php')
-rw-r--r--Zotlabs/Lib/Activity.php16
1 files changed, 13 insertions, 3 deletions
diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php
index bb3695341..fcf3fb172 100644
--- a/Zotlabs/Lib/Activity.php
+++ b/Zotlabs/Lib/Activity.php
@@ -2304,9 +2304,18 @@ class Activity {
$response_activity = true;
$s['mid'] = $act->id;
- $s['uuid'] = (($act->data['diaspora:guid']) ?: uuid_from_url($s['mid']));
+ $s['uuid'] = ((!empty($act->data['diaspora:guid'])) ? $act->data['diaspora:guid'] : uuid_from_url($s['mid']));
- $s['parent_mid'] = $act->objprop('id') ?: $act->obj;
+ if ($act->objprop('inReplyTo')) {
+ $s['parent_mid'] = $act->objprop('inReplyTo');
+ }
+
+ $s['thr_parent'] = $act->objprop('id') ?: $act->obj;
+
+ if (empty($s['parent_mid']) || empty($s['thr_parent'])) {
+ logger('response activity without parent_mid or thr_parent');
+ return;
+ }
// over-ride the object timestamp with the activity
@@ -2844,7 +2853,6 @@ class Activity {
];
call_hooks('decode_note', $hookinfo);
-
return $hookinfo['s'];
}
@@ -3092,6 +3100,7 @@ class Activity {
return;
}
+/*
if ($parent[0]['parent_mid'] !== $item['parent_mid']) {
$item['thr_parent'] = $item['parent_mid'];
}
@@ -3099,6 +3108,7 @@ class Activity {
$item['thr_parent'] = $parent[0]['parent_mid'];
}
$item['parent_mid'] = $parent[0]['parent_mid'];
+*/
/*
*