The access to the profile and the list of followers/followings can now be restricted

This commit is contained in:
Michael 2023-07-21 07:06:55 +00:00
parent d84866cf8c
commit 26aa38341f
3 changed files with 52 additions and 8 deletions

View file

@ -84,7 +84,7 @@ class Profile extends BaseProfile
$user = $this->database->selectFirst('user', ['uid'], ['nickname' => $this->parameters['nickname'] ?? '', 'account_removed' => false]);
if ($user) {
try {
$data = ActivityPub\Transmitter::getProfile($user['uid']);
$data = ActivityPub\Transmitter::getProfile($user['uid'], !ActivityPub::isAcceptedRequester($user['uid']));
header('Access-Control-Allow-Origin: *');
header('Cache-Control: max-age=23200, stale-while-revalidate=23200');
System::jsonExit($data, 'application/activity+json');