mirror of
https://github.com/friendica/friendica
synced 2025-04-26 22:30:18 +00:00
AP: Support "discoverable"
This commit is contained in:
parent
4308cace68
commit
e2dc36a691
6 changed files with 44 additions and 32 deletions
|
@ -65,9 +65,11 @@ class ActivityPub
|
|||
'dfrn' => 'http://purl.org/macgirvin/dfrn/1.0/',
|
||||
'diaspora' => 'https://diasporafoundation.org/ns/',
|
||||
'litepub' => 'http://litepub.social/ns#',
|
||||
'toot' => 'http://joinmastodon.org/ns#',
|
||||
'manuallyApprovesFollowers' => 'as:manuallyApprovesFollowers',
|
||||
'sensitive' => 'as:sensitive', 'Hashtag' => 'as:Hashtag',
|
||||
'directMessage' => 'litepub:directMessage']];
|
||||
'directMessage' => 'litepub:directMessage',
|
||||
'discoverable' => 'toot:discoverable']];
|
||||
const ACCOUNT_TYPES = ['Person', 'Organization', 'Service', 'Group', 'Application', 'Tombstone'];
|
||||
/**
|
||||
* Checks if the web request is done for the AP protocol
|
||||
|
@ -166,6 +168,10 @@ class ActivityPub
|
|||
$profile['baseurl'] = $apcontact['baseurl'];
|
||||
$profile['gsid'] = $apcontact['gsid'];
|
||||
|
||||
if (!is_null($apcontact['discoverable'])) {
|
||||
$profile['hide'] = !$apcontact['discoverable'];
|
||||
}
|
||||
|
||||
// Remove all "null" fields
|
||||
foreach ($profile as $field => $content) {
|
||||
if (is_null($content)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue