Update StatusTransformer, prioritize scope over deprecated visibility attribute

This commit is contained in:
Daniel Supernault 2021-07-26 22:21:03 -06:00
parent bc3add0525
commit 6e45021fc2
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7
2 changed files with 2 additions and 2 deletions

View file

@ -39,7 +39,7 @@ class StatusStatelessTransformer extends Fractal\TransformerAbstract
'muted' => null, 'muted' => null,
'sensitive' => (bool) $status->is_nsfw, 'sensitive' => (bool) $status->is_nsfw,
'spoiler_text' => $status->cw_summary ?? '', 'spoiler_text' => $status->cw_summary ?? '',
'visibility' => $status->visibility ?? $status->scope, 'visibility' => $status->scope ?? $status->visibility,
'application' => [ 'application' => [
'name' => 'web', 'name' => 'web',
'website' => null 'website' => null

View file

@ -41,7 +41,7 @@ class StatusTransformer extends Fractal\TransformerAbstract
'muted' => null, 'muted' => null,
'sensitive' => (bool) $status->is_nsfw, 'sensitive' => (bool) $status->is_nsfw,
'spoiler_text' => $status->cw_summary ?? '', 'spoiler_text' => $status->cw_summary ?? '',
'visibility' => $status->visibility ?? $status->scope, 'visibility' => $status->scope ?? $status->visibility,
'application' => [ 'application' => [
'name' => 'web', 'name' => 'web',
'website' => null 'website' => null