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

Merge pull request #5377 from pixelfed/staging

Fix broken newlines.
This commit is contained in:
daniel 2024-12-05 23:24:53 -07:00 committed by GitHub
commit 074b63d8d9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 11 additions and 8 deletions

View file

@ -9,6 +9,9 @@
- Update ApiV1Controller, fix bookmark bug. Closes #5216 ([9f7cc52c](https://github.com/pixelfed/pixelfed/commit/9f7cc52c))
- Update Status caption logic, stop storing duplicate html caption in db and defer to cached StatusService rendering ([9eeb7b67](https://github.com/pixelfed/pixelfed/commit/9eeb7b67))
- Update AutolinkService, optimize lookups ([eac2c196](https://github.com/pixelfed/pixelfed/commit/eac2c196))
- Update DirectMessageController, remove 72h limit for admins ([639df410](https://github.com/pixelfed/pixelfed/commit/639df410))
- Update StatusService, fix newlines ([56c07b7a](https://github.com/pixelfed/pixelfed/commit/56c07b7a))
- ([](https://github.com/pixelfed/pixelfed/commit/))
- ([](https://github.com/pixelfed/pixelfed/commit/))
## [v0.12.4 (2024-11-08)](https://github.com/pixelfed/pixelfed/compare/v0.12.4...dev)

View file

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

View file

@ -11,7 +11,7 @@ class StatusTransformer extends Fractal\TransformerAbstract
{
public function transform(Status $status)
{
$content = $status->caption ? Autolink::create()->autolink($status->caption) : null;
$content = $status->caption ? nl2br(Autolink::create()->autolink($status->caption)) : null;
return [
'@context' => [

View file

@ -52,7 +52,7 @@ class CreateNote extends Fractal\TransformerAbstract
$emojis = CustomEmoji::scan($status->caption, true) ?? [];
$emoji = array_merge($emojis, $mentions);
$tags = array_merge($emoji, $hashtags);
$content = $status->caption ? Autolink::create()->autolink($status->caption) : null;
$content = $status->caption ? nl2br(Autolink::create()->autolink($status->caption)) : null;
return [
'@context' => [

View file

@ -53,7 +53,7 @@ class Note extends Fractal\TransformerAbstract
$emojis = CustomEmoji::scan($status->caption, true) ?? [];
$emoji = array_merge($emojis, $mentions);
$tags = array_merge($emoji, $hashtags);
$content = $status->caption ? Autolink::create()->autolink($status->caption) : null;
$content = $status->caption ? nl2br(Autolink::create()->autolink($status->caption)) : null;
return [
'@context' => [

View file

@ -53,7 +53,7 @@ class UpdateNote extends Fractal\TransformerAbstract
$emoji = array_merge($emojis, $mentions);
$tags = array_merge($emoji, $hashtags);
$content = $status->caption ? Autolink::create()->autolink($status->caption) : null;
$content = $status->caption ? nl2br(Autolink::create()->autolink($status->caption)) : null;
$latestEdit = $status->edits()->latest()->first();
return [

View file

@ -13,7 +13,7 @@ class StatusTransformer extends Fractal\TransformerAbstract
{
public function transform(Status $status)
{
$content = $status->caption ? Autolink::create()->autolink($status->caption) : null;
$content = $status->caption ? nl2br(Autolink::create()->autolink($status->caption)) : null;
return [
'id' => (string) $status->id,

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 ? Autolink::create()->autolink($status->caption) : null;
$rendered = $status->caption ? nl2br(Autolink::create()->autolink($status->caption)) : null;
return [
'_v' => 1,

View file

@ -25,7 +25,7 @@ class StatusTransformer extends Fractal\TransformerAbstract
$pid = request()->user()->profile_id;
$taggedPeople = MediaTagService::get($status->id);
$poll = $status->type === 'poll' ? PollService::get($status->id, $pid) : null;
$content = $status->caption ? Autolink::create()->autolink($status->caption) : null;
$content = $status->caption ? nl2br(Autolink::create()->autolink($status->caption)) : null;
return [
'_v' => 1,