Issue 14377: Support for "postingRestrictedToMods" added

This commit is contained in:
Michael 2024-08-20 05:58:24 +00:00
parent 355273b13c
commit d9d9cd45e4
8 changed files with 56 additions and 37 deletions

View file

@ -295,6 +295,10 @@ class APContact
return $fetched_contact;
}
if (!empty($compacted['https://webfinger.net/#'])) {
$apcontact['addr'] = JsonLD::fetchElement($compacted, 'https://webfinger.net/#');
}
if (empty($apcontact['addr']) && ($apcontact['type'] != 'Tombstone')) {
try {
$apcontact['addr'] = $apcontact['nick'] . '@' . (new Uri($apcontact['url']))->getAuthority();
@ -313,7 +317,7 @@ class APContact
}
$apcontact['manually-approve'] = (int)JsonLD::fetchElement($compacted, 'as:manuallyApprovesFollowers');
$apcontact['posting-restricted'] = (int)JsonLD::fetchElement($compacted, 'lemmy:postingRestrictedToMods');
$apcontact['suspended'] = (int)JsonLD::fetchElement($compacted, 'toot:suspended');
if (!empty($compacted['as:generator'])) {