mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-19 16:15:13 +00:00
issue #178 continued
This commit is contained in:
parent
9b372a9eb5
commit
aea775c999
1 changed files with 4 additions and 2 deletions
|
@ -10,6 +10,7 @@ use Code\Lib\Activity;
|
||||||
use Code\Access\AccessControl;
|
use Code\Access\AccessControl;
|
||||||
use Code\Access\PermissionLimits;
|
use Code\Access\PermissionLimits;
|
||||||
use Code\Lib\Channel;
|
use Code\Lib\Channel;
|
||||||
|
use Code\Lib\PConfig;
|
||||||
use Code\Lib\Time;
|
use Code\Lib\Time;
|
||||||
use Code\Web\HTTPHeaders;
|
use Code\Web\HTTPHeaders;
|
||||||
use Code\Daemon\Run;
|
use Code\Daemon\Run;
|
||||||
|
@ -438,10 +439,11 @@ function photo_upload($channel, $observer, $args)
|
||||||
$object['to'] = Activity::map_acl(array_merge($ac, ['item_private' => 1]));
|
$object['to'] = Activity::map_acl(array_merge($ac, ['item_private' => 1]));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$isNomadic = PConfig::Get($channel['channel_id'], 'system', 'nomadicAP');
|
||||||
$target = [
|
$target = [
|
||||||
'type' => 'Collection',
|
'type' => 'Collection',
|
||||||
'name' => ((strlen($album)) ? $album : '/'),
|
'name' => ((strlen($album)) ? $album : '/'),
|
||||||
'id' => Channel::getDidResolver($channel) . '/album/' . ((isset($args['folder'])) ? '/' . $args['folder'] : EMPTY_STR),
|
'id' => (($isNomadic) ? Channel::getDidResolver($channel) : z_root()) . '/album/' . ((isset($args['folder'])) ? '/' . $args['folder'] : EMPTY_STR),
|
||||||
'attributedTo' => Channel::getDidResolver($channel, true),
|
'attributedTo' => Channel::getDidResolver($channel, true),
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -515,7 +517,7 @@ function photo_upload($channel, $observer, $args)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$uuid = new_uuid();
|
$uuid = new_uuid();
|
||||||
$mid = Channel::getDidResolver($channel) . '/item/' . $uuid;
|
$mid = (($isNomadic) ? Channel::getDidResolver($channel) : z_root()) . '/item/' . $uuid;
|
||||||
|
|
||||||
$object['id'] = $mid;
|
$object['id'] = $mid;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue