mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-12-18 11:03:17 +00:00
Update StatusStatelessTransformer, refactor the caption field to be compliant with the MastoAPI. Fixes #5364
This commit is contained in:
parent
77da9ad8e9
commit
79039ba595
2 changed files with 2 additions and 2 deletions
|
@ -10,7 +10,7 @@ use League\Fractal\Serializer\ArraySerializer;
|
||||||
|
|
||||||
class StatusService
|
class StatusService
|
||||||
{
|
{
|
||||||
const CACHE_KEY = 'pf:services:status:v1:';
|
const CACHE_KEY = 'pf:services:status:v1.1:';
|
||||||
|
|
||||||
public static function key($id, $publicOnly = true)
|
public static function key($id, $publicOnly = true)
|
||||||
{
|
{
|
||||||
|
|
|
@ -23,7 +23,7 @@ class StatusStatelessTransformer extends Fractal\TransformerAbstract
|
||||||
{
|
{
|
||||||
$taggedPeople = MediaTagService::get($status->id);
|
$taggedPeople = MediaTagService::get($status->id);
|
||||||
$poll = $status->type === 'poll' ? PollService::get($status->id) : null;
|
$poll = $status->type === 'poll' ? PollService::get($status->id) : null;
|
||||||
$rendered = $status->caption ? nl2br(Autolink::create()->autolink($status->caption)) : null;
|
$rendered = $status->caption ? nl2br(Autolink::create()->autolink($status->caption)) : "";
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'_v' => 1,
|
'_v' => 1,
|
||||||
|
|
Loading…
Reference in a new issue