From ff2858b6ea8f586daa95e51ae21315f86cc5ded5 Mon Sep 17 00:00:00 2001 From: Arno Richter Date: Fri, 13 Jan 2023 17:47:09 +0100 Subject: first draft of activitypub support --- lib/activitypub-webfinger.php | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 lib/activitypub-webfinger.php (limited to 'lib/activitypub-webfinger.php') diff --git a/lib/activitypub-webfinger.php b/lib/activitypub-webfinger.php new file mode 100644 index 0000000..2ad44fb --- /dev/null +++ b/lib/activitypub-webfinger.php @@ -0,0 +1,22 @@ + 'acct:'.$actor.'@'.$domain, + 'links' => [ + [ + 'rel' => 'self', + 'type' => 'application/activity+json', + 'href' => $config['url'].'/actor' + ] + ] + ]; + + header('Content-Type: application/ld+json'); + echo(json_encode($data, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES)); -- cgit v1.2.3