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