X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fprofile.php;h=5b306b20fb03ad1f92dc4df09b2cb53718b269e5;hb=b6f2144237a9f4d2366da6ae4c170a281c2c5dd5;hp=2e3ccd28c52a8769f57c36df7160c841f96c5e45;hpb=91a3bf5610910da8709f0fe9aa3de2201efb124e;p=friendica.git diff --git a/mod/profile.php b/mod/profile.php index 2e3ccd28c5..5b306b20fb 100644 --- a/mod/profile.php +++ b/mod/profile.php @@ -20,6 +20,7 @@ use Friendica\Model\Profile; use Friendica\Module\Login; use Friendica\Protocol\DFRN; use Friendica\Util\DateTimeFormat; +use Friendica\Protocol\ActivityPub; function profile_init(App $a) { @@ -49,6 +50,16 @@ function profile_init(App $a) DFRN::autoRedir($a, $which); } + if (ActivityPub::isRequest()) { + $user = DBA::selectFirst('user', ['uid'], ['nickname' => $which]); + if (DBA::isResult($user)) { + $data = ActivityPub\Transmitter::getProfile($user['uid']); + echo json_encode($data); + header('Content-Type: application/activity+json'); + exit(); + } + } + Profile::load($a, $which, $profile); $blocked = !local_user() && !remote_user() && Config::get('system', 'block_public');