From 23e2f111b73c1bf29cebd00ae65d3ef919d3f98a Mon Sep 17 00:00:00 2001 From: a Date: Wed, 27 Jul 2022 04:43:35 -0500 Subject: [PATCH] fix null values on capabilities --- app/Transformer/ActivityPub/Verb/CreateNote.php | 2 +- app/Transformer/ActivityPub/Verb/Note.php | 2 +- app/Transformer/ActivityPub/Verb/Question.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Transformer/ActivityPub/Verb/CreateNote.php b/app/Transformer/ActivityPub/Verb/CreateNote.php index 1265cc258..a9d40d9ed 100644 --- a/app/Transformer/ActivityPub/Verb/CreateNote.php +++ b/app/Transformer/ActivityPub/Verb/CreateNote.php @@ -115,7 +115,7 @@ class CreateNote extends Fractal\TransformerAbstract 'capabilities' => [ 'announce' => 'https://www.w3.org/ns/activitystreams#Public', 'like' => 'https://www.w3.org/ns/activitystreams#Public', - 'reply' => $status->comments_disabled == true ? null : 'https://www.w3.org/ns/activitystreams#Public' + 'reply' => $status->comments_disabled == true ? '[]' : 'https://www.w3.org/ns/activitystreams#Public' ], 'location' => $status->place_id ? [ 'type' => 'Place', diff --git a/app/Transformer/ActivityPub/Verb/Note.php b/app/Transformer/ActivityPub/Verb/Note.php index 939699890..777bd22b0 100644 --- a/app/Transformer/ActivityPub/Verb/Note.php +++ b/app/Transformer/ActivityPub/Verb/Note.php @@ -109,7 +109,7 @@ class Note extends Fractal\TransformerAbstract 'capabilities' => [ 'announce' => 'https://www.w3.org/ns/activitystreams#Public', 'like' => 'https://www.w3.org/ns/activitystreams#Public', - 'reply' => $status->comments_disabled == true ? null : 'https://www.w3.org/ns/activitystreams#Public' + 'reply' => $status->comments_disabled == true ? '[]' : 'https://www.w3.org/ns/activitystreams#Public' ], 'location' => $status->place_id ? [ 'type' => 'Place', diff --git a/app/Transformer/ActivityPub/Verb/Question.php b/app/Transformer/ActivityPub/Verb/Question.php index 359026b16..fb9313fb1 100644 --- a/app/Transformer/ActivityPub/Verb/Question.php +++ b/app/Transformer/ActivityPub/Verb/Question.php @@ -81,7 +81,7 @@ class Question extends Fractal\TransformerAbstract 'capabilities' => [ 'announce' => 'https://www.w3.org/ns/activitystreams#Public', 'like' => 'https://www.w3.org/ns/activitystreams#Public', - 'reply' => $status->comments_disabled == true ? null : 'https://www.w3.org/ns/activitystreams#Public' + 'reply' => $status->comments_disabled == true ? '[]' : 'https://www.w3.org/ns/activitystreams#Public' ], 'location' => $status->place_id ? [ 'type' => 'Place',