From 98f76abbe85b4590003e7915ac38ace0d4bb135f Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sat, 4 Dec 2021 17:34:32 -0700 Subject: [PATCH] Update AccountTransformer, add note_text and location fields --- app/Transformer/Api/AccountTransformer.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/Transformer/Api/AccountTransformer.php b/app/Transformer/Api/AccountTransformer.php index 4b8e16976..8beb5b668 100644 --- a/app/Transformer/Api/AccountTransformer.php +++ b/app/Transformer/Api/AccountTransformer.php @@ -29,6 +29,7 @@ class AccountTransformer extends Fractal\TransformerAbstract 'following_count' => $profile->followingCount(), 'statuses_count' => (int) $profile->statusCount(), 'note' => $profile->bio ?? '', + 'note_text' => strip_tags($profile->bio), 'url' => $profile->url(), 'avatar' => $profile->avatarUrl(), 'website' => $profile->website, @@ -37,7 +38,8 @@ class AccountTransformer extends Fractal\TransformerAbstract 'created_at' => $profile->created_at->toJSON(), 'header_bg' => $profile->header_bg, 'last_fetched_at' => optional($profile->last_fetched_at)->toJSON(), - 'pronouns' => PronounService::get($profile->id) + 'pronouns' => PronounService::get($profile->id), + 'location' => $profile->location ]; }