diff options
Diffstat (limited to 'Zotlabs')
-rw-r--r-- | Zotlabs/Daemon/Zotconvo.php | 7 | ||||
-rw-r--r-- | Zotlabs/Lib/Activity.php | 16 | ||||
-rw-r--r-- | Zotlabs/Lib/ActivityStreams.php | 1 |
3 files changed, 18 insertions, 6 deletions
diff --git a/Zotlabs/Daemon/Zotconvo.php b/Zotlabs/Daemon/Zotconvo.php index 3d6162473..16e7f113f 100644 --- a/Zotlabs/Daemon/Zotconvo.php +++ b/Zotlabs/Daemon/Zotconvo.php @@ -14,11 +14,12 @@ class Zotconvo { return; } - $channel_id = intval($argv[1]); $mid = $argv[2]; + if (!$mid) { + return; + } - $channel = channelx_by_n($channel_id); - + $channel = channelx_by_n(intval($argv[1])); if (!$channel) { return; } 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']; +*/ /* * diff --git a/Zotlabs/Lib/ActivityStreams.php b/Zotlabs/Lib/ActivityStreams.php index 9e460ff75..f07f99ac3 100644 --- a/Zotlabs/Lib/ActivityStreams.php +++ b/Zotlabs/Lib/ActivityStreams.php @@ -126,6 +126,7 @@ class ActivityStreams { if ((!$this->parent_id) && is_array($this->obj) && isset($this->obj['inReplyTo'])) { $this->parent_id = $this->obj['inReplyTo']; } + if ((!$this->parent_id) && is_array($this->obj) && isset($this->obj['id'])) { $this->parent_id = $this->obj['id']; } |