From d47edd8bedbb2dcb2f22a5f81cc190d380fd9035 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Wed, 3 Apr 2019 21:04:14 -0600 Subject: [PATCH] Update AP transformers --- app/Transformer/ActivityPub/Verb/CreateNote.php | 6 ++++++ app/Transformer/ActivityPub/Verb/Note.php | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/app/Transformer/ActivityPub/Verb/CreateNote.php b/app/Transformer/ActivityPub/Verb/CreateNote.php index 258fa4991..d5e490134 100644 --- a/app/Transformer/ActivityPub/Verb/CreateNote.php +++ b/app/Transformer/ActivityPub/Verb/CreateNote.php @@ -30,6 +30,11 @@ class CreateNote extends Fractal\TransformerAbstract '@context' => [ 'https://www.w3.org/ns/activitystreams', 'https://w3id.org/security/v1', + [ + 'Hashtag' => 'as:Hashtag', + 'sensitive' => 'as:sensitive', + 'commentsDisabled' => 'as:commentsDisabled', + ] ], 'id' => $status->permalink(), 'type' => 'Create', @@ -58,6 +63,7 @@ class CreateNote extends Fractal\TransformerAbstract ]; })->toArray(), 'tag' => $tags, + 'commentsDisabled' => (bool) $status->comments_disabled, ] ]; } diff --git a/app/Transformer/ActivityPub/Verb/Note.php b/app/Transformer/ActivityPub/Verb/Note.php index b9ec5fd44..ac302b74d 100644 --- a/app/Transformer/ActivityPub/Verb/Note.php +++ b/app/Transformer/ActivityPub/Verb/Note.php @@ -30,6 +30,11 @@ class Note extends Fractal\TransformerAbstract '@context' => [ 'https://www.w3.org/ns/activitystreams', 'https://w3id.org/security/v1', + [ + 'Hashtag' => 'as:Hashtag', + 'sensitive' => 'as:sensitive', + 'commentsDisabled' => 'as:commentsDisabled', + ] ], 'id' => $status->url(), 'type' => 'Note', @@ -51,6 +56,7 @@ class Note extends Fractal\TransformerAbstract ]; })->toArray(), 'tag' => $tags, + 'commentsDisabled' => (bool) $status->comments_disabled, ]; } }