some quick/partial fixes for issue #178

This commit is contained in:
Mike Macgirvin 2024-07-09 07:19:32 +10:00
parent 5973a166c2
commit 661bce6d93
2 changed files with 4 additions and 4 deletions

View file

@ -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]);

View file

@ -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);