1
0
Fork 1
mirror of https://github.com/pixelfed/pixelfed.git synced 2024-12-21 23:32:39 +00:00

Update StatusStatelessTransformer, refactor the caption field to be compliant with the MastoAPI. Fixes #5364

This commit is contained in:
Daniel Supernault 2024-12-06 03:15:39 -07:00
parent 77da9ad8e9
commit 79039ba595
No known key found for this signature in database
GPG key ID: 23740873EE6F76A1
2 changed files with 2 additions and 2 deletions

View file

@ -10,7 +10,7 @@ use League\Fractal\Serializer\ArraySerializer;
class StatusService
{
const CACHE_KEY = 'pf:services:status:v1:';
const CACHE_KEY = 'pf:services:status:v1.1:';
public static function key($id, $publicOnly = true)
{

View file

@ -23,7 +23,7 @@ class StatusStatelessTransformer extends Fractal\TransformerAbstract
{
$taggedPeople = MediaTagService::get($status->id);
$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 [
'_v' => 1,