Update AP Profile Transformer, fix suspended attributes

pull/4996/head
Daniel Supernault 2024-03-08 04:24:13 -07:00
rodzic 63100fe950
commit 2e5e68e447
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 23740873EE6F76A1
1 zmienionych plików z 5 dodań i 0 usunięć

Wyświetl plik

@ -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);