Update AP Profile Transformer, fix suspended attributes

This commit is contained in:
Daniel Supernault 2024-03-08 04:24:13 -07:00
parent 63100fe950
commit 2e5e68e447
No known key found for this signature in database
GPG key ID: 23740873EE6F76A1

View file

@ -59,6 +59,11 @@ class ProfileTransformer extends Fractal\TransformerAbstract
if ($profile->status === 'delete' || $profile->deleted_at != null) {
$res['suspended'] = true;
$res['name'] = '';
unset($res['icon']);
$res['summary'] = '';
$res['indexable'] = false;
$res['manuallyApprovesFollowers'] = false;
} else {
if ($profile->aliases->count()) {
$res['alsoKnownAs'] = $profile->aliases->map(fn ($alias) => $alias->uri);