1
1
Fork 0

Coded reformatted

This commit is contained in:
Michael 2023-07-23 14:27:08 +00:00
parent 60c7bc90e6
commit 9e726eadee

View file

@ -61,26 +61,29 @@ use Friendica\Util\JsonLD;
class ActivityPub class ActivityPub
{ {
const PUBLIC_COLLECTION = 'https://www.w3.org/ns/activitystreams#Public'; const PUBLIC_COLLECTION = 'https://www.w3.org/ns/activitystreams#Public';
const CONTEXT = ['https://www.w3.org/ns/activitystreams', 'https://w3id.org/security/v1', const CONTEXT = [
['vcard' => 'http://www.w3.org/2006/vcard/ns#', 'https://www.w3.org/ns/activitystreams', 'https://w3id.org/security/v1',
'dfrn' => 'http://purl.org/macgirvin/dfrn/1.0/', [
'diaspora' => 'https://diasporafoundation.org/ns/', 'vcard' => 'http://www.w3.org/2006/vcard/ns#',
'litepub' => 'http://litepub.social/ns#', 'dfrn' => 'http://purl.org/macgirvin/dfrn/1.0/',
'toot' => 'http://joinmastodon.org/ns#', 'diaspora' => 'https://diasporafoundation.org/ns/',
'featured' => [ 'litepub' => 'http://litepub.social/ns#',
"@id" => "toot:featured", 'toot' => 'http://joinmastodon.org/ns#',
"@type" => "@id", 'featured' => [
], "@id" => "toot:featured",
'schema' => 'http://schema.org#', "@type" => "@id",
'manuallyApprovesFollowers' => 'as:manuallyApprovesFollowers', ],
'sensitive' => 'as:sensitive', 'Hashtag' => 'as:Hashtag', 'schema' => 'http://schema.org#',
'quoteUrl' => 'as:quoteUrl', 'manuallyApprovesFollowers' => 'as:manuallyApprovesFollowers',
'conversation' => 'ostatus:conversation', 'sensitive' => 'as:sensitive', 'Hashtag' => 'as:Hashtag',
'directMessage' => 'litepub:directMessage', 'quoteUrl' => 'as:quoteUrl',
'discoverable' => 'toot:discoverable', 'conversation' => 'ostatus:conversation',
'PropertyValue' => 'schema:PropertyValue', 'directMessage' => 'litepub:directMessage',
'value' => 'schema:value', 'discoverable' => 'toot:discoverable',
]]; 'PropertyValue' => 'schema:PropertyValue',
'value' => 'schema:value',
]
];
const ACCOUNT_TYPES = ['Person', 'Organization', 'Service', 'Group', 'Application', 'Tombstone']; const ACCOUNT_TYPES = ['Person', 'Organization', 'Service', 'Group', 'Application', 'Tombstone'];
/** /**
* Checks if the web request is done for the AP protocol * Checks if the web request is done for the AP protocol
@ -119,7 +122,7 @@ class ActivityPub
{ {
$accounttype = -1; $accounttype = -1;
switch($apcontact['type']) { switch ($apcontact['type']) {
case 'Person': case 'Person':
$accounttype = User::ACCOUNT_TYPE_PERSON; $accounttype = User::ACCOUNT_TYPE_PERSON;
break; break;