Skip to content

Commit

Permalink
Update AP Profile Transformer, fix suspended attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
dansup committed Mar 8, 2024
1 parent 63100fe commit 2e5e68e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/Transformer/ActivityPub/ProfileTransformer.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ public function transform(Profile $profile)

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);
Expand Down

0 comments on commit 2e5e68e

Please sign in to comment.