Merge pull request #1119 from pixelfed/frontend-ui-refactor

Update AP transformers
This commit is contained in:
daniel 2019-04-03 21:12:30 -06:00 committed by GitHub
commit 0ba1a820c0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 0 deletions

View file

@ -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,
]
];
}

View file

@ -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,
];
}
}