mirror of
https://github.com/pixelfed/pixelfed.git
synced 2025-02-06 20:00:48 +00:00
clean up json-ld schema
This commit is contained in:
parent
eaddb2147a
commit
be6dc8ac47
6 changed files with 138 additions and 89 deletions
|
@ -797,12 +797,6 @@ class DirectMessageController extends Controller
|
||||||
$body = [
|
$body = [
|
||||||
'@context' => [
|
'@context' => [
|
||||||
'https://www.w3.org/ns/activitystreams',
|
'https://www.w3.org/ns/activitystreams',
|
||||||
'https://w3id.org/security/v1',
|
|
||||||
[
|
|
||||||
'sc' => 'http://schema.org#',
|
|
||||||
'Hashtag' => 'as:Hashtag',
|
|
||||||
'sensitive' => 'as:sensitive',
|
|
||||||
]
|
|
||||||
],
|
],
|
||||||
'id' => $dm->status->permalink(),
|
'id' => $dm->status->permalink(),
|
||||||
'type' => 'Create',
|
'type' => 'Create',
|
||||||
|
@ -845,12 +839,6 @@ class DirectMessageController extends Controller
|
||||||
$body = [
|
$body = [
|
||||||
'@context' => [
|
'@context' => [
|
||||||
'https://www.w3.org/ns/activitystreams',
|
'https://www.w3.org/ns/activitystreams',
|
||||||
'https://w3id.org/security/v1',
|
|
||||||
[
|
|
||||||
'sc' => 'http://schema.org#',
|
|
||||||
'Hashtag' => 'as:Hashtag',
|
|
||||||
'sensitive' => 'as:sensitive',
|
|
||||||
]
|
|
||||||
],
|
],
|
||||||
'id' => $dm->status->permalink('#delete'),
|
'id' => $dm->status->permalink('#delete'),
|
||||||
'to' => [
|
'to' => [
|
||||||
|
|
|
@ -11,13 +11,10 @@ class ProfileTransformer extends Fractal\TransformerAbstract
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'@context' => [
|
'@context' => [
|
||||||
'https://www.w3.org/ns/activitystreams',
|
|
||||||
'https://w3id.org/security/v1',
|
'https://w3id.org/security/v1',
|
||||||
|
'https://www.w3.org/ns/activitystreams',
|
||||||
[
|
[
|
||||||
'manuallyApprovesFollowers' => 'as:manuallyApprovesFollowers',
|
'manuallyApprovesFollowers' => 'as:manuallyApprovesFollowers',
|
||||||
'PropertyValue' => 'schema:PropertyValue',
|
|
||||||
'schema' => 'http://schema.org#',
|
|
||||||
'value' => 'schema:value'
|
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'id' => $profile->permalink(),
|
'id' => $profile->permalink(),
|
||||||
|
|
|
@ -53,17 +53,32 @@ class CreateNote extends Fractal\TransformerAbstract
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'@context' => [
|
'@context' => [
|
||||||
'https://www.w3.org/ns/activitystreams',
|
|
||||||
'https://w3id.org/security/v1',
|
'https://w3id.org/security/v1',
|
||||||
|
'https://www.w3.org/ns/activitystreams',
|
||||||
[
|
[
|
||||||
'sc' => 'http://schema.org#',
|
|
||||||
'Hashtag' => 'as:Hashtag',
|
'Hashtag' => 'as:Hashtag',
|
||||||
'sensitive' => 'as:sensitive',
|
'sensitive' => 'as:sensitive',
|
||||||
'commentsEnabled' => 'sc:Boolean',
|
'schema' => 'http://schema.org/',
|
||||||
'@capabilities' => [
|
'pixelfed' => 'http://pixelfed.org/ns#'
|
||||||
'@announce' => '@id',
|
'commentsEnabled' => [
|
||||||
'@like' => '@id',
|
'@id' => 'pixelfed:commentsEnabled',
|
||||||
'@reply' => '@id',
|
'@type' => 'schema:Boolean'
|
||||||
|
],
|
||||||
|
'capabilities' => [
|
||||||
|
'@id' => 'pixelfed:capabilities',
|
||||||
|
'@container' => '@set'
|
||||||
|
],
|
||||||
|
'announce' => [
|
||||||
|
'@id' => 'pixelfed:canAnnounce',
|
||||||
|
'@type' => '@id'
|
||||||
|
],
|
||||||
|
'like' => [
|
||||||
|
'@id' => 'pixelfed:canLike',
|
||||||
|
'@type' => '@id'
|
||||||
|
],
|
||||||
|
'reply' => [
|
||||||
|
'@id' => 'pixelfed:canReply',
|
||||||
|
'@type' => '@id'
|
||||||
],
|
],
|
||||||
'toot' => 'http://joinmastodon.org/ns#',
|
'toot' => 'http://joinmastodon.org/ns#',
|
||||||
'Emoji' => 'toot:Emoji'
|
'Emoji' => 'toot:Emoji'
|
||||||
|
|
|
@ -16,18 +16,35 @@ class CreateQuestion extends Fractal\TransformerAbstract
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'@context' => [
|
'@context' => [
|
||||||
'https://www.w3.org/ns/activitystreams',
|
|
||||||
'https://w3id.org/security/v1',
|
'https://w3id.org/security/v1',
|
||||||
|
'https://www.w3.org/ns/activitystreams',
|
||||||
[
|
[
|
||||||
'sc' => 'http://schema.org#',
|
|
||||||
'Hashtag' => 'as:Hashtag',
|
'Hashtag' => 'as:Hashtag',
|
||||||
'sensitive' => 'as:sensitive',
|
'sensitive' => 'as:sensitive',
|
||||||
'commentsEnabled' => 'sc:Boolean',
|
'schema' => 'http://schema.org/',
|
||||||
'@capabilities' => [
|
'pixelfed' => 'http://pixelfed.org/ns#'
|
||||||
'@announce' => '@id',
|
'commentsEnabled' => [
|
||||||
'@like' => '@id',
|
'@id' => 'pixelfed:commentsEnabled',
|
||||||
'@reply' => '@id',
|
'@type' => 'schema:Boolean'
|
||||||
],
|
],
|
||||||
|
'capabilities' => [
|
||||||
|
'@id' => 'pixelfed:capabilities',
|
||||||
|
'@container' => '@set'
|
||||||
|
],
|
||||||
|
'announce' => [
|
||||||
|
'@id' => 'pixelfed:canAnnounce',
|
||||||
|
'@type' => '@id'
|
||||||
|
],
|
||||||
|
'like' => [
|
||||||
|
'@id' => 'pixelfed:canLike',
|
||||||
|
'@type' => '@id'
|
||||||
|
],
|
||||||
|
'reply' => [
|
||||||
|
'@id' => 'pixelfed:canReply',
|
||||||
|
'@type' => '@id'
|
||||||
|
],
|
||||||
|
'toot' => 'http://joinmastodon.org/ns#',
|
||||||
|
'Emoji' => 'toot:Emoji'
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
'id' => $status->permalink(),
|
'id' => $status->permalink(),
|
||||||
|
|
|
@ -54,17 +54,32 @@ class Note extends Fractal\TransformerAbstract
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'@context' => [
|
'@context' => [
|
||||||
'https://www.w3.org/ns/activitystreams',
|
|
||||||
'https://w3id.org/security/v1',
|
'https://w3id.org/security/v1',
|
||||||
|
'https://www.w3.org/ns/activitystreams',
|
||||||
[
|
[
|
||||||
'sc' => 'http://schema.org#',
|
|
||||||
'Hashtag' => 'as:Hashtag',
|
'Hashtag' => 'as:Hashtag',
|
||||||
'sensitive' => 'as:sensitive',
|
'sensitive' => 'as:sensitive',
|
||||||
'commentsEnabled' => 'sc:Boolean',
|
'schema' => 'http://schema.org/',
|
||||||
'@capabilities' => [
|
'pixelfed' => 'http://pixelfed.org/ns#'
|
||||||
'@announce' => '@id',
|
'commentsEnabled' => [
|
||||||
'@like' => '@id',
|
'@id' => 'pixelfed:commentsEnabled',
|
||||||
'@reply' => '@id',
|
'@type' => 'schema:Boolean'
|
||||||
|
],
|
||||||
|
'capabilities' => [
|
||||||
|
'@id' => 'pixelfed:capabilities',
|
||||||
|
'@container' => '@set'
|
||||||
|
],
|
||||||
|
'announce' => [
|
||||||
|
'@id' => 'pixelfed:canAnnounce',
|
||||||
|
'@type' => '@id'
|
||||||
|
],
|
||||||
|
'like' => [
|
||||||
|
'@id' => 'pixelfed:canLike',
|
||||||
|
'@type' => '@id'
|
||||||
|
],
|
||||||
|
'reply' => [
|
||||||
|
'@id' => 'pixelfed:canReply',
|
||||||
|
'@type' => '@id'
|
||||||
],
|
],
|
||||||
'toot' => 'http://joinmastodon.org/ns#',
|
'toot' => 'http://joinmastodon.org/ns#',
|
||||||
'Emoji' => 'toot:Emoji'
|
'Emoji' => 'toot:Emoji'
|
||||||
|
|
|
@ -33,18 +33,35 @@ class Question extends Fractal\TransformerAbstract
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'@context' => [
|
'@context' => [
|
||||||
'https://www.w3.org/ns/activitystreams',
|
|
||||||
'https://w3id.org/security/v1',
|
'https://w3id.org/security/v1',
|
||||||
|
'https://www.w3.org/ns/activitystreams',
|
||||||
[
|
[
|
||||||
'sc' => 'http://schema.org#',
|
|
||||||
'Hashtag' => 'as:Hashtag',
|
'Hashtag' => 'as:Hashtag',
|
||||||
'sensitive' => 'as:sensitive',
|
'sensitive' => 'as:sensitive',
|
||||||
'commentsEnabled' => 'sc:Boolean',
|
'schema' => 'http://schema.org/',
|
||||||
'@capabilities' => [
|
'pixelfed' => 'http://pixelfed.org/ns#'
|
||||||
'@announce' => '@id',
|
'commentsEnabled' => [
|
||||||
'@like' => '@id',
|
'@id' => 'pixelfed:commentsEnabled',
|
||||||
'@reply' => '@id',
|
'@type' => 'schema:Boolean'
|
||||||
],
|
],
|
||||||
|
'capabilities' => [
|
||||||
|
'@id' => 'pixelfed:capabilities',
|
||||||
|
'@container' => '@set'
|
||||||
|
],
|
||||||
|
'announce' => [
|
||||||
|
'@id' => 'pixelfed:canAnnounce',
|
||||||
|
'@type' => '@id'
|
||||||
|
],
|
||||||
|
'like' => [
|
||||||
|
'@id' => 'pixelfed:canLike',
|
||||||
|
'@type' => '@id'
|
||||||
|
],
|
||||||
|
'reply' => [
|
||||||
|
'@id' => 'pixelfed:canReply',
|
||||||
|
'@type' => '@id'
|
||||||
|
],
|
||||||
|
'toot' => 'http://joinmastodon.org/ns#',
|
||||||
|
'Emoji' => 'toot:Emoji'
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
'id' => $status->url(),
|
'id' => $status->url(),
|
||||||
|
|
Loading…
Reference in a new issue