mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-19 16:15:13 +00:00
cleanup and fixes
This commit is contained in:
parent
a52fcc2de7
commit
a25f4e5f7b
3 changed files with 12 additions and 5 deletions
|
@ -1101,9 +1101,9 @@ function attach_store($channel, $observer_hash, $options = '', $arr = null)
|
|||
}
|
||||
|
||||
if ($notify) {
|
||||
$cloudPath = Channel::getDidResolver($channel) . '/cloud/' . $channel['channel_address'] . '/' . $r['0']['display_path'];
|
||||
$object = get_file_activity_object($channel['channel_id'], $r['0']['hash'], $cloudPath);
|
||||
file_activity($channel['channel_id'], $object, $r['0']['allow_cid'], $r['0']['allow_gid'], $r['0']['deny_cid'], $r['0']['deny_gid'], 'post', $notify);
|
||||
$cloudPath = Channel::getDidResolver($channel) . '/cloud/' . $channel['channel_address'] . '/' . $r[0]['display_path'];
|
||||
$object = get_file_activity_object($channel['channel_id'], $r[0]['hash'], $cloudPath);
|
||||
file_activity($channel['channel_id'], $object, $r[0]['allow_cid'], $r[0]['allow_gid'], $r[0]['deny_cid'], $r[0]['deny_gid'], 'post', $notify);
|
||||
}
|
||||
|
||||
return $ret;
|
||||
|
|
|
@ -2089,7 +2089,14 @@ class Channel
|
|||
|
||||
public static function getDidResolver($channel, $isActor = false)
|
||||
{
|
||||
return z_root() . '/.well-known/apgateway/' . self::getDid($channel) . (($isActor) ? '/actor' : '');
|
||||
$isNomadic = PConfig::Get($channel['channel_id'], 'system', 'nomadicAP');
|
||||
if ($isActor) {
|
||||
return (($isNomadic)
|
||||
? z_root() . '/.well-known/apgateway/' . self::getDid($channel) . '/actor'
|
||||
: z_root() . '/channel/' . $channel['channel_address']
|
||||
);
|
||||
}
|
||||
return z_root() . '/.well-known/apgateway/' . self::getDid($channel);
|
||||
}
|
||||
|
||||
public static function getNomadResolver($channel, $isActor = false)
|
||||
|
|
|
@ -271,7 +271,7 @@ class Outbox extends Controller
|
|||
}
|
||||
|
||||
if (App::$pager['unset'] && $total > 100) {
|
||||
$ret = Activity::paged_collection_init($total, App::$query_string, attributedTo: z_root() . '/channel/' . $channel['channel_address']);
|
||||
$ret = Activity::paged_collection_init($total, App::$query_string, attributedTo: Channel::getDidResolver($channel, true));
|
||||
} else {
|
||||
$items = items_fetch(
|
||||
[
|
||||
|
|
Loading…
Reference in a new issue