From 661bce6d938560c55f78e5d7649488b7aa753213 Mon Sep 17 00:00:00 2001 From: Mike Macgirvin Date: Tue, 9 Jul 2024 07:19:32 +1000 Subject: [PATCH] some quick/partial fixes for issue #178 --- src/Module/Item.php | 6 +++--- src/Module/Outbox.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Module/Item.php b/src/Module/Item.php index 86b33a49c..ec10176fe 100644 --- a/src/Module/Item.php +++ b/src/Module/Item.php @@ -1389,7 +1389,7 @@ class Item extends Controller $mid = $message_id; } else { $uuid = new_uuid(); - $mid = Channel::getDidResolver($channel) . '/item/' . $uuid; + $mid = (($this->isNomadic) ? Channel::getDidResolver($channel) : z_root()) . '/item/' . $uuid; } } @@ -1462,7 +1462,7 @@ class Item extends Controller if ((!(isset($plink) && $plink)) && $item_thread_top) { - $plink = Channel::getDidResolver($channel) . '/item/' . $uuid; + $plink = (($this->isNomadic) ? Channel::getDidResolver($channel) : z_root()) . '/item/' . $uuid; } if (array_path_exists('obj/id', $datarray)) { @@ -2099,7 +2099,7 @@ class Item extends Controller $obj['to'] = Activity::map_acl($item); } else { $obj['to'] = [ACTIVITY_PUBLIC_INBOX]; - $obj['cc'] = [Channel::getDidResolver($channel) . '/followers/' . $channel['channel_address']]; + $obj['cc'] = [(($this->isNomadic) ? Channel::getDidResolver($channel) : z_root()) . '/followers/' . $channel['channel_address']]; } $tags = Activity::encode_taxonomy(['term' => $term]); diff --git a/src/Module/Outbox.php b/src/Module/Outbox.php index 98ee72de9..ee05f49d3 100644 --- a/src/Module/Outbox.php +++ b/src/Module/Outbox.php @@ -311,7 +311,7 @@ class Outbox extends Controller } } - $ret = Activity::encode_item_collection($items, App::$query_string, 'OrderedCollection', true, z_root() . '/channel/' . $channel['channel_address'],$total); + $ret = Activity::encode_item_collection($items, App::$query_string, 'OrderedCollection', true, Channel::getDidResolver($channel, true), $total); } as_return_and_die($ret, $channel);