'manuallyApprovesFollowers' => 'as:manuallyApprovesFollowers',
'sensitive' => 'as:sensitive', 'Hashtag' => 'as:Hashtag',
'directMessage' => 'litepub:directMessage']];
- const ACCOUNT_TYPES = ['Person', 'Organization', 'Service', 'Group', 'Application'];
+ const ACCOUNT_TYPES = ['Person', 'Organization', 'Service', 'Group', 'Application', 'Tombstone'];
/**
* Checks if the web request is done for the AP protocol
*
public static function isRequest()
{
return stristr($_SERVER['HTTP_ACCEPT'] ?? '', 'application/activity+json') ||
+ stristr($_SERVER['HTTP_ACCEPT'] ?? '', 'application/json') ||
stristr($_SERVER['HTTP_ACCEPT'] ?? '', 'application/ld+json');
}
*/
public static function fetchContent(string $url, int $uid = 0)
{
- if (empty($uid)) {
- $user = User::getFirstAdmin(['uid']);
-
- if (empty($user['uid'])) {
- // When the system setup is missing an admin we just take the first user
- $condition = ['verified' => true, 'blocked' => false, 'account_removed' => false, 'account_expired' => false];
- $user = DBA::selectFirst('user', ['uid'], $condition);
- }
-
- if (!empty($user['uid'])) {
- $uid = $user['uid'];
- }
- }
-
return HTTPSignature::fetch($url, $uid);
}
case 'Application':
$accounttype = User::ACCOUNT_TYPE_RELAY;
break;
+ case 'Tombstone':
+ $accounttype = User::ACCOUNT_TYPE_DELETED;
+ break;
}
return $accounttype;
$profile['poll'] = $apcontact['outbox'];
$profile['pubkey'] = $apcontact['pubkey'];
$profile['subscribe'] = $apcontact['subscribe'];
+ $profile['manually-approve'] = $apcontact['manually-approve'];
$profile['baseurl'] = $apcontact['baseurl'];
$profile['gsid'] = $apcontact['gsid'];