mirror of
https://github.com/openvk/openvk
synced 2024-11-15 03:31:18 +03:00
ActivityPub: Little cleanup
This commit is contained in:
parent
c2dffb3949
commit
c9aca1f3c5
3 changed files with 4 additions and 8 deletions
|
@ -7,10 +7,10 @@ final class ActivityPubPresenter extends OpenVKPresenter
|
|||
function renderWellKnown(): void
|
||||
{
|
||||
if ($_SERVER['REQUEST_URI'] == "/.well-known/host-meta") {
|
||||
$data = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
|
||||
. "<XRD xmlns=\"http://docs.oasis-open.org/ns/xri/xrd-1.0\">\n"
|
||||
. " <Link rel=\"lrdd\" template=\"" . ovk_scheme(true) . $_SERVER["SERVER_NAME"] . "/.well-known/webfinger?resource={uri}\">\n"
|
||||
. "</XRD>\n";
|
||||
$data = '<?xml version="1.0" encoding="UTF-8"?>'
|
||||
. '<XRD xmlns="http://docs.oasis-open.org/ns/xri/xrd-1.0">'
|
||||
. '<Link rel="lrdd" template="' . ovk_scheme(true) . $_SERVER["SERVER_NAME"] . '/.well-known/webfinger?resource={uri}"/>'
|
||||
. '</XRD>';
|
||||
|
||||
header("Content-Type: application/xrd+xml; charset=utf-8");
|
||||
exit($data);
|
||||
|
|
|
@ -301,8 +301,6 @@ abstract class OpenVKPresenter extends SimplePresenter
|
|||
"@id": "sm:groups",
|
||||
"@type": "@id"
|
||||
},
|
||||
"verified": "sm:verified",
|
||||
"status": "sm:status",
|
||||
"vcard": "http://www.w3.org/2006/vcard/ns#"
|
||||
},
|
||||
"https://w3id.org/security/v1"
|
||||
|
|
|
@ -57,8 +57,6 @@ final class UserPresenter extends OpenVKPresenter
|
|||
"middleName" => $user->getPseudo(), // Unlike Smithereen, the Middle name in OpenVK is a Nickname
|
||||
"vcard:bday" => $user->getBirthday()->format('%Y-%m-%d'),
|
||||
"gender" => "http://schema.org#" . $user->isFemale() ? "Male" : "Female",
|
||||
"verified" => $user->isVerified(),
|
||||
"status" => $user->getStatus(),
|
||||
"supportsFriendRequests" => true,
|
||||
"friends" => ovk_scheme(true) . $_SERVER['SERVER_NAME'] . "/friends" . $user->getId(),
|
||||
"groups" => ovk_scheme(true) . $_SERVER['SERVER_NAME'] . "/groups" . $user->getId()
|
||||
|
|
Loading…
Reference in a new issue