mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-17 04:15:15 +02:00
Adding (temporary) calls to AP in existing stuff
This commit is contained in:
parent
0a5476591d
commit
1afa6523bc
3 changed files with 24 additions and 1 deletions
|
@ -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,15 @@ function profile_init(App $a)
|
|||
DFRN::autoRedir($a, $which);
|
||||
}
|
||||
|
||||
if (stristr(defaults($_SERVER, 'HTTP_ACCEPT', ''), 'application/activity+json')) {
|
||||
$user = DBA::selectFirst('user', ['uid'], ['nickname' => $which]);
|
||||
if ($user['uid'] == 180) {
|
||||
$data = ActivityPub::profile($user['uid']);
|
||||
echo json_encode($data);
|
||||
exit();
|
||||
}
|
||||
}
|
||||
|
||||
Profile::load($a, $which, $profile);
|
||||
|
||||
$blocked = !local_user() && !remote_user() && Config::get('system', 'block_public');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue